Skip to main content

What global variables are available in scriptForPI.py? - Knowledgebase / Offline Data Reduction and/or CASA - ALMA Science

What global variables are available in scriptForPI.py?

Authors list

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. The imported MSs should be in the calibrated directory prior to executing the script. 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 0 to 3 with the following meaning.

SPACESAVING = 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.

Finally, setting DOSPLIT=True before executing scriptForPI.py, will force the creation of the *.ms.split.cal MSs. 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.

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')



Users can now generate the Pipeline uvconsub products (MSs) after the restore of the calibrated data.  Users simply have to set the variable DOCONTSUB=True before running the scriptForPI.