Project

General

Profile

How to add an AppionLoop GUI page » History » Version 1

Amber Herold, 02/05/2014 05:13 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
$nbsp;
12
** 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
$nbsp;
23
# *Set parameters needed by the BasicLoopForm class*
24
&nbsp;
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
$this->setTestable( True ); // True to activate "test single image".
53
$this->setUseLegOutDir( False ); // The output directory will be created in the Appion run directory rather than Leginon.
54
$this->setShowDesc( False ); // Flag to hide the description field of the run parameters.
55
</pre>