hifa_restoredata¶
- hifa_restoredata(vis=None, session=None, products_dir=None, copytoraw=None, rawdata_dir=None, lazy=None, bdfflags=None, ocorr_mode=None, asis=None) Results[source]¶
Restore calibrated MeasurementSets from archived ASDMs and pipeline data products.
Restores flagged and calibrated MeasurementSets from archived ASDMs and pipeline flagging and calibration data products. This task is called at the beginning of the imaging-only pipeline recipe (not in the combined cal+imaging recipe, where
hifa_importdatais used instead).When importing the ASDM and converting it to a MeasurementSet (MS), if the output MS already exists in the output directory the
importasdmconversion step is skipped and the existing MS is imported directly.hifa_restoredataassumes the ASDMs are present in the directory given byrawdata_dir(default:'../rawdata'). By default (copytoraw=True), the flagging and calibration data products are copied fromproducts_dir(default:'../products') torawdata_dirat the start of the task. Ifcopytoraw=False, the products are expected inrawdata_diralongside the ASDMs.The expected products per ASDM are:
a compressed tar file of the final flag versions, e.g.
uid___A002_X30a93d_X43e.ms.flagversions.tar.gza text file with the applycal instructions, e.g.
uid___A002_X30a93d_X43e.ms.calapply.txta compressed tar file with the session caltables, e.g.
uid___A001_X74_X29.session_3.caltables.tar.gz
The task:
Imports the ASDM(s) to MS.
Removes the default MS.flagversions directory created by the filler.
Restores the final MS.flagversions directory stored by the pipeline.
Restores the final set of pipeline flags to the MS.
Restores the final calibration state of the MS.
Restores the final calibration tables for each MS.
Applies the calibration tables to each MS.
- Parameters:
vis --
List of raw visibility data files to be restored. Assumed to be in the directory specified by rawdata_dir.
Example:
vis=['uid___A002_X30a93d_X43e']session --
List of sessions one per visibility file.
Example:
session=['session_3']products_dir --
Name of the data products directory to copy calibration products from. Default: '../products' The parameter is effective only when
copytoraw= True. Whencopytoraw= False, calibration products inrawdata_dirwill be used.Example:
products_dir='myproductspath'copytoraw --
Copy calibration and flagging tables from
products_dirtorawdata_dirdirectory.Default:
True.Example:
copytoraw=Falserawdata_dir --
Name of the raw data directory.
Default:
'../rawdata'.Example:
rawdata_dir='myrawdatapath'lazy --
Use the lazy filler option.
Default:
False.Example:
lazy=Truebdfflags --
Set the BDF flags.
Default: True.
Example:
bdfflags=Falseocorr_mode --
Set ocorr_mode.
Default:
'ca'.Example:
ocorr_mode='ca'asis --
Creates verbatim copies of the ASDM tables in the output MS. The value given to this option must be a string containing a list of table names separated by whitespace characters.
Default:
'SBSummary ExecBlock Antenna Annotation Station Receiver Source CalAtmosphere CalWVR CalPointing'.Example:
asis='Source Receiver'
- Returns:
The results object for the pipeline task is returned.
Examples
Restore the pipeline results for a single ASDM in a single session:
>>> hifa_restoredata(vis=['uid___A002_X30a93d_X43e'], session=['session_1'], ocorr_mode='ca')