Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/7.1.0/watchout/6.0/New_parameter_interface.shtml
Дата изменения: Unknown
Дата индексирования: Sat Dec 22 14:47:16 2007
Кодировка:

Поисковые слова: iceland
XMM-Newton SAS: Watchout Page RGS spectrum of HR1099
Home Watchouts Software requirements Installation Download Documentation Calibration Help

Can I run old SAS scripts with the new SAS v6.0, given its new parameter interface?

In general yes, but with some care.

The new SASv6.0 task parameter handling system is capable of understanding complex expressions for allowable values, in addition to setting default values as in former SAS versions. Furthermore, parameters can have child-parameters, depending on its value, and this makes possible the implicit setting of control parameters (those of the type with...), if a child parameter is activated on the command line.

This may sound a bit obscure. A few examples may help clarifying how the new parameter interface works. A command such as:

evselect --xcolumn=RAWX

implies with SASv6.0 --withimageset=yes, unless --withimageset=no is explicitly set.

This represents an important saving of time at the time of writing scripts, which can be much more compact than in the past. However, "old" scripts have to be revised to avoid setting implicitly undesired parameters.

A slightly more complex example illustrates what may happen. Let's suppose that you wrote in the past a SAS script, including the following command to extract a pn image:

evselect table=PNclean.fits imagebinning=binSize imageset=PNimage.fits withimageset=yes \
xcolumn=X ycolumn=Y ximagebinsize=80 yimagebinsize=80

After image extraction, your script launched again evselect to extract a spectrum. To save time you removed withimageset=yes, but left all the parameters defining the image accumulation untouched. This was right in SAS versions earlier than 6.0. However, it is wrong with SASv6.0. Now you must explicitly specify withimageset=no, if you do not want images to be accumulated again and again. In practical terms, if your script continued this way:

evselect table=PNclean.fits imagebinning=binSize imageset=PNimage.fits \
xcolumn=X ycolumn=Y ximagebinsize=80 yimagebinsize=80 \
withspectrumset=yes spectrumset=PNsource_spectrum.fits \
energycolumn=PI spectralbinsize=5 withspecranges=yes specchannelmin=0 specchannelmax=20479 \
expression='(FLAG==0) && (PATTERN<=4) && ((X,Y) IN circle(30400,28440,640))'

evselect table=PNclean.fits imagebinning=binSize imageset=PNimage.fits \
xcolumn=X ycolumn=Y ximagebinsize=80 yimagebinsize=80 \
withspectrumset=yes spectrumset=PNbackground_spectrum.fits \
energycolumn=PI spectralbinsize=5 withspecranges=yes specchannelmin=0 specchannelmax=20479 \
expression='(FLAG==0) && (PATTERN<=4) && ((X,Y) IN annulus(30400,28440,800,1200))'


it will not only extract spectra from a circle and an annulus, but as well two images with the same file name: PNimage.fits. Be reminded that evselect silently overwrite files with the same name. Apart from the extra time required for execution, you will have at some point the unpleasant surprise that your file PNimage.fits does not contain the image you intended to extract, but that of the region defined by the spatial filter: ((X,Y) IN annulus(30400,28440,800,1200))

The general recommendation to SAS users is therefore to carefully revise old scripts for occurrences of this kind of events before running them with SASv6.0. It is now of primary importance to keep the number of parameters in the script as low as possible, avoiding to specify explicitly parameters, for which the default values are good for your purposes.


Pages maintained by SAS librarian.
Any question about SAS should be addressed to the XMM-Newton help desk.

Updated on: November 18, 2006