Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
![]() | Version 1.9 Build 1367 |
|
The following functions are available in the DCR tool. The syntax provided in this guide is such that if a parameter has no assignment then there is no default value and it must be supplied by the user. If an assignment is shown, then the default value is listed. So for example, a call to the baselinefit function may omit the last parameter, plotflag, and it will be read as T, but the four preceding parameters must be supplied by the user.
baselinefit(xarray,yarray,ord,range,plotflag=T) Example: md.baselinefit(chan,tant,3,[10,100,350,512]) Returns: Baseline-subtracted arrayFit a baseline. xarray and yarray are the data to be fit (for example, the channel number and antenna temperature arrays), ord is the order of the polynomial to fit, and range is the range of channels to fit, in the same units as the xarray data. If plotflag is T, the residuals will be plotted.
done() Example: md.done()End the given instance of the DCR tool.
focus(tablename) Example: md.focus('focusvals.txt') -- sample focusvals.txt -- 1.0 6.7 1.4 6.9 1.8 7.4 2.2 7.3 2.6 7.0 3.0 6.4 3.4 6.0 -- end --Focus reduction. This routine is still under development. Focus observations are expected to happen as a sequence of pointing scans, with the focus being incremented between each pointing scan. The result is a table of focus positions and peak brightness values. This routine simply reads in an ASCII table with those values and fits a parabola to them, reporting the peak. For now, the ASCII table must be created by hand and it must have no blank rows or information other than the focus position (Column 1) and peak brightness (Column 2).
focusScan(scan,receiver=0,cal_value=1,param='SR_XP',order=2,archive=F) Example: md.focusScan(114,cal_value=3.2,param='PF_FOCUS',order=2,archive=T)Focus scan reduction. This routine reduces and displays the data from a classical focus scan, in which a source is tracked and the signal strength is measured as the focus value is scanned through a range of values. Any of the 9 focus parameters may be reduced with this routine. Specify which focus to use via the param value, which can be SR_XP, SR_YP, SR_ZP, SR_XT, SR_YT, SR_ZT, PF_X, PF_ROTATION, or PF_FOCUS. The order parameter specifies the order of the polynomial to fit, and the archive parameter specifies whether the results will be appended to an ASCII file on disk, called focus.dat.
gauss(xarray,yarray,height,width,center,plotflag=1) Example: md.gauss(RA_array,Tant,10,3.5,214.5)Fit a gaussian. The parameters xarray and yarray specify the x- and y-data arrays to be fit. The next three parameters are initial guesses for the height, width, and center of the gaussian, in the same units as the xarray and yarray entries (as appropriate). The plotflag parameter specifies whether the result will be drawn over the existing plot.
get_tant(scan,receiver=1,cal_value=1) Example: md.get_tant(115,cal_value=3.2)Return array of antenna temperatures.
getGO(scan) Example: md.getGO(114)Return GO header. Many of the setup parameters are listed in the GO header. This function returns a record containing those fields.
getscan(scan,getFocus=F) Example: md.getscan(114)Returns data associated with the given scan. See the discussion above.
guessmode(scan) Example: md.guessmode(114)Guess observing mode. By looking at the number of phases and receivers, this function attempts to determine the switching scheme. This is outdated since an entry in the GO header now gives the scheme directly.
listscans() Example: md.listscans()List scannumbers.
plot_focus_time(scan,param='SR_XP') Example: md.plot_focus_time(122,'PF_FOCUS')Plot focus value against time.
plot_gain_time(scan,receiver) Example: md.plot_gain_time(114,0)Plot gain against time.
plot_phase_dec(scan,receiver,phase) Example: md.plot_phase_dec(114,0,1)Plot data in counts, for a given receiver and phase, against declination.
plot_phase_ra(scan,receiver,phase) Example: md.plot_phase_ra(114,0,1)Plot data in counts, for a given receiver and phase, against RA.
plot_phase_time(scan,receiver,phase) Example: md.plot_phase_time(114,0,1)Plot data in counts, for a given receiver and phase, against time.
plot_RA_Dec(scan) Example: md.plot_RA_Dec(112)Plot declination as a function of RA for each sample in the scan.
plot_sidelobe(scan,receiver=1,basepct=10,bottom=-70) Example: md.plot_sidelobe(92,0,15)Plot sidelobes on the standard axes. This function plots sidelobes in dB, in the standard manner, for a given scan. A strong source gives the best results. The basepct parameter is a fraction of the total number of samples, measured from each edge, to be used in determining a baseline. For example, in a scan with 600 samples, a basepct=10 would use 60 samples at each edge to determine the baseline. The bottom parameter is the lower limit, in dB, to be used on the plot. Experiment with several values in the range, say, [-80,-40] to get a satisfactory result.
plot_tant_Dec(scan,receiver=1,cal_value=1) Example: md.plot_tant_Dec(112, cal_value=3.2)Plot antenna temperature as a function of declination.
plot_tant_RA(scan,receiver=1,cal_value=1) Example: md.plot_tant_RA(112, cal_value=3.2)Plot antenna temperature as a function of RA.
plot_tant_time(scan,receiver=1,cal_value=1) Example: md.plot_tant_time(112)Plot antenna temperature as a function of time.
plot_tsrc_time(scan,receiver,cal_value=1) Example: md.plot_tsrc_time(112)Plot source temperature as a function of time.
plotscans(bscan,escan,rcvr=0,phase=0) Example: md.plotscans(112,114)Plot raw data for a given phase and receiver, concatenated over several scans. The bscan and escan parameters specify the beginning and ending scan numbers for the sequence.
point1(scan,receiver,xaxis=0,cal_value=1,basepct=10,plotflag=1,archive=F) Example: md.point1(14,1,archive=T)Reduce a pointing scan. This function determines the antenna temperature for the given scan, removes a baseline, fits a gaussian, and determines the Az and El offsets required to peak up the pointing. The parameter xaxis tells whether the scan is in RA (xaxis=1) or Dec (xaxis=2). If left to the default value of xaxis=0, the function will attempt to determine which is the applicable one. It is almost always safe to use xaxis=0. The basepct parameter indicates the fraction of samples to use, from each edge, in determining the baseline. A value of 10, for example, indicates that 10% of the scan should be used from each edge, for a total of 20% of the samples used to determine the baseline. If plotflag is F, the gaussian fit will not be shown. If archive is T, a listing of the results will be saved to the pointing.dat archive file on disk.
point2(scan,receiver,cal_value=1,plotflag=1) Example: md.point2(101,0)Reduce a pair of pointing scans. Pointing scans generally come in pairs, with the telescope first moving in one direction, then back. This function reduces each of the two scans using point1, then plots both and reports the required Az and El corrections from the average. If plotflag is F, no plotting is done.
point4(scan,receiver,cal_value=1,plotflag=1) Example: md.point2(101,0)Reduce a group of four pointing scans. A complete pointing sequence often includes a pair of RA scans followed by a pair of Dec scans. This function reduces each of the four scans using point1, then plots them and reports the required Az and El corrections from the averages. If plotflag is F, no plotting is done.
radec_to_azel(mjd,ra2000='0h0m0s',dec2000='0d0m0s') Example: md.radec_to_azel(52138.5633,'12h00m00s','10d0m0s')Converts RA and Dec to Az and El for the position of the GBT. The mjd parameter is the mean Julian Date, in days. RA and Dec are in J2000 coordinates. The returned value is an AIPS++ measure giving Az and El. The m0.value return value is RA, and m1.value is Dec.
scanSummary() Example: md.scanSummary()Summarize the current scan. This function prints header information for the scan currently selected, or most recently read with the getscan function.
test_srp(scan,receiver,phase) Example: md.test_srp(114,0,1)Test for the existence of a given scan, receiver, phase combination. This function is mostly used internally, but may be of use for external analysis.
tsys(scan,receiver) Example: md.tsys(114,0)Calculate system temperature. Returns an array.