Usage of computeDurationOfScan
Return to directory of Todd's CASA extensions
This function is used by
timeOnSource() to empirically determine the number of
subscans and the total duration of all the subscans of a particular scan.
Usage
au.computeDurationOfScan(scanNumber, t=None, vis=None, returnSubscanTimes=False, verbose=False)
Inputs:
- scanNumber = the scan number, simply for generating a file list of timestamps
- t = a sequence of integration timestamps (as from msmd.timesforscans(1)), optional for casa >= 4.1.0
- vis = the name of the measurement set (not necessary if t is given)
Returns:
1) duration in seconds
2) the number of subscans
and if returnSubscanTimes==True
3) the begin/end timestamps of each subscan (in MJD seconds)
Examples:
CASA <1>: au.computeDurationOfScan(1, vis='uid___A002_X6b15c4_X56f.ms')
Out[1]: (17.279994964599609, 3)
CASA <2>: msmd.open('uid___A002_X6b15c4_X56f.ms')
CASA <3>: au.computeDurationOfScan(1, msmd.timesforscan(1))
Out[3]: (17.279994964599609, 3)
CASA <4>: au.computeDurationOfScan(1, msmd.timesforscan(1), returnSubscanTimes=True)
Out[4]:
(17.279994964599609,
3,
{1: [4881277289.4000006, 4881277295.1119995],
2: [4881277297.1760006, 4881277302.8879995],
3: [4881277304.9520006, 4881277310.6639996]})
--
ToddHunter - 2013-09-21