Produced by IDL 7.1.1
User Documentation

./contrib
getkanod.pro

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

A collection of procedures for reducing Ka NOD data. The primary procedure here is 'getkanod'.

Contributed By: Frank Ghigo, NRAO-GB

Routine Summary  5 routines

procedure ph_accum, x, cal, sig, q, tinteg, s_acc, ncnt

ph_accum accumulates all integrations for a particular phase;

procedure getphases, scan, ifnum, bmb, q, tinteg, s_off, s_on, r_off, r_on

Get the average of all 4 phases of data from !g.

procedure getkaphases, scan, ifnum, bmb, q, ref, asig, acal, aref, tinteg

Collect data for two successive scans for one beam.

procedure ka_dual_scp_1cal, info, scan, ifnum, bm1, bm2, tcal, q, sref, noav

standard case for KA-band beam-switched dual beam spectra.

procedure getkanod, scan, ifnum, [tau=float], [ap_eff=float], [trk_beam=integer], [tcal=float], [scal=float], [q=integer], [calfile=string], [sref=integer], [noav=integer]

getkanod retrieves and calibrates a "nod" pair for the KA-band receiver.

Routine Details

ph_accum

procedure ph_accum, x, cal, sig, q, tinteg, s_acc, ncnt

ph_accum accumulates all integrations for a particular phase;

Version
$Id$

Parameters
x
in, required
array of spectrum DCs
The data containers to use in the accumulation.
cal
in, required
integer
The cal_state to select from x.
sig
in, required
integer
The sig_state to select from x.
q
in, required
integer
The first integration to use in the accumulation.
tinteg
out
variable
The total integration time.
s_acc
out
variable
The result, the average of the accumulated data.
ncnt
out
variable
The number of integrations in this accumulation.

getphases

procedure getphases, scan, ifnum, bmb, q, tinteg, s_off, s_on, r_off, r_on

Get the average of all 4 phases of data from !g.lineio at once for given ifnum and beam.

Uses
ph_accum

Parameters
scan
in, required
integer
The desired scan number.
ifnum
in, required
integer
The desired IF number.
bmb
in, required
integer
The desired feed (beam).
q
in, required
integer
The first integration to use in the averages.
tinteg
out
variable
The total integration time for each phase.
s_off
out
variable
The average for the cal_off, sig phase.
s_on
out
variable
The average for the cal_on, sig phase.
r_off
out
variable
The average for the cal_off, ref phase.
r_on
out
variable
The average for the cal_on, ref phase.

getkaphases

procedure getkaphases, scan, ifnum, bmb, q, ref, asig, acal, aref, tinteg

Collect data for two successive scans for one beam. If ref eq 0 then assume this is the tracking beam. If ref eq 1 then this is the reference beam.

Uses
getphases

Parameters
scan
in, required
integer
The first scan number in the pair.
ifnum
in, required
integer
The desired IF number.
bmb
in, required
integer
Feed (beam).
q
in, required
integer
The first integration number to use.
ref
in, required
integer
When this is 0, bmb is the tracking beam, otherwise bmb is the reference beam.
asig
out
variable
.
acal
out
variable
.
aref
out
variable
.
tinteg
out
variable
Total integration time.

ka_dual_scp_1cal

procedure ka_dual_scp_1cal, info, scan, ifnum, bm1, bm2, tcal, q, sref, noav

standard case for KA-band beam-switched dual beam spectra.

this should work for not beam-switching as well!!

Uses
getkaphases

Parameters
info
in, required
scan info structure
Not used here.
scan
in, required
integer
The first scan number in the pair.
ifnum
in, required
integer
The desired IF number.
bm1
in, required
integer
Feed (beam) 1.
bm2
in, required
integer
Feed (beam) 2.
tcal
in, required
float
The Tcal value, used when sref eq 0.
q
in, required
integer
The first integration number to use.
sref
in, required
integer
When eq 0, then normalize by cal, else normalize by ref.
noav
in, required
integer
If ge 1 then don't average the two beams.

getkanod

procedure getkanod, scan, ifnum, [tau=float], [ap_eff=float], [trk_beam=integer], [tcal=float], [scal=float], [q=integer], [calfile=string], [sref=integer], [noav=integer]

getkanod retrieves and calibrates a "nod" pair for the KA-band receiver.

type getkanod with no parameters to get the help message.

This works only for beamswitched nod pairs with the KA-band receiver, and only one polarization channel per beam.

You must give it the scan number of the first of the two scans. It assumes you have just used a single cal 'R' or 'L' The trk_beam parameter is the on-source beam number for the first scan. Note: there is no "pol" parameter because of the cross-pol switching. in effect, the two polarizations are averaged.

scal : this is the flux density of a continuum calibrator. If the scal parameter is present, the output spectrum is the noise cal spectrum in flux density units.

calfile : if you give a calfile name and scal is set, then the "scal" spectrum is written to the named file.

After writing a spectrum for the calibrator using scal and calfile, then if you run on a program source with calfile set to the same file that the calibrator spectrum was saved to (but with no scal given), then the calfile is used to scale the spectrum of the program object to flux density units.

If you do not set the /noav flag, it averages data from the two samplers and puts the result in container zero. but if /noav is set, then the results from the two samplers are kept separate and are put into containers 0 and 1.

If the /sref flag is set, then the calibration is (Sig-Ref)/Ref, otherwise its (Sig-Ref)/Cal.

Uses
ka_dual_scp_1cal

Parameters
scan
in, required
integer
scan number
ifnum
in, required
integer
IF number: 0,1,2,etc, (def:0)

Keywords
tau
in, optional
float
Zenith absorption coefficient (def:0.05)
ap_eff
in, optional
float
Aperture efficiency in % (def:50)
trk_beam
in, optional
integer
Tracking beam number (def: 1)
tcal
in, optional
float
Average cal temperature (def: 1)
scal
in, optional
float
Calibrator flux density.
q
in, optional
integer
Flag first integration.
calfile
in, optional
string
File for storing SCALs.
sref
in, optional
integer
If =1, normalize by ref.
noav
in, optional
integer
If =1, do not average pols.


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