You are here: NRAO Public Wiki>Main Web>TWikiUsers>JimBraatz>GBTIDLCalibrationDesign (2007-11-06, JimBraatz)
Edit wiki text
Edit
Attach
Print version

- Tcal and Tsys will be changed from scalar values to vector quantities, where both Tcal and Tsys are functions of frequency (Tcal[freq] and Tsys[freq])
- Aperture efficiency will be implemented as a 2-D vector, where ap_eff is a function of frequency and elevation (ap_eff[freq,elv])
- Zenith opacity will be implemented as a vector, where tau is a function of frequency and time (tau[freq, time]).

- The sdfits program will be modified to determine appropriate Tcal, ap_eff and tau, and write these values to a database. The program will remain unchanged from the user's perspective. No new parameters are required in the sdfits program. All new functionality is "under the hood".

- The following new GBTIDL procedures and functions will be developed:

1. set_cal, tau=tau, ap_eff=ap_eff, tcal=tcal, /default This procedure writes new values into the calibration database. The parameters tau, ap_eff, and tcal are used to enter new calibration information. Each of these parameters is optional, but at least one must be supplied unless the /default switch is set. Each parameter can accept either a scalar value, in which case the value is applied to all frequencies, times, and elevations, or it can accept a structure, defined as follows: tau : tau.time, tau.freq[], tau.value[freq] tau.time is the starting time for which the specified tau values will be applied. tau.freq is an array of frequencies for which zenith opacity is specified in tau.value. tau.value is the array of opacity values, one for each frequency. Opacity values used in calibration will be interpolated from this curve by the calibration procedures. ap_eff : ap_eff.elv[], ap_eff.freq[], ap_eff.value[freq, elv] ap_eff.elv is an array of elevations for which the ap_eff is specified. ap_eff.freq is an array of frequencies for which the ap_eff is specified. ap_eff.value is the 2-d array of aperture efficiencies, one for each frequency and elevation. tcal : tcal.freq[], tcal.value[n_feed, n_pol, freq] tcal.freq is an array of frequencies for which the tcal is specified. tcal.value is the array of calibration temperatures, one for each frequency, feed, and polarization. 2. get_cal(scan=scan, time=time, /tau, /ap_eff, /tcal) This function returns calibration values from the database. Exactly one of the switches (tau, ap_eff, or tcal) should be set. If the user requests tau values and there are tau values in the database for more than one time, then the user must also specify either a time or a scan number to the get_cal function. The function returns a structure with the appropriate fields to be fed directly back into set_cal. 3. calc_tcal(scan, ap_eff=ap_eff, tau=tau) This procedure will reduce an observation of a flux calibrator in order to determine the Tcal spectrum. The observer should integrate on one of the accepted flux calibration sources (3C48, 3C286, ...) using the same number of beams and polarizations as in the target observations. The frequency range of the calibration scans should at least cover the range of frequencies observed in the target sources. Wide-bandwidth, low-resolution observing modes are fine for the calibration observations. The Tcal measurements are smoothed to about 1 MHz anyway, so high resolution observations are unnecessary. It should be acceptable to observe flux calibrators using several scans and combine these measurements in the calibration database using several calls to calc_tcal, if necessary. A good starting place for the development of this procedure is ~rmaddale/mypros/getscalquad.pro. We can drop the parts of the routine that determine the non-linearity calibration factors. ap_eff and tau can be scalars or vector functions of frequency. If they are vectors then they should be sent as structures, using the same field names as the tau and ap_eff parameters defined above under the procedure set_cal. Ron notes: it may be necessary for the observer to specify the smoothing factor. Also, for Ka band, a sampler name may be necessary. 4. get_wx_tau(time, freq) Returns tau values from Ron's weather-based calculations. The input for time is a scalar value in MJD and freq can be either a scalar or a vector. If freq is a vector, the function returns tau for each element of the vector.

- Set tau to a single value which will be applied for all frequencies, for all data after time 53850.5 MJD

my_tau = {time = 53850.5, value = 0.022} set_cal, tau=my_tau

- Set tau to a single value which will be applied for all frequencies, for all data from scan 100 forward

gettp, 100 my_time = !g.s[0].mjd my_tau = {time=my_time, value = 0.085} set_cal, tau=my_tau

- Set tau as a function of frequency, for all data starting at the given time

my_time = 53850.5 freq_vector = [22000.0, 22100.0, 22200.0, 22300.0, 22400.0] tau_vector = [0.05, 0.06, 0.075, 0.063, 0.055 ] my_tau = {time=my_time, freq=freq_vector, value=tau_vector} set_cal, tau=my_tau

- Set tau for all scans between 150 and 170. Tau is a function of frequency in this example.

gettp, 150 time_150 = !g.s[0].mjd gettp, 170 time_170 = !g.s[0].mjd default_tau = get_cal(170, /tau) ; the following frequency range should cover all observations freq_vector = [22000.0, 22100.0, 22200.0, 22300.0, 22400.0] tau_vector = [0.05, 0.06, 0.075, 0.063, 0.055 ] my_tau_150 = {time=time_150, freq=freq_vector, value=tau_vector} my_tau_170 = default_tau my_tau_170.time = time_170 set_cal, tau=my_tau_150 set_cal, tau=my_tau_170Note that in this example, it is unclear what get_cal should return in tau.time. Is it the time at the start of the scan, or the time that defines the start period over which the returned tau values are applied? To avoid the ambiguity, the user should explicitly set the time in the my_tau_170 structure before applying the second set_cal.

