how to take data with the 12meter
18apr22
Starting tcl
- get an account on the ao network and login to the account
- Online access:
- connect to the online host vnc session:
- vncviewer galfas2:1
- there should not be a current session active..
- a window with a % prompt usually means that someone else
is running tcl
- if there is , then wait your turn:)
- Offline access:
- can be run from any host at ao.
- it will fake out the calls to the devices
- the status info will probably be garbage (since it is not
talking to the devices)
- It can be used to catch any tcl errors.
- enter startp12m in a terminal
- this will start the data taking
- It will query for the project id to use..eg
- Select the number of the project directory to use
1) a9999
2) sun
3) x101
#?
- You should enter the number of your project.
- If it is not visible, then talk to phil or arun.
- It wants you to enter the Number, not the name...
- If all else fails, use a9999
- You are now ready to send commands to:
- the 12meter
- the mock spectrometer
- the if/lo
18jul23 updated to new wide band receiver
The current feed is a dual pol (linear)( 2.5-> 14Ghz cooled
wideband receiver. (there is a hipass filter in the dewar
before the lna).
A filter bank after the cryo dewar sections
the band into 6 freq bands.
- The same filter range is used for both pols.
- The filter names and freq ranges are:
- wb1: straight thru 2500 to 14,000 Mhz (the current udc
will limit you to 12GHz)
- this selection currently overdrives the FO tx
- wb2: 2940 - 4240 band pass filter
- this is not a very sharp filter. It also overdrives the FO
tx
- wb3: 2775-3474 band pass filter
- wb4: 3180-3340 band pass filter
- wb5: 4600-14000 hipass filter
- foTx ok, but spectral density at 8->12ghz being
impacted by noise floor of system.
- wb6: 8050 - 9200 xband filters from old system
For a given receiver you can have up to 7
separate frequency bands as long as they sit within a 1Ghz
bandwidth of the downstairs if/lo.
- these will be fed to up to 7 separate mock spectrometers
- Setup the receiver if/lo
- ifsetup rcvr
- rcvr can be wb1 wb2 wb3...wb6
- this set all the switches and default valued for the
synths and attenuators.
- set rf center freq for each of the freq sub bands you
want to use
- setfreq freq1 freq2 fre3...
freq7
- All freq are in MHz.
- This will be the center freq of each sub band
- If the center of the band is outside the band of the
receiver, then an error occurs, and no frequencies are set.
- Warning: If the center freq of the subband is close to the
edge of the receiver band, then part of you subband will
have no power.
- adjusting the power levels:
- iflo
- The downstairs if/lo has attenuators/gain that
can be set with the attn command.
- For most observations the user can use the values that
have been set by the ifsetup command (except for solar
obs)
- the if2mp command will read the power levels
at the output of the 1 GHz if2 filter (after the gain
control).
- the mock spectrometers
- Each spectrometer has gain settings that adjust the
digitizer levels.
- We normally run the levels at 30 counts =1 sigma
(it's a 12bit digitizer)
- mockadjpwr 30 reply will automatically
adjust the levels to 30 counts.
- this should be done after the ifsetup and any if/lo
attenuator settings, and the mock configuration.
- You should not adjust the levels between a cal on,off
and the data taking that will use that cal values.
Setting up the mock spectrometer
You can use up to 7 mock spectrometer. Each
spectrometer has:
- 8192 freq channels in pola and polB.
- nchan can be 4,8,16,32,64... to 8192 (2^n n=2..13)
- a clock frequency that can be set between 150 and 172.032 Mhz.
- The spectrometers uses base band complex sampling so the
clock rate is the bandwidth (and you get a spike in the middle
of your spectra).
- A bandwidth divisor can be used to digitally divide the clock
bandwidth by 1..1024 (in steps of 1)
- if you use a bandwidth divisor != 1, you might want to
decrease the clock to say 160 MHz (the fpga can
occasionally glitch in the digital filter)
- 172.032 Mhz is a good bw to use because the ffttime divides
evenly into 1 second (for many values of fftlen)
- and the dc spike in the middle of the band has been
minimized for 172.032 Mhz.
You can set the mock parameters with mockset
% mockset
Usage: mockset param value
bits 32,16,8
bits to use for output spectra
boxes 1234567 boxes
to use 1 to 7
bwdiv 1,2..1024 bandwidth
divisor
clock 172.032 clock
to use in Mhz
ftype fits,psr,pdev type of output
file
integms 1000
integration time in millisecs
nchan number of freq channels 2^n
n=4..13
proj
x101 project name for
output file
pol ab,stokes,sum
polarizations to provide. ab is both, stokes is a,b,u,v, or
sum ab
phshift noise/radar set shift in butterfly. noise
for clean bands, radar if strong rfi.
mockset Notes:
- All spectrometers use the same spectrometer settings (the
input freq's can vary)
- bits:is normally set to 32 unless you are sampling at
<= 2milliseconds. then 16 bits is ok. don't use 8
unless you know what you're doing:)
- boxes: enter 1 number with the box numbers together..
- eg boxes 1234 would use the
first 4 boxes.
- bwdiv: the digital filter is not very sharp. The is then
number to digitally divide the original clock bandwidth.
- ftype: fits for spectral line, psr for pulsars
- integms: integration time for the spectra. It will be rounded
to a multiple of the fft length (1/clock * fftlen)
- When doing short ffts , you need to be careful.
- The counter that is used to decide how many spectra
to average before dumping is only 16 bits
- So your integration time can not be larger than
(2^16 01)*Time for 1 fft.
- proj: the output fits files will start with this
project name. This is normally set for you when startp12m is
used.
- sumpol: will add polA and polB in the spectrometer.
Probably best
- pshift: how to shift the butterflies in the fft. Should
be noise (radar mode was used with strong radars)
mockset will load the values you specify into the mock array
variable.
When done setting the values, you need to transfer
the values to the spectrometer with the mockconfig
command:
Adjusting the mock power levels
- after setting up the if/lo and the mock
spectrometer you can adjust the mock power levels
- You may want to do to this on source ( or maybe off source)
mockadjpwr 30 reply
- we normally run with the a/d level set to 1 sigma
= 30 digitizer counts (it's a 12bit a/d)
- This command will automatically set all the mock spectrometers
a/d levels to 30 counts.
- The reply will look like
- IdigA QdigA IdigB
QDigB IdgiA QdigA
IdigB QdigB gains(A,B)
- b0s1g0 rms:A
30.3 28.8 B 29.4 30.8
mn:A 0.7 0.7 B
1.0 -1.6 gn: 6 5
b1s1g0 rms:A 31.2
30.2 B 30.0 28.7 mn:A
-5.2 10.8 B -7.7 -2.2
gn: 1 1
b2s1g0 rms:A 30.1
30.1 B 31.4 29.1 mn:A
0.4 0.5 B -0.4
0.1 gn: 9 5
b3s1g0 rms:A 32.0
31.3 B 30.0 31.1 mn:A
-0.2 -0.2 B -0.6 -0.2
gn: 4 3
b4s1g0 rms:A 32.1
29.8 B 30.4 29.5 mn:A
0.4 2.1 B -0.1 -1.0
gn: 11 11
b5s1g0 rms:A 31.8
31.4 B 28.6 28.3 mn:A
1.0 0.8 B -0.9
1.5 gn: 10 10
b6s1g0 rms:A 33.3
29.4 B 31.2 31.2 mn:A
-0.6 -0.5 B -0.7 0.5
gn: 14 15
- The units are digitizer counts
- mn: is the mean value (it should be closer to 0)
- gains: in db the the spectrometer used to get the measured
rms.
mockpset
- The fits files written by the mock spectrometer needs things
like source name, pattern name, scanid, ....
- These things are loaded into various global variables and need
to be moved to the mock array variable before data taking.
- this is done with the mockpset command.
- it grabs all the info need from the various globals and load
them into the mock variable
- If you use the data taking commands listed here,
they will do this for you.
Pointing, source setup
- Make sure we are in tracking mode:
- trkinit
- This only needs to be done once (unless there is a power
dip)
- it will tell the telescope to track the current az,el
position.
- Source setup
- A source file is used for source coordinates
- the file format is:
- A line starting with # is a comment and is ignored
- srcname hhmmss.s ddmmss.s crdSys
- crdSys can be J (j2000) or B (B1950).
- srcname should not have embedded spaces
- anything after the space after crdSys is ignored
- Specifying the source file:
- srcfile filename
- can be used to specify your source file
- catp12m
- will set the source file to the default file p12m
source file
- this is set by default when you use startp12m
- this file includes the lst rise,set times, and s and x
band fluxes:
- srclist
- #!
POSITIONS
LST
FLUX
#!Name
RA
DEC CRD Typ RISE SET
SBAND XBAND
Size NOTES
#!
hhmmss.s
ddmmss
hh:mm hh:mm Jy
Jy
3C10
002514.0 +640839 J SNR 16:41
08:11 28.9
- -
8' Tycho
0022+6351 002521.0 +640824
J SNR 16:41 08:11
- -
- 8'
3C58
020535.2 +644935 J SNR 18:18
09:56 30
- - 9'x5'
3C84
031948.1 +413042 J G 20:46
09:56 20
30 - <16"
B0329+54 033259.4 +543443
J P 20:28 10:40
- -
- -
P=0.715,dm27
- ....
- Your personal source files will probably not have the
lst time or flux (unless you put them there).
- srclist
- will list the contents of the current source file
- srcget srcname
- will load the coordinates for source name from the
srcfile
- the coordinates are returned in:
- The global scram array variable:
- scram(src_ra) , scram(src_dec),
scram(src_name),scram(src_crdsys)
- access via $scram(src_ra), $scram(src_dec) ....
- The global variables ra,dec,crdsys,
- access via $ra $dec $crdsys
- How to get the rise,set times of your sources
- srctimes srcfile
- will list src ra dec lstRise lstSet for each source in
the file
- if you don't supply a srcfile, it will use your current
source file
- Example:
- % srctimes
source
ra
dec
lstRise lstSet
3C10
00:25:14.0 64:08:39.0
16:41:14 08:11:36
0022+6351
00:25:21.0 64:08:24.0
16:41:22 08:11:42
3C58
02:05:35.2 64:49:35.0
18:18:11 09:56:13
- Note: this has : between hhmmss, ddmmss.. this is
only for display. Your srcfile should not include them.
- This tcl routine execs the srcTimes command in linux
(srcTimes -h from the bash/csh shell for more info)
- start the telescope moving to source
- most data taking routines will command the telescope to the
source and wait to be tracking before starting data taking.
- the pnt command will let you start the telescope moving
before calling the data taking routine (trkinit must have been
called to put the telescope in tracking mode)
- pnt tr hhmmss.s ddmmss.s -cj
- hhmmss.s is the ra
- ddmmss.s is the dec
- -cJ is the ra,dec coord system. Use J (the default) B
(B1950)
- If you loaded the src with srcget then
- pnt tr $ra $dec -c$crdsys
- or if you like to type..
- pnt tr $scram(src_ra) $scram(src_dec)
-c$scram(src_crdsys)
- Stopping the motors when you are done
- when you are finished with your experiment please turn off
the motors with the command:
Choosing the data taking routine
The current list of routines includes:
- on off position switching with a cal on,off (optional)
- mapping in ra,dec (drive in ra,step in dec). Optionally run
the winking cal during the observeration
- track a source ( with an optional cal on,off at the start
- pulsar datataking. an optional winking cal scan followed by
the pulsar scan
- make a map of the sun (at xband)
- do a cross on a source to check pointing and get strength of
the source.
- The list of data taking
routines can be found here.
Running from a script file
Tcl commands can be placed in a script
file. You can put some or just part of you observation in to file
and then execute it
- get into tcl
- enter any commands that are needed before executing the
file (that's up to you)
- Where to put the script file:
- best to put it in your proj directory
- /share/obs4/usr/p12m/"proj"/
- when you take data you are in that directory.. so you
don't have to add directory paths to the filename.
- I tend to use .tcl as the suffix for the script file but you
can use anything you like
- Make sure that the script file is public readable
- you'll probably generate it with you own user id
- when you execute it from datataking , you will be the p12m
user
- chmod 0664 scriptfile
- or chmod 0666 scriptfile .. if you want
to let other people edit it.
- execute the script file
- source scriptfile
- source is the tcl command to execute the.
- If the experiment is done when the script finishes make sure
you turn off the motors at the end of the file with the line:
Online monitoring with idl
You can monitor the data in real time using
idl. This can be done online (galfas2) or on an offline machine.
Each
of the monitor routine continue monitoring as new files become
available.
Starting idl
- enter idl
- If you are online (at p12m) then the following has already
been done for you in the idl startup script
The monitoring routines:
- masmon:
monitor aofits spectral line data
- masmonstripch:
stripchart recording of total power from aofits spectral line
data.
- psrfmonimg:
monitor ao psrfits data using dynamic spectra
Other links:
Using idl at AO
masmon: monitor spectra
- It will display spectra as they are taken. It displays
one of the up to 7 beams that are being taken.
- masmon .. to start
- startup options:
- proj="projectId" .. when scanning for files,
limit scan to projid. def: most recent file any project
- norm=1
.. if set normalize each spectra to unity before
plotting.
- once started, hitting any key will bring up a menu
- the plot display stop until you've done your menu selection
- Some handy things to do with the menu:
- bm n
,. switch to beam n (n=0..6)
- h xmin xmax .. change
the horizontal scale. entering h with nothing following goes
back to auto scale
- v ymin ymax .. change
the vertical scale. entering h with nothing following goes
back to auto scale
- num filenum .. move to
file number filenum for display
- see masmon doc for the rest of the options.
- After you enter the line, monitoring will continue..
- ignore any errors that look like:
- Error opening file:sun.20220422.b0s1g0.00900.fits
No rows in file:
- this happens when idl opens the file before datataking has
written into i.
- Example
- masmon
- space bar
- v 0 1e7 .. change
vertical scale
- space bar
- v
.. go back to auto scale
- space bar
- bm 3
.. move to the 4 band (bm 3)
- space bar
- num 100 ... move to
file number 100
- space bar
- q
.. quit masmon
- exit
.. exit idl
masmonstripch: total power
stripchart
This will input the spectra as they are taken,
compute the total power in a beam, and then plot it as a
strip chart
Once the window hits it's max number of points (maxpnt= keyword on
startup. def=1000), the display will scroll to the left.
- masmonstripch
documentation
- masmonstripch .. to start
- some options on startup:
- maxpnt=maxpnt .. the number of points
to display before scrolling starts
- sub=1
.. if provided it will subtract the mean value of the
points in the window before plotting
-
.. this lets you blow up the vertical scale a lot.
- this will read in the spectra, compute the total, and then
plot it (while is polA, red i polB)
- It will continue plotting as files become available
- once started, hitting any key will bring up a menu
- the plot display stops until you've done your menu selection
- Some handy things to do with the menu:
- bm n
,. switch to beam n (n=0..6)
- h xmin xmax .. change
the horizontal scale. this is normally not used (unless you
want to blow something up). h alone resests to autoscale.
- v ymin ymax .. change
the vertical scale. entering h with nothing following goes
back to auto scale
- num filenum .. move to
file number filenum for display
- see masmonstripch doc for the rest of the options.
- After you enter the line, monitoring will continue..
- ignore any errors that look like:
- Error openning file:sun.20220422.b0s1g0.00900.fits
No rows in file:
- this happens when idl opens the file before datataking has
written into.
- Example
- masmonstripch
- masmonstripch, maxpnt=2000 .. for 2000
points in the window (def=1000)
- space bar
- v 0 1e7 .. change
vertical scale
- space bar
- v
.. go back to auto scale
- space bar
- bm 3
.. move to the 4th band (bm 3)
- space bar
- num 100 ... move to
file number 100
- space bar
- q
.. quit masmon
- exit
.. exit idl
psrfmonimg: monitor pulsar data taking
with dynamic spectra
This routine wil monitor pulsar datataking
while using dynamic spectra. It will start on the current file and
continue
monitoring. When a new file arrives, it will continue on. It will
try to display 1 row of spectra at a time.
- psrfmonimg
documentation
- It will display dynamic spectra for 1 beam. If you have
multiple bms, use the menu to switch to another.
- psrfmonimg .. to start
- startup options:
- pollist= 1,2,12 which pols to display. def=12.
- if pollist=12 then the top frame will be polA, the
bottom frame is polB
- pollist=1 or 2 .. then a single frame is displayed. The
width of the frame is the fftlen
- If you want a wider display: zx=2 will double
the width
- If you have more spectra in a row than will fit on the
screen: use zy=-2 or -3 for a negative zoom
in y.
- once started, hitting any key will bring up a menu.
- the plot display stops until you've done your menu
selection
- Some handy things to do with the menu:
- bm n
,. switch to beam n (n=0..6)
- h xmin xmax .. change
the horizontal range. entering h with nothing following goes
back to auto scale
- l
.. list files this date. Use the index # to the left of file
when referencing
- fnum fileindex .. move to
file index fileIndex (from the l listing)
- see psrmonimg doc for the rest of the options.
- After you enter the line, monitoring will continue..
- Example
- idl
- @phil
- @psrfinit .. if not online, and not in
your idl start file.
- psrfmonimg
- space bar
- bm
2
.. move to the 3 freq band (if you're taking 3)
- space bar
- l
.. list the files
- 5
/sspsr.20220427.J0437-4715.b0s1g0.00102.fits
4
/sspsr.20220427.J0437-4715.b0s1g0.00101.fits
3
/sspsr.20220427.J0437-4715.b0s1g0.00100.fits
2
/sspsr.20220427.J0437-4715.b0s1g0.00001.fits
1
/sspsr.20220427.J0437-4715.b0s1g0.00000.fits
- space bar
- fnum 1 .. skip
to 1st file (normally the cal)
- space bar
- fnum 3 .. skip
beyond the 2 cal files(1,2) to the main scan (each scan has a
file number that is a multiple of 100)
- space bar
- q
.. exit psrfmonimg
- exit
.. exit idl
Things that will give you problems
- Power dips
- the 12meter power is not on ups. When we have a power dip,
the telescope stops.
- The datataking (if/lo, spectrometers) are all on ups so they
never see the power dip.
- So you will continue to take data while the telescope is not
tracking.
- you can:
- if in the middle of taking data enter
- mockstop
- This will take you back to the interactive prompt.
- If you are waiting to be tracking.. sorry.. you'll have to
use ctrl-c which will abort tcl.. then restart with startp12m
- See notes below on aborting.
- After you come back from the power dip
- If you see the azimuth value staying at 0.
(bug in either my code or the motor controller)
- pnt tr az el -cx
- were az =azimuth in deg., el=elevation in deg
- pnt mode tr
- this should clear it up.. then command the telescope back
to your source
- pnt tr $ra $dec -cJ .. if you've
called srcget ..
- tcl interpreter is not responding to keyboard (and your
not in some kind of wait
- If you accidentally hit some of the function keys on the
keyboard they will generate key sequences with [[[ or{{{
- These are quotes and command sequences. Tcl will continue
accepting keystrokes till the [ or { have balancing ] or }
- Solution.. enter
]]]]]]]]]]]]]]]]]]]]]]]]]}}}}}}}}}}}}}}}}}}}}}
- this will then come back with an error message.. but you'll
be back in control
- Trying to abort from a wait or datataking
- Tcl does not support signals (some other versions do).
- In a normal shell ctrl-c will abort a program and
bring you back to the shell
- ctrl-c in Tcl aborts Tcl and goes back to bash or csh
- If you are taking data and you want to stop prematurely
- mockstop
- will stop the datataking, exit any script, and go back to
interactive input in Tcl
- If you are stuck in a wait .. all you can do (until i think
of something clever ) is
- ctrl-c .. this exits Tcl
- startp12m .. torestart it
- edit your script file.. so you skip around the part you
already did
- # in col 1 of a script is a comment and will be ignored.
- re-execute the script.
- Rain and "high" freq observing
- If you are observing above say 5Ghznd it starts raining your
Tsys will go up and the signal strength will decrease (more
info)
<-
page
up
home_~phil