Related
pages
Links in this page
Tcl routines for datataking
Setup routines
List of datataking routines
using idl at ao
List of setup/query routines
- General
- attn: set, check the
attenuation values in if/lo
- calport: set the cal type
- catp12m: set the source catatalog to use
- help : get help on
procedures
- ifsetup - setup the if/lo
- logLine : send a line to the user's logfile
- print : print the contents
of an array variable eg (prog(),
- setfreq : set rf frequencies to use for the
different frequency bands
- srcfile : define the source file to
use
- srcget : get the ra dec for the
requested source (in the current source file)
- srclist : list the contents of
the current source file.
- udc :
query ,set parameters in the udc (upDownConverter. RF to
first IF)
- waitforlst: wait for lst to arrive
- waitforsec: wait for specified second to arrive
- waitsecs : wait for the requested number of
seconds
- yyyymmdd: return the current date as YYYYmmdd
- Mock
- mockadjpwr: adjust the mock power
- mockconfig : configure the mocks after setting the
parameters (see mockset)
- mockset : set the mock parameters in
the mock array variable.
- mockstop :
stop the current datataking prematurely
- Pointing
- getazel : get the current
azimuth and elevation
- lst
: get current local sidereal time
- lsthaspast : see if lst time has passed
- pnt
: the pointing command to control the telescope.
- pntpwroff : turn off the 12meter power, open the
contactor
- srchaset : check if the current source
we are tracking has set.
- telstatus : return array variable with
current status of telescope.
- trkinit
: put the telescope in tracking mode.
List of datataking routines
The function call is followed by the
arguments. An argument in {} is option. The value in {} is the
default value. If you want to specify an argument value then
you must provide values to all of arguments preceding it.
terminology:
- if/lo if/lo consists of the rf, and IF
conversions that end up presenting the signal to the backend
- mock: the backend spectrometers (7 in total)
- generic setup routine
- this can be used to setup the if/lo and mocks for
those routines that don't have a specific setup routine.
- gensetup rcv freq clock bwdiv nchan {integms 1000} {
pol ab} {pshift noise}
- rcv: rcvr to use: wb3,wb6
- freq : center freq for the bands you want.
- bdiv : amount to reduce the bandwidth.
- nchan : number of freq channels in mock to use for
each band\
- integms: integration time in milliseconds. def:
1000 = 1 sec
- pol : string
polariztion ab. or stokes
- pshift : string noise (def) or radar
- this will change how often the data in the butterfly
are shifted to prevent overload.
- cross ra dec {toloop 1}
{offD .6} {rate .01} {calsecs 0} {adjpwr 1} {crd j}
- make a az.el cross centered on ra dec. 1 strip in az,
the second strip in el
- this routine assumes that the if/lo and the mocks have
already been setup.
- ra : hhmmss.s right ascension
for center. default coord system is j2000
- dec: ddmmss.s declination for center .
default coord system is j2000
- toloop: Integer the number of crosses to do.
default=1
- If toloop < 0 then this is the negative of the lst
end time (hhmmss). If so then loop till lstend time
arrives.
- offD: float Offset in degrees from center of the
map for a strip.
- This is a great circle offset. The strip Length is
2*offD
- The starting offset for the strip is always
-(abs(offD)) .. (it drives negative to positive
independent of the sign of offD)
- Rate: float The rate to move along the
strip in deg/second. (great circle degrees).
- This is forced to be positive (since the offset is
always negative)
- calsecs: int seconds for calon,caloff at start of
each cross. 0--> no cal
- adjpwr: int if not zero then adjust the
mock power before the first cross of the loop. Only
done once at the start.
- crd: char coord system for
ra,dec. j=j2000, b=b1950,g=galactic ...default=j
- Example: entering all values (even defaults)
- set ra 053432.0
- set dec 220052
- cross $ra $dec 5 .6 .02 10 1 j
- setupcross {rcv wb6} {override 0} {offd .6} {secsstrip
120} {nchan 1024}
- used to set the global variable crossI with parameters
for the cross.
- rcv : rcvr to use. default wb6
- override: use the parameters on the call line
for the cross setup
- 0: use the hardcoded values in the routine
- 1: use the values from the parameters on the call
line
- offd: offset of strip from center in deg. def: .6.
this makes a strip .6*2=1.2 deg long
- secsstrip: how many seconds for the strip. def: 120
secs.
- nchan: how many freq channels
to use in each mock band. def: 1024
- On exit you can use the values on crossI() to
call cross.
- mapradec ra dec code {stripsecs
120} {raOffAmin -30.} {decOffAmin -30.} {decStepAmin 5.}
{calSecs 10} {firstStrip 1}
- make a map driving in right ascension and stepping in
dec.
- this routine assumes that the if/lo and the mocks have
already been setup.
- ra : hhmmss.s right ascension
for center of map. default coord system is j2000
- dec: ddmmss.s declination for center of
map. default coord system is j2000
- code: int code to specify various arguments (this
needs to be simplified:).
- it is a bit map where each bit specifies
something.
- b0:0x1 coordinate system. 0=j2000, 1=b1950. default= 0
(j2000)
- b1:0x2 raWidth: 0= great circle, 1=little circle.
def:0 (great circle)
- b2:0x4 drive direction: 0 both ways, 1:drive in
increasing ra only (needs to come back each strip).
def:0 (both ways)
- b3:0x8 use ephemeris file. 0:use ra dec supplied. 1:
use ephemeris file (already loaded in pointing).
def:0(use ra,dec)
- b4:0x10 1: do calon,off start of each strip,
- b5:0x20 1: do calon,off end of each strip
- b6:0x40 1: overrides b4,b4. do calON,Off at
start, end of map (only)
- b7:0x80 1: adjust mock power at start of map
- b8:0x100 1: use a winking cal during strip. overrides
b4,b5,b6
- You or these values together:
- set Badjpwr 0x80
- set Bwcal 0x100
- set code [expr $Badjpwr| $Bwcal]
- stripsecs: int seconds for a strip. def:
120 seconds
- stripssecs and abs(raoffAmin)*2 will determine the
rate in amin/sec that the telescope is moving in ra.
- make sure that you end up with multiple spectrometer
samples/beamwidth. (fwhm:xb=10amin, sb=40amin)
- raOffAmin: float offset (Amin) in right
ascension for first strip (done this call .. see
firststrip arg).
- if driving both ways, then the rate will be
-raOffAmin/striptmsecs
- decOffAmin: float offset in declination for map.
def: -30amin
- decStepAmin: float step (Amin) in
declination for each strip. should be <= bm fwhm for
nyquist sampling.
- the sign of decstepamin will be adjusted according to
decOffAmin.
- decOffAmin < 0 -> decStepAmin>0
- decOffAmin < 0 -> decStepAmin <0
- calSecs: int number of secs of calon,caloff.
0-> no cal. default is 10 secs.
- the bits in code determine where the cal is done.
- if winking cal bit set, then calsecs should be 0
(there is no separate calon,off)
- firststrip: int the first strip of
the map to start on. def=1
- If you don't finish a map in 1 run, you can continue
later by setting firststrip to a larger number
- raOffAmin,decOffAmin should remain the size of the
original map.
- The sign of raOffAmin will be determine the direction
of the strip you starton.
- Example:
- 2 deg map about src. 60 seconds/strip, use the winking
cal, adjust mock power at start
- 120Amin/60secs=2amin/sec. if xb fwhm=10Amin then 5
secs to cover fwhm of bm.
- with wcal we sample at 1or 1 ms and end up
integrating to 25Hz. (25 hz cal, 20ms on,20ms
off).
- set ra 053432.0
- set dec 220052
- set Badjpwr 0x80
- set Bwcal 0x100
- set code [expr $Badjpwr| $Bwcal]
- mapradec $ra $dec $code 60 -60. -60. 5. 10 1
- mapsun {numberOfMaps 1} (useCal 1}
{stokes 0}
- do one or more maps of the sun at xband.
- This routine will setup the if/lo and the mocks for you
.
- numberOfMaps int number of maps to do.
def=1
- useCal int if not
0, do a 10sec calon,calOff at the start end end of the
map.
- stokes: if
not 0 then set mocks to record polA,polB, stokesU,stokesV
- The wb6 xband filter will be setup
- Notes:
- routine will connect to jpl horizons website and
download the current days solar ephemeris
- xband rcvr will be setup and it will use 7 freq bands:
- 8219.00 8363.00 8505.00 8647.00 8789.00 8931.00
9073.00 Mhz
- the mocks are run with 7*172.032 Mhz, 8192
channels/band, 1 hz sampling
- mapradec is used, 2degx2deg map (great circle), 60 sec
strips, 5Amin steps in dec -> 25 strips
- The mock power levels are set so 1 sigma = 100 voltage
counts (in the mock 12bit a/d)
- --> the
attenuator switch in front of the udc must be switch to
high atten (red light on). hopefully i'll get this
- programmed before the school :).
-
- mockcalonoff secsCal
{newpattern 1} {winkcal 0}
- so a calon,off with the mocks
- You need to setup the if/lo and mocks before calling
this routine.
- secsCal : int number of seconds for calOn and
calOff
- newpattern: int generate a new pattern id
before starting. (def=1)
- if this is a calon,off at the end of a pattern (eg
onoff) then 0 would use the pattern id of the on,off
- winkcal: int 0 no winking cal, 1 use
winking cal
- Notes:
- the routine does not check whether we are tracking a
source position or not, it just takes the data.
- the cal is turned off when exiting this routine.
- on ra dec secsOn {secsCal 0}
{wcal 0} {crd J}
- Take data while tracking a source. Optional cal on,off
at start.
- this routine assumes that the if/lo and the mocks have
already been setup
- ra : hhmmss.s right ascension
to track. default coord system is j2000
- dec: ddmmss.s declination to track .
default coord system is j2000
- secsOn int number of seconds to take data
- secsCal int number of seconds for calOn,
calOff prior to main scan. secsCa=0 --> no cal
- The can will be done while tracking the source.
- wcal int if not equal to
0 then use the winking cal during the main scan.
- If set then no calon,off will be done prior to the
main scan.
- crd string coord system to use for tracking
J,B,.....
- onoff ra dec {toloop 1} {intTmSecs
300} {calTmSecs 10} {movTmSecs 20} {crd j}
- on off position switching with optional cal on,off
after the off position.
- this routine assumes that the if/lo and the mocks have
already been setup
- ra : hhmmss.s right ascension
for source. default coord system is j2000
- dec: ddmmss.s declination for source .
default coord system is j2000
- toloop: Integer the number of crosses to do.
default=1
- if toloop < 0 then this is the negative of the lst
end time (hhmmss). If so then loop till lstend time
arrives.
- intTmSecs: int seconds to integrate on and off
source.
- calTmSecs: int seconds for calOn,calOff. 0 ->
no cal
- movTmSecs: int seconds to allow for move from on
to off position
- crd: char coord system for ra,dec.
j=j2000,b=b1950, g=galactic. def=j
- Example: (entering all values (even defaults)
- set ra 053432.0
- set dec 220052
- onoff $ra $dec -062200 300 10 20 j
- this will do on,offs till lst 062200
- onoff $ra $dec 5
- this will do 5 on/off pairs each with 300 secs
on,off and 10 sec calon,caloff.Ra,dec should be J2000.
- pulsar observing
- psrsetup rcvr src integms
nchan
- setup for a pulsar observation. This routine will
setup the if/lo and the mocks.
- rcvr : string xb for xband,
sb for sband
- src : string source to track. Needs
to be in the current source file.
- integms: float integration time in
milliseconds. It will be rounded to a multiple of the
fft length
- nchan: number of frequency channels to use in
each mock spectrometer.
- Notes:
- xband: 7 freq bands, 172.032 Mhz each centered
at:
- 8219.84 8360.96 8502.08 8643.20 8784.32 8925.44
9066.56 MHz
- (spaced by 142 Mhz)
- sband: 1 freq band, 172.32 Mhz bw centered at 2278
MHz
- mocks:
- 16 bit spectra, polA,B recorded separately
(no pol adding).
- After calling this routine, you can call psrtakedata
- Example:
- psrsetup xb B0833-45 .2 256
- xband, 7 bands, vela, 200Usecond sampling, 256
freq channels/freq band.
- psrtakedata secsOnSrc
secsCal {adjpwr 1} {maxWait 9999}
- start taking pulsar data
- secsOnSrc: int number of seconds on source
- secsCal : int number of
seconds for cal (0--> no cal)
- a winking cal scan of secsCal seconds on the pulsar
will be take prior to the onSrc scan.
- adjpwr :
int if 1, adjust mock power before starting.
def:1
- maxWait : int max number of
seconds to wait to be on source and tracking. def: 9999
seconds.
- Notes:
- you should call psrsetup prior to calling this
routine
- Example:
- psrtakedata 1800 20
- take 1800 seconds of data on the pulsar
- take a 20 second winking cal scan before the main
scan.
- psrdolist slist
- You create a list of pulsars to observe along with the
parameters for the observation.
- You pass the list to psrdolist and it executes the
observations in the order of the list.
- The format for the list is:
- # skip
psrname lstFirst lstLast
rcv integms nchan secsCal secsDat
set slist {
{
B0329+54 222800
084000 wb3 .2000
256 90
1800 }
{
J0437-4715 024000 063000
wb3 .032
256 90
900 }
{
B0950+08 060000
134000 wb3 .2000
256 90
1800 }
{
B0833-45 060000
113000 wb3 .2000
256 90
1800 }
{
B1641-45 144500
184700 wb3 .2000
256 90
1800 }
}
- The entire list is enclosed in {}
- Each entry of the list is also enclosed in {}
- The columns in the list are free format (as many
spaces as you want)
- the columns are:
- col1: source name
- this should match the name in your source file
- if the word skip precedes the source
name, then this line will be skipped when
observing starts
- This is how you can jump over sources without
having to generate a new list
- col2: lstFirst
- the observing will wait for this lst to arrive
before starting the observation.
- it is good to make it a little after the lst
rise time so the telescope does not get a lot of
ground radiation.
- col3:lstLast
- don' start the observation if this lst has past
- So observing will start if the lst is between
lstFirst and lstLast
- col4: rcv
- col5: integration time in milliseconds
- The spectra will be integrated for this
many milliseconds.
- It will be rounded to an integral number of
fftTimes (since we have to accumulate completed
ffts)
- col6: the number of spectral channels (fftlen)
to use
- should be a power of 2 4->8192
- col7: number of seconds for the winking cal
scan at the beginning
- if secsCal=0 no cal scan will be taken
- col8: number of seconds for the data scan
- psrdolist calls psrsetup for each pulsar so the fixed
values for psrsetup also apply (freq,bandwidth, etc).
- A command file would look like:
- # sband pulsar observations
of B0329 and vela
#
set proj sspsr
# skip
psrname lstFirst lstLast
rcv integms nchan secsCal secsDat
set slist {
{
B0329+54 222800
084000 sb .2000
256 90
1800 }
{
J0437-4715 024000 063000
sb .032
256 90
900 }
{
B0950+08 060000
134000 sb .2000
256 90
1800 }
{
B0833-45 060000
113000 sb .2000
256 90
1800 }
{ skip B1641-45
144500 184700 sb
.2000 256
90 1800 }
}
#
srcfile src.cat
psrdolist slist
pntpwroff
- It would do B0329+54, then J0437,B0950,B0388 and
skip B1641
using idl at ao
- Starting idl at ao
- An idl initialization file can be used to setup things
for your idl session.
- as an example copy the following to
idlstartup in your home directory:
- !EDIT_INPUT=500 ..
stores up to 500 entries in the history.
- @phil
- @masinit
- @psrfinit
- !x.style=1
- !y.style=1
- ;.. and anything else you would like
- set the IDL_STARTUP environment variable to
point to this file
- csh,tcsh: in .cshrc add setenv
IDL_STARTUP ~/idlstartup
- bash : in .bashrc
add export
IDL_STARTUP=$HOME/idlstartup
- enter idl
- if you aren't using a startup file, at leaster enter,
@phil,@masinit,@psrfinit on separate line
- Kinds of data to look at:
- there are two basic sets of datataing routines:
- masxxxxx - for spectral line fits files
- psrfxxxxxx - for psrfits fits files (pulsar
data)
- monitoring datataking
- masmon
- masmonstripch
- a total power strip chart display
- psrfmonimg
- dynamic spectra of pulsar data
- warning.. you probably don't want a lot of people
doing this while taking pulsar data since it is i/o
intensive
- some useful routines
- mas spectral line fits file data
- search for list of files, headers
- masfilelist
- search for files belonging to a project, date, bm,
... return the list of files
- masfilesum
- read the headers for the list of files provided
(normally from masfilelist)
- Processing routines for various data taking
patterns.
- masfindmap
- find the files that belong to an radecmap pattern
(using the pattern id)
- masgetmap
- input files for an radecmap (without winking
cal) computing total power.
- masgetmapwc
- input files for an radecmap with winking cal.
computing total power.
- General mas routines
- masaccum
- accumulate spectra from multiple arrays.
- masgetfile
- input an entire file (make sure you have enough
memory)
- masget
- input a row from an already open mas fits file.
- masmath
- do arithmetic on mas data structures.
- masopen
- open a mas spectral line file
- masplot
- plot spectra (mas files , not psrf)
- masrms
- compute rms/mean by channel for an array of mas
structs.
- psrfits pulsar data
- General routines
- list of
generic routines
- Plotting
- hor
:set the horizontal range for plot
- ver
:set the vertical range for plot
- pscol
:start sending plotting to postscript file
- hardcopy
- close the postscript file
- x
- switch back to x terminal plotting output
- ldcolph
: reload color table used for x windows plotting
(after pscol calls)
- robfit_poly
: robust polynomial fit
- robfit_polyfft:
robust polynomial and fft fit
- gsfit2d
: 2d gauss fit (normally beamfit on cross pattern)
- gsfit2dc:
2d gauss fit with coma
- gsfit2deval:
evaluate 2d gauss fit coeff at specified locations.