Model Editor
Synopsis:
The Fermi Likelihood Model Editor (modeleditor) enables you to create XML source model files for use as input to
the Fermi likelihood estimator program, a
critical and iterative step in the analysis of Fermi data. The format is moderately complex, and
must be followed precisely, a process made easier by this tool,
allowing you to concentrate on correct data input. The modeleditor also
provides limited capability to convert likelihood model files to the
format required by the Fermi observation simulator, which uses a
different XML format for model files.
Usage: gtbkg gtobssim gtfindsrc gtdiffrsp gttsmap gtsrcmaps gtlike gtexpmap
Once the user has prepared a model file, the likelihood program computes the likelihood that this particular set of models can give rise to the observed data. The model parameters are then adjusted until a high-likelihood scenario is found.
Troubleshooting Tip: Use ModelEditior to check your XML. Regardless of what editing tool is used to create a source model XML file, you can use ModelEditor to validate the file; just load the xml file into ModelEditor, which will generate errors if the format is not correct for use with the Science Tools. |
GUI Fields and Controls:
N.B. |
Context-sensitive help is available for all on-screen
controls. Moving the mouse over any screen element will invoke a popup
balloon containing a capsule summary of the function of that screen
element. |
Source Selection box |
The Source Selection box on the left side of the GUI contains a scrolling list of
sources in the current model file. Each source is identified by a
unique name. To select a source, click on its name in the
list box; the parameters for that source will populate the
editor on the right side of the window, most of which may
then be edited.
Note: When a source is selected, the
Source/Remove Source menu item may be selected to remove that source
from the list of sources. |
Title entry |
The Title entry field displays the title of the collection of sources in
the current file; this field is not the same as the name of the
file, and you can change the title by editing this field. |
Source Name entry |
The Source Name entry field displays the name of the currently selected source, and you can edit the source name by editing the
contents of this field. |
Source Type label |
The Source Type label is fixed and displays the current source type, i.e., PointSource or
DiffuseSource; it cannot be edited. |
Spectrum Type menu button |
The Spectrum Type popup button displays the type of spectrum used for this
source. To select a new spectrum type, press the popup
button, then select a spectrum type from the list.
When a new
spectrum type is selected, the parameters displayed in the spectrum
parameter grid are updated using default values
to reflect the new spectrum type.
Note: Spectrum types are described in the gtlike documentation. |
(Spectrum) File entry |
The Spectrum File entry field displays the path to a data file used by the spectrum, and is only used by the FileFunction spectrum type; for other
spectrum types, this field is deactivated. When active, you can
edit the the contents of this field. |
(Spectrum) Browse button |
The Spectrum Browse button summons a standard file dialog allowing you to browse
to the file you wish to use for the current FileFunction spectrum. This
dialog functions in the standard "file/open" fashion for the
platform the modeleditor is running on, providing a convenient
alternative to editing the text in the adjacent file entry field. |
(Spectrum) Parameter Editor grid |
The Spectrum Parameter grid contains 7 rows and six columns; each row corresponds to one
parameter characterizing the current spectrum, and each column
corresponds to one of the 6 attributes of the parameter (name, value,
scale, min, max, free).
Name. The name column contains the name of the
current parameter, and this field may be edited.
Caution: The
likelihood code will probably not behave correctly if you change the
parameter names.
Value and Scale. The value column contains the unscaled value of the
parameter, and the scale column contains the scale factor for the
parameter. The product (value*scale) is the actual quantity used by the
likelihood software.
Min and Max. The min and max columns display the allowed
minimum and maximum values for the value column (the unscaled
values). These fields are "live", and changing the value field
automatically invokes a range check using the min and max fields; users are prevented from entering bad or out-of-range values. If you wish to enter a value outside of the current range, the min
and/or max fields should be edited prior to editing the value
field.
Checkboxes. The final column (free) contains checkboxes. When a checkbox is
checked, that parameter is marked as adjustable by the likelihood
code, and will be modified to provide the best likelihood
estimate. The value specified in the value field is used as the
starting value. |
SpatialModel Type menu button |
The Spatial Model Type popup button displays the type of spatial model used for this
source. To select a new spatial model type, press the popup
button, then select one of the displayed spatial model types; the default parameters for the new selection are displayed in the
spectrum parameter grid. |
(Spatial Model) File entry |
The Spatial Model File field displays the path to a data file used by the spatial
model, which is used only by the SpatialMap and MapCubeFunction
spatial model types; this field is deactivated for other spatial model types. When active, you can edit this field. |
(Spatial Model) Browse button |
The Spatial Model Browse button summons a standard file dialog, allowing the user to browse
to a file to use for the current SpatialMap or MapCubeFunction spatial
model. This dialog functions in the standard "file/open" fashion
for the platform the modeleditor is running on, and provides a
convenient alternative to editing the text in the adjacent file entry
field. |
(Spatial Model) Parameter Editor grid |
The Spatial Model grid contains 7 rows and six columns; each row corresponds to one
parameter that characterizes the current spatial model, and each
column corresponds to one of the 6 attributes of the parameter (name,
value, scale, min, max, free).
Name. The name column contains the name of
the current parameter, and this field may be freely edited.
Caution: The
likelihood code will probably not behave correctly if you change the
parameter names.
Value and Scale. The value column contains the unscaled value of the
parameter, and the scale column contains the scale factor for the
parameter. The product (value*scale) is the actual quantity used by the
likelihood software.
Min and Max. The min and max columns display the allowed
minimum and maximum values for the value column (the unscaled
values). These fields are "live", and changing the value field
automatically invokes a range check using the min and max fields; users are prevented from entering bad or out-of-range values. If you wish to enter a value outside of the current range, the min
and/or max fields should be edited prior to editing the value
field.
Free. The final column (free) contains checkboxes. When a checkbox is
checked, that parameter is marked as adjustable by the likelihood
code, and will be modified to provide the best likelihood
estimate. The value specified in the value field is used as the
starting value. |
Menu commands
File menu:
New
Open ...
Close
Save
Save As ...
|
Standard |
Export to ObsSim... |
Convert the current model file to a format usable by the Fermi
observation simulator. Note that this capability is experimental -
only PowerLaw, PowerLaw2, BrokenPowerLaw, and BrokenPowerLaw2 spectrum
types are supported for the conversion, and only SkyDirFunction
spatial models are supported. If a model file cannot be converted
(usually by having an unsupported spectrum or spatial model type), the
program will likely crash. But this will be fixed RSN. |
Exit |
Standard |
Edit menu:
Cut |
Stub; currently performs no function. |
Copy |
Stub; currently performs no function. |
Paste |
Stub; currently performs no function. |
Undo |
Stub; currently performs no function. |
Source menu:
Add Source |
Add a new default source to the list of sources for this document. A
default source has a unique name based on the current number of
sources created.
Note: The default source is a PointSource with a PowerLaw
spectrum (with typical values for the parameters) and a SkyDirFunction
spatial model (pointing at the origin of the (RA,DEC) coordinate
system).
You can edit any of these parameters as needed. |
Remove Source |
Remove the currently selected source from the list of sources in the
current document. |
Add Point Source |
Add a default point source to the list of sources in the current
document. The content of a default source is described in the 'Add
Source' item above. |
Add Diffuse Source |
Add a default diffuse source to the list of sources in the current
document.
Note: Currently, this fills in a default source just like the 'Add
Point Source' command, but the source name indicates a diffuse
source.
This capability will be improved in a future version of the
modeleditor. |
Add EGRET Diffuse Source |
Add a diffuse source derived from EGRET data. The path to the file of
data for this model must be manually specified.
A future version of
the modeleditor will automatically populate the file entry field based
on the user's environment. |
Add GALPROP Diffuse Source |
Add a diffuse source derived from GALPROP data. The path to the file
of data for this model must be manually specified.
A future version of
the modeleditor will automatically populate the file entry field based
on the user's environment. |
Add Extragalactic Diffuse Source |
Add a diffuse source derived from extragalactic data. The path to the
file of data for this model must be manually specified.
A future
version of the modeleditor will automatically populate the file entry
field based on the user's environment. |
Help menu:
|
Help |
Display this help document. |
|
About |
Display a dialog which provides summary information on the modeleditor. |
|
Notes |
Models must contain at least 1 source. |
Example
In the following example, the user has a set of Fermi data, which includes the diffuse gamma-ray background and several suspected
point sources, and wants to
develop a model that has a high likelihood of representing the data.
- To launch the modeleditor, at the prompt, enter:
ModelEditor (tested with ScienceTools-09-18-06 on a RHEL5-64 machine)
The Model Editor GUI will be displayed with a single default point source
already added to the source list for this model.
- In the Spatial Model parameter grid, enter the RA and DEC for each of the suspected point sources; for example:
Source #1 (i.e., Gamma suspect 1)
The first source is suspected to be an EGRET source, i.e., 3EG J0010+7309 at (RA,DEC)=(2.56,73.17); therefore:
enter an RA of 2 and a DEC of 73.
Since this source is suspected to be somewhat softer than the default source:
change the Index value field in the Spectrum parameter editor from the default value of -2.1 to the value: -1.9.
Note: Since this is intended as a starting guess:
check the Index
free box to allow the likelihood program to
adjust the index parameter in order to achieve the best fit to the data.
Also check the Prefactor parameter box to enable the program to obtain the best flux
estimate.
Name this source: e.g., Gamma suspect 1.
Source #2 (i.e., Gamma suspect 2)
select Add Source from the Source menu, and note that a new default point source is created and added to
the list box on the left of the window.
In the list box, select that source; the default parameters will populate the editor.
adjust the value of the Index parameter to a steeper value, e.g., -2.2.
Update the values of the RA and DEC fields to
correspond to the suspected source location, and name this source: Gamma suspect 2.
Repeat this process for each suspected point source in the field.
- To account for the diffuse background emission:
select Add EGRET Diffuse Source from the Source menu,
then
change the name in the Title field to: Suspected Gamma
Sources.
- To save the model:
select Save from the File menu,
navigate to your data directory, and
save the file with the name suspect1.xml.
- To tweak your model by using a different diffuse
background:
select EGRET Diffuse Source from the source list, then
select Remove Source from the Source menu.
Next:
select Add
GALPROP Diffuse Source from the Source menu, then
select Save As... from the File menu, and
enter suspect2.xml as the file name.
To exit the modeleditor:
select Exit from the File menu.
You are now ready to submit the suspect1.xml and suspect2.xml files to the likelihood estimator.
- From the command line, enter:
>modeleditor[path]
where [path] is the (optional) path to an existing model file to be
edited. If no existing file is specified, a default model is created,
and may be edited.
Last updated by: Chuck Patterson 06/15/2010 |
|
|