- Measure Tcal values from an observation of a calibrator, and apply to all spectral scans in the SDFITS file.

my_tcal = calc_tcal(10,ap_eff=0.65,tau=0.05) set_cal, tcal=my_tcalNote in this example, scalar values are used for tau and ap_eff.

- Measure Tcal values from an observation of a calibrator, and apply to all spectral scans in the SDFITS file. Vector values for tau and ap_eff are used this time.

my_tau = get_cal(10,/tau) ; get the tau structure for scan 10 my_tau.freq = [1400.0, 1410.0, 1420.0, 1430.0, 1440.0] my_tau.value = [0.015, 0.017, 0.019, 0.021, 0.024 ] my_ap_eff = get_cal(/ap_eff) ; get the ap_eff structure my_ap_eff.freq = [1400.0, 1440.0] my_ap_eff.elv = [0.0, 30.0, 90.0] my_ap_eff.value = [[0.61,0.60],[0.71,0.70],[0.73,0.73]] my_tcal = calc_tcal(10,ap_eff=my_ap_eff,tau=my_tau) set_cal, tcal=my_tcal

- Tweak a few Tcal values from the default calibration database and apply the tweaked calibration values.

my_tcal = get_cal(/tcal) my_tcal.value[0,0,10] = 4.55 ; feed 0, pol 0, freq 10 my_tcal.value[0,1,10] = 2.97 ; feed 0, pol 1, freq 10 set_cal, tcal=my_tcal

- Erase all user-supplied calibration values and revert to the defaults.

set_cal, /default

- Set a new gain curve.

my_ap_eff = get_cal(/ap_eff) ; get the ap_eff structure my_ap_eff.freq = [22000.0, 23000.0] my_ap_eff.elv = [0.0, 50.0, 90.0] my_ap_eff.value = [[0.51,0.45],[0.62,0.58],[0.61,0.57]] set_cal, ap_eff=my_ap_eff

- Plot data from the calibration database using standard IDL plot tools.

; Retrieve tau and plot it my_tau = get_cal(/tau) ; this works only if the database has tau set once for all times plot, my_tau.freq, my_tau.value, xstyle=1, xtitle='Freq (MHz)', ytitle='Tau (nepers)' ; Retrieve tau for a given scan and plot it my_tau = get_cal(/tau, scan=50) plot, my_tau.freq, my_tau.value, xstyle=1, xtitle='Freq (MHz)', ytitle='Tau (nepers)' ; Plot tcal for each of two feeds and two polarizations my_tcal = get_cal(/tcal) plot, my_tcal.freq, my_tcal.value[0,0,*],xstyle=1, xtitle='Freq (MHz)', ytitle='Tcal (K)' oplot, my_tcal.freq, my_tcal.value[0,1,*], color=!white oplot, my_tcal.freq, my_tcal.value[1,0,*], color=!green oplot, my_tcal.freq, my_tcal.value[1,1,*], color=!yellow ; Plot tcal over a range of frequencies for a given feed and polarization my_tcal = get_cal(/tcal) plot, my_tcal.freq, my_tcal.value[0,0,*],xstyle=1, xtitle='Freq (MHz)', ytitle='Tcal (K)', $ xrange=[22000.0, 23000.0] ; Plot aperture efficiency as a function of elevation for each frequency given in the calibration database my_ap_eff = get_cal(/ap_eff) n_freqs = n_elements(my_ap_eff.freq) plot, my_ap_eff.elv, my_ap_eff.value[*,0] for i=1,n_freqs-1 do $ oplot, my_ap_eff.elv, my_ap_eff.value[*,i], color=!red+i

- Retrieve hourly zenith opacity for a given day, and plot it.

opac = findgen(24) for i=0,23 do $ opac[i] = get_wx_tau(53510.0+float(i)/24.0, 22235.080) plot, opac

- This document does not address the details of how vector calibration quantities will be implemented in the GBTIDL calibration routines.
- Ron plans on adding a CLI to the cleo weather forecast application so that we can access it from GBTIDL.
- We plan to add the capability to process tipping scans. Initially the capability will be re-implemented as part of GFM and eventually a GBTIDL procedure will be added.
- For frequency-dependent calibration parameters Tcal, Tsys, ap_eff and tau, we need to decide whether the default frequency spacing will be a fixed or user-configurable value. If the latter, then the sdfits program will need a new parameter to allow setting the frequency spacing.

Edit | Attach | Print version | History: r12 < r11 < r10 < r9 | Backlinks | View wiki text | Edit wiki text | More topic actions

Topic revision: r12 - 2007-11-06, JimBraatz

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Ideas, requests, problems regarding NRAO Public Wiki? Send feedback

Ideas, requests, problems regarding NRAO Public Wiki? Send feedback