hifa_importdata

hifa_importdata(vis: list[str] | None = None, session: str | None = None, asis: str | None = None, process_caldevice: bool | None = None, overwrite: bool | None = None, nocopy: bool | None = None, bdfflags: bool | None = None, datacolumns: dict[str, str] | None = None, lazy: bool | None = None, dbservice: bool | None = None, ocorr_mode: str | None = None, createmms: str | None = None, minparang: float | None = None, parallel: bool | None = None) ResultsList[Results][source]

Imports data into the interferometry pipeline.

The hifa_importdata task loads the specified visibility data into the pipeline context, unpacking and/or converting it as necessary. ASDMs are imported into MeasurementSets, Binary Data Flags are applied, and some properties of those MSs are calculated.

If the overwrite input parameter is set to False and the task is asked to convert an input ASDM to an MS, then when the output MS already exists in the output directory, the importasdm conversion step is skipped, and the existing MS will be imported instead.

The WebLog page shows a summary of imported MSs and flux densities of calibrators. Flux densities are first read from the Source.xml table of the ASDM (recorded by the online system from the calibrator catalog), then updated by querying the online ALMA calibrator flux service (controlled by dbservice=True), allowing post-observation observatory measurements to be used. The flux densities for each calibrator in each science spw in each MS are written to the file flux.csv in the calibration/ subdirectory.

If a POLARIZATION intent is present, the parallactic angle coverage of each polarization session is shown graphically and reported quantitatively.

Parameters:
  • vis --

    List of visibility data files. These may be ASDMs, tar files of ASDMs, MSes, or tar files of MSes. If ASDM files are specified, they will be converted to MS format.

    Example: vis=['X227.ms', 'asdms.tar.gz']

  • session --

    List of session names, one for each visibility dataset, used to group the MSes into sessions.

    Example: session=['session_1', 'session_2']

  • asis -- Creates verbatim copies of the ASDM tables in the output MS. The value given to this option must be a list of table names separated by space characters.

  • process_caldevice -- Import the caldevice table from the ASDM.

  • overwrite --

    Overwrite existing files on import; defaults to False. When converting ASDM to MS, if overwrite=False and the MS already exists in the output directory, then this existing MS dataset will be used instead.

    Example: overwrite=True

  • nocopy --

    Disable copying of MS to working directory; defaults to False.

    Example: nocopy=True

  • bdfflags -- Apply BDF flags on import.

  • datacolumns --

    Dictionary defining the data types of existing columns. The format is:

    {'data': 'data type 1'}

    or

    {'data': 'data type 1', 'corrected': 'data type 2'}.

    For ASDMs the data type can only be RAW and one can only specify it for the data column. For MSes one can define two different data types for the DATA and CORRECTED_DATA columns and they can be any of the known data types (RAW, REGCAL_CONTLINE_ALL, REGCAL_CONTLINE_SCIENCE, SELFCAL_CONTLINE_SCIENCE, REGCAL_LINE_SCIENCE, SELFCAL_LINE_SCIENCE, BASELINED, ATMCORR). The intent selection strings _ALL or _SCIENCE can be skipped. In that case the task determines this automatically by inspecting the existing intents in the dataset. Usually, a single datacolumns dictionary is used for all datasets. If necessary, one can define a list of dictionaries, one for each EB, with different setups per EB. If no types are specified, {'data':'raw','corrected':'regcal_contline'} or {'data':'raw'} will be assumed, depending on whether the corrected column exists or not.

  • lazy -- Use the lazy filler import.

  • dbservice -- Use the online flux catalog.

  • ocorr_mode -- ALMA default set to ca.

  • createmms -- Create an MMS.

  • minparang -- Minimum required parallactic angle range for polarisation calibrator, in degrees. The default of 0.0 is used for non-polarisation processing.

  • parallel --

    Process multiple MeasurementSets in parallel using the casampi parallelization framework.

    Options: 'automatic', 'true', 'false', True, False

    Default: None (equivalent to False)

Notes

QA Scoring

Poor QA scores result from conditions including missing scan intents or calibrator positions, out-of-date IERS table, or previously processed data. A QA score of 0.9 is given for high-frequency data (Bands 9 or 10). For the flux database query, the score is 0.3 if the database value could not be used and the flux for any spw is from the ASDM, 0.5 if the query returned a warning or had a value older than 14 days, otherwise 1.0. A QA score of 0.60 results if the parallactic angle coverage is less than 60 degrees.

Returns:

The results object for the pipeline task is returned.

Examples

  1. Load an ASDM list in the ../rawdata subdirectory into the context:

>>> hifa_importdata(vis=['../rawdata/uid___A002_X30a93d_X43e', '../rawdata/uid_A002_x30a93d_X44e'])
  1. Load an MS in the current directory into the context:

>>> hifa_importdata(vis=['uid___A002_X30a93d_X43e.ms'])
  1. Load a tarred ASDM in ../rawdata into the context:

>>> hifa_importdata(vis=['../rawdata/uid___A002_X30a93d_X43e.tar.gz'])
  1. Import a list of MeasurementSets:

>>> myvislist = ['uid___A002_X30a93d_X43e.ms', 'uid_A002_x30a93d_X44e.ms']
>>> hifa_importdata(vis=myvislist)
  1. Run with explicit setting of data column types:

>>> hifa_importdata(vis=['uid___A002_X30a93d_X43e_targets.ms'], datacolumns={'data': 'regcal_contline'})
>>> hifa_importdata(vis=['uid___A002_X30a93d_X43e_targets_line.ms'],
...                    datacolumns={'data': 'regcal_line', 'corrected': 'selfcal_line'})