hifa_exportdata

hifa_exportdata(vis: list[str] = None, session: list[str] = None, imaging_products_only: bool = None, exportmses: bool = None, tarms: bool = None, pprfile: list[str] = None, calintents: str = None, calimages: list[str] = None, targetimages: list[str] = None, products_dir: str = None) Results[source]

Export pipeline data products to the products/ directory.

Moves calibration tables, calibrator images (FITS format), and other pipeline products from the pipeline working/ directory to the products/ directory. For combined calibration and imaging runs, an intermediate calibration-only WebLog tar file is also created.

If the hifa_polcal recipe is not specified in the pipeline context in casa_pipescript.py, the polarization calibrator image FITS files are not exported in this step.

The following products are exported:

  • an XML file containing the pipeline processing request

  • a tar file per ASDM/MS containing the final flags version

  • a text file per ASDM/MS containing the final calibration apply list

  • a FITS image for each selected calibrator source image

  • a FITS image for each selected science target source image (imaging runs only)

  • a cont.dat file from hif_findcont (imaging runs only)

  • a tar file per session containing the caltables for that session

  • a tar file containing the WebLog

  • a text file containing the final list of CASA commands

  • an XML manifest file listing all products

  • an XML aquareport file listing QA scores, sub-scores, image sensitivities, and other numerical information

Parameters:
  • vis -- List of visibility data files for which flagging and calibration information will be exported. Defaults to the list maintained in the pipeline context. Example: vis=['X227.ms', 'X228.ms']

  • session -- List of sessions one per visibility file. Currently defaults to a single virtual session containing all the visibility files in vis. In the future, this will default to the set of observing sessions defined in the context. Example: session=['session1', 'session2']

  • imaging_products_only -- Export science target imaging products only

  • exportmses -- Export the final MeasurementSets instead of the final flags, calibration tables, and calibration instructions.

  • tarms -- Tar final MeasurementSets

  • pprfile -- Name of the pipeline processing request to be exported. Defaults to a file matching the template 'PPR_*.xml'. Example: pprfile=['PPR_GRB021004.xml']

  • calintents -- List of calibrator image types to be exported. Defaults to all standard calibrator intents, 'BANDPASS', 'PHASE', 'FLUX'. Example: 'PHASE'

  • calimages -- List of calibrator images to be exported. Defaults to all calibrator images recorded in the pipeline context. Example: calimages=['3C454.3.bandpass', '3C279.phase']

  • targetimages -- List of science target images to be exported. Defaults to all science target images recorded in the pipeline context. Example: targetimages=['NGC3256.band3', 'NGC3256.band6']

  • products_dir -- Name of the data products subdirectory. Defaults to './'. Example: products_dir='../products'

Notes

QA = 1.0 if all standard products were successfully copied to the products/ directory; QA = 0.0 otherwise.

Returns:

The results object for the pipeline task is returned.

Examples

  1. Export the pipeline results for a single session:

>>> import os; os.makedirs('../products', exist_ok=True)
>>> hifa_exportdata(products_dir='../products')
  1. Export results saving only gain calibrator images:

>>> import os; os.makedirs('../products', exist_ok=True)
>>> hifa_exportdata(products_dir='../products', calintents='*PHASE*')