I've created a GUI for driving obsSim. Its main purpose is to provide a convenient means of navigating the various libraries of sources created for use by the flux package. Here's how I run it from a standard ScienceTools installation on linux:

noric13[jchiang] ObsSim

At startup, the GUI reads in the default xml files used by gtobssim. If the xml file contains more than one 'source_library' tag, a separate entry for each will appear in the Source Libraries list box. The file name is prepended to the source_library name (if the 'title' attribute is set).



Clicking on any entry in the Source Libraries window causes the sources it contains to be displayed in the list box directly below it. Double-clicking on any source in that list box causes it to appear in the Model Sources list box. One can also select or un-select any number of sources by single-clicking. The button directly above the list box (containing the possibly truncated name of the library) is a pull-down menu, and the 'Add selected' item will copy all of the selected source names to Model Souces list box.

The buttons directly above each of the list boxes are pull-down menus offering various options for editing the contents of the list boxes:



The 'File->Run->gtobssim...' menu item will write the current list of xml files to a file in the local directory called 'xmlFiles.dat' and will write the list of source names to a file called 'source_names.dat', clobbering any existing files having those file names. It will also make a local copy of the obsSim.par file and create a dialog box presenting the parameter values. Clicking OK will launch the simulation.



Other Features:

  • The xml descriptions of the sources selected in the Candidate Sources list box can be written to stdout (i.e., to the terminal from which ObsSim was launched) by selecting the 'Print xml' menu item.
  • The ds9 pull-down window allows one to display the events in an FT1 file, binned in RA and Dec using ds9. Display of primary HDU images is also available.
  • Source Library files can be removed from the list. Select any entry and click on the 'Source Libraries' pull-down menu (directly above the list box) and choose the 'Delete selected' item. The selected entry and all other source_library entries contained in the same xml file will be deleted. New xml files can be read in via the 'Source Libraries->Add source library file...' pull-down items. This option clears the Model Sources list box entirely.

Cautionary Notes:

  • This browser shows all sources, including non-gamma ray sources such as muons. Events from these source will be treated as gamma-rays by obsSim. At present, there is no way of consistently differentiating which sources are gamma-ray sources from those that are not.
  • The xml files read into the Source Libraries list box cannot collectively have more than one source with the same name. The GUI does not check for this, and if two sources of the same name appear, the flux package will throw an exception when it tries to parse the xml files.
  • No labels