|
Developer Documentation |
|||||||||
prev file | next file | ||||||||||
SUMMARY: fields | routine DETAILS: routine | ||||||||||
./toolbox dofullsigref.pro
dofullsigref |
procedure dofullsigref, result, sigwcal, sig, refwcal, ref[, smoothref][, avgref], [/signocal], [tsys=float], [tau=float], [tcal=float], [retsigtsys=variable], retreftsys=retreftsys |
This procedure calibrates a single integration using four different uncalibrated spectrum data containers.
One pair of data containers are from the signal (source) and the other pair are the reference set of data containers. Within each pair, one spectrum has signal from the cal and the other does not.
See dototalpower and dosigref for details about each step.
The user can optionally over-ride the reference system temperature calculated in dototalpower and used in dosigref by supplying a value for the tsys and tau keywords here. tsys is the system temperate at tau=0. If the user supplies this keyword, tsys is first adjusted to the elevation of the reference spectrum :
tsys_used = tsys*exp(tau/sin(elevation).If tau is not supplied, then the get_tau function is used, using the reference observed_frequency to arrive at a very rough guess as to the zenith opacity, tau. Users are encouraged to supply tau when they also supply tsys to improve the accuracy of this calculation. The adjusted tsys then becomes the reference spectrum's tsys value for use in dosigref.
The units of result is "Ta". Use dcsetunits to change these units to something else.
This is used primarily by getsigref and this code does almost no argument checks or sanity checks. The calling routine is expected to check that the 4 input spectra are compatible (all are valid data containers and all have the same number of data points).
It is the responsibility of the caller to ensure that result is freed using data_free when it is no longer needed (i.e. at the end of all anticipated calls to this function before returning to the calling level). Failure to do that will result in memory leaks. It is not necessary to free these data containers between consecutive calls to this function at the same IDL level (e.g. inside the same procedure).
Keywords | |
signocal |
If set, then there is no CAL data for the sig state. sigwcal argument is ignored, only the sig argument is used as is. |
tsys |
tsys at zenith, this is converted to a tsys at the observed elevation. If not suppled, the tsys for each integration is calculated as described elsewhere. |
tau |
tau at zenith, if not supplied, it is estimated using get_tau tau is only used when the requested units are other than the default of Ta and when a user-supplied tsys value at zenith is to be used. |
tcal |
Cal temperature (K) to use in the Tsys calculation. If not supplied, the mean_tcal value from the header of the cal_off switching phase data in each integration is used. This must be a scalar, vector tcal is not yet supported. |
retsigtsys |
The reference Tsys used here. The signal Tsys calculated here. If tsys is supplied, then retsigtsys is equal to retreftsys. The signal Tsys is not actually used, mearly calculated and reported back through this keyword. |
retreftsys |
. |