Examples

To compute and apply calibrations to a single-dish dataset that include explicit observations of an "OFF" position, as well as $T_{sys}$ calibration:

sdcal(infile = 'uid___A002_Xb66884_Xdc3.ms', outfile = 'uid___A002_Xb66884_Xdc3.ms.sky', calmode = 'ps,tsys,apply')

To build the calibration tables separately and apply them later:

sdcal(infile = 'uid___A002_Xb66884_Xdc3.ms', outfile = 'uid___A002_Xb66884_Xdc3.ms.tsys',calmode = 'tsys')

sdcal(infile = 'uid___A002_Xb66884_Xdc3.ms', outfile = 'uid___A002_Xb66884_Xdc3.ms.sky',calmode = 'ps')

applycal(vis = 'uid___A002_Xb66884_Xdc3.ms', applymode = 'calflagstrict', spw = '17,19,21,23', gaintable = ['uid___A002_Xb66884_Xdc3.ms.tsys', 'uid___A002_Xb66884_Xdc3.ms.sky'], gainfield = ['nearest', str(fid)],  spwmap = tsysmap)

Note, a $T_{sys}$ calibration table can also be generated by the task, gencal. The first command in the above example is equivalent to:

gencal(vis = 'uid___A002_Xb66884_Xdc3.ms', caltable = 'uid___A002_Xb66884_Xdc3.ms.tsys', caltype = 'tsys')