Produced by IDL 7.1.1
User Documentation

./toolbox
donod.pro

Last modification date:
Wed Sep 28 13:27:11 2016

donod

procedure donod, result, s1_b1_off, s1_b1_on, s2_b1_off, s2_b1_on, s1_b2_off, s1_b2_on, s2_b2_off, s2_b2_on[, smoothref][, ret_tsys], [/avgref], [tsys=float], [tau=float], [tcal=float], [/eqweight], [single_beam=variable]

This procedure calibrates a single integration from a Nod scan pair.

An integration in each scan in a standard Nod scan pair contains data from two beams (b1 and b2 here). And the data from each beam contains one spectrum with the cal on and one with no cal. There are then 8 spectra to be combined here. This assumes that data identified with scan 1 (s1) here has the signal data in beam 1 and the reference data in beam 2. Then in scan 2 (s2) the reference data is beam 1 and the signal data is in beam 2.

See dototalpower and dosigref for details about each step.

The returned tsys (ret_tsys) are the 4 system temperatures calculed in the first step (from dototalpower). They are, in order, the system temperatures from scan 1 and beam 1 (signal in scan 1), scan 1 and beam 2 (reference in scan 1), scan 2 and beam 1 (reference in scan 2) and scan 2 and beam 2 (signal in scan 2). The system temperature in the result is a weighted combination of the two reference system temperatures as described in dcaccum.

The user can optionally over-ride the system temperatures 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. In that case, the returned tsys values are the corrected, user-supplied tsys values using the elevation from the appropriate scan.

The units of result is "Ta". Use dcsetunits to change these units to something else.

This is used primarily by getnod and this code does almost no argument checks or sanity checks. The calling routine is expected to check that the 8 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).

Version
$Id$

Parameters
result
out, required
variable
This is the resulting data container.
s1_b1_off
in, required
spectrum
An uncalibrated spectrum from feed 0 (source/tracking feed) in scan 1 with the cal off.
s1_b1_on
in, required
spectrum
An uncalibrated spectrum from feed 0 (source/tracking feed) in scan 1 with the cal on.
s2_b1_off
in, required
spectrum
An uncalibrated spectrum from feed 0 (reference/non-tracking feed) in scan 2 with the cal off.
s2_b1_on
in, required
spectrum
An uncalibrated spectrum from feed 0 (reference/non-tracking feed) in scan 2 with the cal on.
s1_b2_off
in, required
spectrum
An uncalibrated spectrum from feed 1 (reference/non-tracking feed) in scan 1 with the cal off.
s1_b2_on
in, required
spectrum
An uncalibrated spectrum from feed 1 (reference/non-tracking feed) in scan 1 with the cal on.
s2_b2_off
in, required
spectrum
An uncalibrated spectrum from feed 1 (source/tracking feed) in scan 2 with the cal off.
s2_b2_on
in, required
spectrum
An uncalibrated spectrum from feed 1 (source/tracking feed) in scan 2 with the cal on.
smoothref
in, optional
integer
Boxcar smooth width for reference spectrum. No smoothing if not supplied or if value is less than or equal to 1.
ret_tsys
out, optional
variable
internal use

Keywords
avgref
in, optional
boolean
If set, then the off-signal terms (reference) are assumed to be already averaged and no total power processing of that data is done here. These terms are s1_b2_off, s1_b2_on, s2_b1_off, and s2_b1_on. Of these 4 terms, only s1_b2_off and s2_b1_off are actually used when this keyword is set.
tsys
in, optional
float
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
in, optional
float
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
in, optional
float
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.
eqweight
in, optional
boolean
When set, average the two beams with equal weight, else use default weighting.
single_beam
out, optional
variable
When set, one of the two beams was blanked. Useful for reporting back to the user.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:39 2016