Each file type known to SAOtng can have user-defined analysis commands associated with it. These analysis commands are defined at start-up time by means of ASCII descriptions. The analysis commands associated with the currently displayed image are available for execution, either via an analysis menu in the SAOtng GUI or using SAOtng's XPA "analysis" command. When activated, an analysis command first is macro-expanded to fill in user-defined arguments and then is executed externally using the system() function (see Macro expansion in SAOtng. Results can be displayed in a separate window or even can be sent back to SAOtng, i.e., an analysis command can create an image and send it to SAOtng for display:
xpaget SAOtng $data | smooth ... | xpaset SAOtng "frame new"In the example above, the FITS representation of the currently displayed image in SAOtng is piped into the standard input of an image smoothing program. The FITS image generated by this program then is piped back into a new frame buffer of SAOtng for display.
The ASCII file that defines the known image files consists of one or more file descriptors, each of which has the following format:
For example, the default analysis file currently contains the following:
# # Analysis command descriptions: # help # file templates # file types # analysis command line counts -- number of events in region (no background) *.qp *.imh QPOE IMH uiraf '${xraybin}'/x_xspatial.e imcnts source='${filename}' region=$sregion bkgd=0 table=NONE | XText -title ${filename}_imcnts counts w/bkgd -- number of events in region with background subtraction *.qp *.imh QPOE IMH uiraf '${xraybin}'/x_xspatial.e imcnts source='${filename}' region=$sregion bkgd='${filename}' bkgdregion=$bregion table=NONE | XText -title ${filename}_imcnts minmax -- calculate the min and max of the entire QPOE file *.qp *.imh QPOE IMH uiraf '${bin}'/x_images.e minmax image='${filename}' update=yes verbose=no | XText -title ${filename}_minmax minmax -- calculate the min and max of the current image section * FITS $data | fminmax | XText -title ${filename}_minmaxNew analysis routines are added to SAOtng using the -analysis [analysis prog list] option on the command line. The files in the file list are then added to the system-support routines.
Return to Main SAOtng Help Page