How to add an AppionLoop GUI page » History » Version 2
Amber Herold, 02/05/2014 05:16 PM
1 | 1 | Amber Herold | h1. How to add an AppionLoop GUI page |
---|---|---|---|
2 | |||
3 | See feature #2634 for more information on the code that supports these directions. |
||
4 | |||
5 | # *Add a wiki page to the [[Appion_Processing|Appion User Guide]] describing how to use this feature* |
||
6 | # *Add a publication reference for the package you are using* |
||
7 | |
||
8 | ## Edit /myami/myamiweb/processing/inc/publicationList.inc to include an entry for any references you need to add to your launch page. |
||
9 | |
||
10 | # *Create a new form class for your feature* |
||
11 | 2 | Amber Herold | |
12 | 1 | Amber Herold | ** Create a new file in myami/myamiweb/processing/inc/forms. Call it coolFeatureForm.inc. |
13 | ** Create a class in this file that extends the BasicLoopForm class like this: |
||
14 | <pre> |
||
15 | require_once "basicLoopForm.inc"; |
||
16 | |||
17 | class AutoMaskForm extends BasicLoopForm |
||
18 | { |
||
19 | ... |
||
20 | </pre> |
||
21 | ** Examples are available in autoMaskForm.inc and makeDDstackForm.inc |
||
22 | 2 | Amber Herold | |
23 | 1 | Amber Herold | # *Set parameters needed by the BasicLoopForm class* |
24 | |
||
25 | <pre> |
||
26 | //------ Set Parameters for the parent class, BasicLoopForm (general Appion params) -----// |
||
27 | |||
28 | // Set the publications to be references on the web pages |
||
29 | $pubList = array('appion'); // The publication reference key that you added to publicationList.inc |
||
30 | $this->setPublications( $pubList ); |
||
31 | |||
32 | // Job Type should be unique to Appion. Used in the database to determine the type of job being run. |
||
33 | $this->setJobType( 'maskmaker' ); |
||
34 | |||
35 | // The name of the folder that all runs of this job type will be stored in. |
||
36 | $this->setOutputDirectory( 'mask' ); |
||
37 | |||
38 | // A portion of the run name that will be common (by default) to all runs of this job type. A unique number is appended to individual run names. |
||
39 | $this->setBaseRunName( 'maskrun' ); |
||
40 | |||
41 | // The title on the web page for this feature. |
||
42 | $this->setTitle( 'Auto Masking Launcher' ); |
||
43 | |||
44 | // The Heading on the web page for this feature. |
||
45 | $this->setHeading( 'Automated Masking with EM Hole Finder' ); |
||
46 | |||
47 | // The name of the python executable file that this GUI corresponds to. It should be based on the AppionLoop class and located in the myami/appion/bin folder. |
||
48 | $this->setExeFile( 'automasker.py' ); |
||
49 | |||
50 | // A URL corresponding to a wiki page in the Appion User Guide with information on running this feature. |
||
51 | $this->setGuideURL( "http://emg.nysbc.org/projects/appion/wiki/Appion_Processing" ); |
||
52 | 2 | Amber Herold | |
53 | // True to activate "test single image" field of Appion Loop parameters. |
||
54 | $this->setTestable( True ); |
||
55 | |||
56 | // The output directory will be created in the Appion run directory rather than Leginon. |
||
57 | $this->setUseLegOutDir( False ); |
||
58 | |||
59 | // Flag to hide the description field of the run parameters. True enables the description field. |
||
60 | $this->setShowDesc( False ); |
||
61 | 1 | Amber Herold | </pre> |