Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
![]() | Version 1.9 Build 1367 |
|
The heart of the DCR Tool is the getscan function. It is used to mine the Measurement Set and return the data for a given scan into a simple Glish record, which can then be used for analysis using the large suite of functions and tools available. The getscan function has only two parameters, the scan number and (optionally) a focus parameter. Focus values may take up to several seconds to extract from the data, so they are not returned by default. The syntax for simple use of getscan (without focus data) is as follows:
- scan1 := mydcr.getscan(1)
This creates a Glish record structured as follows:
double scan1.time record scan1.GO_header double scan1.GO_header.TIME double scan1.GO_header.INTERVAL string scan1.GO_header.SCAN string scan1.GO_header.PROJID string scan1.GO_header.SOURCE string scan1.GO_header.SCANID string scan1.GO_header.FITSVER string scan1.GO_header.OBSERVER string scan1.GO_header.PROCNAME string scan1.GO_header.PROCTYPE integer scan1.GO_header.PROCSEQN integer scan1.GO_header.PROCSIZE string scan1.GO_header.RADECSYS double scan1.GO_header.RAJ2000 double scan1.GO_header.DECJ2000 double scan1.GO_header.EQUINOX double scan1.GO_header.CNTRFREQ string scan1.GO_header.SWTCHSIG integer scan1.scan float scan1.data float scan1.lpc_az1 float scan1.lpc_az2 float scan1.lpc_el record scan1.pmodel string scan1.pmodel.FITSVER float scan1.pmodel.DELTAUTC float scan1.pmodel.IERSPMX float scan1.pmodel.IERSPMY float scan1.pmodel.MNTOFFAZ float scan1.pmodel.MNTOFFEL float scan1.pmodel.LPC_AZ1 float scan1.pmodel.LPC_AZ2 float scan1.pmodel.LPC_EL string scan1.pmodel.PNTMODEL float scan1.pmodel.PNTAZD00 float scan1.pmodel.PNTAZB01 float scan1.pmodel.PNTAZD01 float scan1.pmodel.PNTAZA11 float scan1.pmodel.PNTAZB11 float scan1.pmodel.PNTAZC21 float scan1.pmodel.PNTAZD21 float scan1.pmodel.PNTELD00 float scan1.pmodel.PNTELC10 float scan1.pmodel.PNTELD10 float scan1.pmodel.PNTELB01 float scan1.pmodel.PNTELD01 string scan1.pmodel.DIABMODE string scan1.pmodel.POLARMTN string scan1.pmodel.COSVMODE float scan1.pmodel.AMBTEMP float scan1.pmodel.AMBPRESS float scan1.pmodel.AMBHUMID string scan1.pmodel.OPTICSMD string scan1.pmodel.FOCTRMOD string scan1.pmodel.FOCPATM double scan1.az double scan1.el double scan1.ra double scan1.dec
In fields where it is appropriate, the values are stored in arrays. For example, scan1.time is an array containing the time for each of the samples in the scan. The data are in scan1.data, which is a 3-D array with the first index pointing to receiver, the second to phase, and the third to the sample number. The third sample from receiver 0 and phase 1 would then be accesses as Glish value scan1.data[0,1,3].
The full syntax of the getscan function is:
scan1 := mydcr.getscan(scan,getFocus=F)
The getFocus parameter can be omitted to pass the default F value. If set to T, the relevant focus arrays will be included into the returned record. For prime focus observations, these are:
string scan1.focusparam string scan1.optics float scan1.PF_FOCUS float scan1.PF_ROTATION float scan1.PF_X
and for gregorian focus observations, these are:
string scan1.focusparam string scan1.optics float scan1.SR_XP float scan1.SR_YP float scan1.SR_ZP float scan1.SR_XT float scan1.SR_YT float scan1.SR_ZT
The focusparam field in the returned record is an indicator to which focus values are available in the given record. For the cases above, scan1.focusparam has the value 'all'. It is possible to load only one focus parameter into the returned record by sending the desired parameter in the getscan function. For example:
scan3 := md.getscan(3,'PF_FOCUS')
This getscan call produces scan3.focusparam equal to 'PF_FOCUS' and a single entry in the record for focus:
float scan3.FOCUS
The following commands, then, show a way to plot the focus values separately from the canned focus procedures in the DCR tool:
- md := dcr('pnt_prime_12_DCR') - scan2030 := md.getscan(2030,'PF_FOCUS') - pg.ploty(scan2030.FOCUS)