suncasa.utils.mstools

Attributes

tasks

split

tclean

casalog

clearcal

gaincal

tools

tbtool

mstool

qatool

tb

ms

qa

Functions

get_bandinfo(msfile[, spw, returnbdinfo, verbose])

get center frequencies of all spectral windows for msfile

get_bmsize(cfreq[, refbmsize, reffreq, minbmsize])

get beamsize at frequencies definded by cfreq based on refbmsize at reffreq

get_trange(msfile)

time2filename(msfile[, timerange, spw, desc])

msclearhistory(msfile)

Clears history in the a measurement sets file

clearflagrow(msfile[, mode])

splitX(vis[, datacolumn2])

flagcaltboutliers(caltable[, limit])

modeltransfer(msfile[, spw, reference, transfer])

concat_slftb([tb_in, tb_out])

gaincalXY([vis, caltable, pols, msfileXY, gaintableXY])

getmodel(vis[, spw])

putmodel(vis[, spw, model])

sort_polarization_order(msfile, outputvis)

Sort the polarization order in a measurement set to match the conventional order (XX, XY, YX, YY).

Module Contents

suncasa.utils.mstools.tasks[source]
suncasa.utils.mstools.split[source]
suncasa.utils.mstools.tclean[source]
suncasa.utils.mstools.casalog[source]
suncasa.utils.mstools.clearcal[source]
suncasa.utils.mstools.gaincal[source]
suncasa.utils.mstools.tools[source]
suncasa.utils.mstools.tbtool[source]
suncasa.utils.mstools.mstool[source]
suncasa.utils.mstools.qatool[source]
suncasa.utils.mstools.tb[source]
suncasa.utils.mstools.ms[source]
suncasa.utils.mstools.qa[source]
suncasa.utils.mstools.get_bandinfo(msfile, spw=None, returnbdinfo=False, verbose=False)[source]

get center frequencies of all spectral windows for msfile spw: [option] return the cfreq of spw. spw can be a a string or a list of string. The syntax of spw follows the standard spw Parameter in CASA if spw is not provided, return the cfreq of all spws in the msfile. return cfreqs is in GHz if returnbounds is True, return a dictionary including comprehensive freq information of the ms.

suncasa.utils.mstools.get_bmsize(cfreq, refbmsize=70.0, reffreq=1.0, minbmsize=4.0)[source]

get beamsize at frequencies definded by cfreq based on refbmsize at reffreq cfreq: input frequencies at GHz refbmsize: reference beam size in arcsec reffreq: reference frequency in GHz minbmsize: minimum beam size in arcsec

suncasa.utils.mstools.get_trange(msfile)[source]
suncasa.utils.mstools.time2filename(msfile, timerange='', spw='', desc=False)[source]
suncasa.utils.mstools.msclearhistory(msfile)[source]

Clears history in the a measurement sets file

Parameters:

msfile – string The name of a measurement sets file

Returns:

suncasa.utils.mstools.clearflagrow(msfile, mode='clear')[source]
Parameters:
  • msfile

  • mode – FLAG_ROW operation

default: ‘clear’: (default) clear the FLAG_ROW

‘list’: to list existing FLAG_ROW

Returns:

suncasa.utils.mstools.splitX(vis, datacolumn2='MODEL_DATA', **kwargs)[source]
suncasa.utils.mstools.flagcaltboutliers(caltable, limit=[])[source]
suncasa.utils.mstools.modeltransfer(msfile, spw='', reference='XX', transfer='YY')[source]
suncasa.utils.mstools.concat_slftb(tb_in=[], tb_out=None)[source]
suncasa.utils.mstools.gaincalXY(vis=None, caltable=None, pols='XXYY', msfileXY=None, gaintableXY=None, **kwargs)[source]
suncasa.utils.mstools.getmodel(vis, spw=None)[source]
suncasa.utils.mstools.putmodel(vis, spw=None, model=None)[source]
suncasa.utils.mstools.sort_polarization_order(msfile, outputvis)[source]

Sort the polarization order in a measurement set to match the conventional order (XX, XY, YX, YY).

Parameters:
  • msfile (str (optional)) – Path to the input measurement set file. defaults to None

  • outputvis (str (optional)) – Path to the output measurement set file where the sorted data will be stored. defaults to None

Raises:
  • OSError – If the output file cannot be created or copying fails.

  • Exception – If an error occurs while processing the CASA tables.

Returns:

None

Return type:

None