The global variables SPACESAVING, USEMS, DOSPLIT, and DOCONTSUB can be set prior to executing scriptForPI.py. The variables can be used independently or in conjunction.
USEMS can be set to use pre-imported measurements sets(MS) rather than import them from the ASDMs in the raw directory. You must have created the directory calibrated and put the imported raw MSs uid*.ms into individual working directories named uid*.calibration inside the calibrated directory. It can be set to either 0 or 1 with the following meaning.
USEMS = 0 same as not set, ASDMs will be imported from the raw directory
= 1 MSs have been pre-imported in the calibrated directory
SPACESAVING limits the disk space usage during and after execution of the script. It can be set to an integer from -1 to 3 with the following meaning.
SPACESAVING = -1 do not check disk space
= 0 same as not set (all intermediate MSs are kept)
= 1 do not keep intermediate MSs named *.ms.split
= 2 do not keep intermediate MSs named *.ms and *.ms.split
>= 3 do not keep intermediate MSs named *.ms, *.ms.split, and *.ms.split.cal (if possible)
With SPACESAVING=0, the required additional diskspace is up to 14 times as large as the delivered data (products and rawdata) while with SPACESAVING=3 (maximum savings), it is up to 6 times as large. The script will estimate the required disk space and will not execute if there is not sufficient free space available.
DOSPLIT can be set to create the *.ms.split.cal MSs, containing the only the calibrated data and science spectral windows (spws).
DOSPLIT=True will force the creation of the *.ms.split.cal MS.
DOSPLIT=False is the same as not setting DOSPLIT at all. In that case, the script will only create the *.ms.split.cal MSs in the case there was manual imaging (i.e. not pure pipeline imaging) performed during QA2.
DOCONTSUB can be set to re-create the continuum-subtracted MSs for line imaging. This is only relevant for pipeline-imaged data.
DOCONTSUB=True creates the continuum-subtracted MSs. In this case scriptForPI.py runs the first imaging stages. From Cycle 10 onwards, DOCONTSUB will automatically be run if the pipeline used self-calibration.
DOCONTSUB=False is the same as the default of unset. Continuum subtraction will not be applied.
For example, after initiating CASA in the script directory, the following commands would use pre-imported MSs and the highest degree of spacesaving and ensure that the calibrated data is split out into new *.ms.split.cal MSs at the end.
SPACESAVING = 3
USEMS = 1<
DOSPLIT = True
execfile('scriptForPI.py')
For more information, see the ALMA QA2 Data Products document.