Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://hea-www.harvard.edu/RD/saotng/analysis.html
Дата изменения: Unknown Дата индексирования: Mon Oct 1 23:56:12 2012 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п |
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 the 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; fits"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 analysis commands 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.
If more than one analysis file is supplied to SAOtng via the -analysis command switch (or the SAOTNG_ANAL environment variable), then the user can specify how to present analysis routines in the analysis menu using the -analformat command line option (or the SAOTNG_ANALFORMAT environment variable). By default, this is set to "submenu", meaning that analysis routines from different analysis files will be grouped in sub-menus of the Analysis menu. If the analformat is set to "line", then all analysis routines will be placed in the top level Analysis menu, but tasks from different files will be separated by lines. If the value of "none", then no separation will be made between analysis tools from different files. These options are useful if a large number of analysis tools are loaded from different files. The default setup uses only one file and results in a single list of analysis tools.