GBT Spectral-Line Data Reduction andTutorialsDavid Frayer (Green Bank Observatory) to login into Green Bank

GBO startkde on Processing Machinessh planck startkdePublicProcessingMachines: planck newton fourier arcturus

The GBT has a lot of different observation typesand many different methods for reduction Standard gbtidl routines and the GBT pipelinesupports VEGAS spectral-line data from positionswitched or frequency-switched observations forreceivers with noise diodes Pulsar data è Presto reduction package Mustang è separate Mustang package (Mason) VLBI è VLBA folks Radar è Radar folks W-band, Argus, SubBeamNod è Frayer Data reduction not supported for continuumobservations or stokes polarization observations;however, non-official software exists

Reduction Software DocumentationGBTIDL:-- User's Guide: guide/- Quick Reference: release.pdf- Calibration /gbtidl calibration.pdf- Reference Manuals:User: Contrib: r: (gbtgridder –h)

GBT Data Processing “Flow” Chart(1)Raw GBTdataRaw VEGAS data(1) The sdfits program is used to convertraw GBT and VEGAS data into a“sdfits” file.(2) The sdfits data are calibrated toTa*/Tmb/Snu within gbtidl (or thepipeline) and saved to outputcalibrated data file(s).(3) A co-added image per frequency binis made using the gbtgridder programwhich outputs a data cube withassociated weights.sdfits data(2)CalibratedSpectra(3)Image data cubes

The telescope measures:Ta “antenna temperature” Ta(total) Tsource {Trx Tbg Tatm Tspill} Where { .} other contributions Want Tsource, so carry out ON – OFF Ta(ON) Tsource { .} Ta(OFF) { .} So Ta(ON)-Ta(OFF) Tsourceè Need to carry out ON-OFF observations andthere are different observing techniques formeasuring ON-OFF

Different Observing Modes to derive thereference data (OFF)Types of reference observationsØFrequency Switching– In or Out-of-bandØPosition Switching– Reference-Off– Mapping-OffØDual-Beam Position Switching Nod -- Move telescope SubBeamNod -- Move Subreflector

GBT Definition of Ta(ON – OFF)Ta OFFBlank Sky or otherTsystemFrom diodes, Hot/Coldloads, etc.

Determining TsysNoise DiodesAll GBT receiversbesides 4mm, Argus,and Mustang usenoise diodes.

Determining TsysNoise DiodesTsys Tcal * OFF/(ON – OFF)TsysGBT: Flicker diode on/off Tcal * OFF/(ON – OFF) Tcal/2Typically choose low Tcalvalue to minimize Tsys andhigh Tcal value for verybright sources (for Rx thathave two options)

Determining TsysHot & Cold LoadsCooling SystemTcoldHot LoadThotGain: g (Thot – Tcold)/(Vhot –Vcold) [K/Volts]Tsys g VoffExample GBT 4mm Rx

Temperature ScalesØTa Tsys (ON-OFF)/OFF(GBT typically uses uncorrected antennatemperature)ØTa’ Ta exp(τoA) (corrected for atmosphere)ØTmb Ta’/ηmb (ηmb 1.3 ηa)ØTa* Ta’/ηl (Argus uses Ta*, ηl 0.99 for the GBT)ØTa’/Sν 2.84 ηa (for the GBT)

Calibration:Flux Density vs Antenna Temp vs Main-Beam TempPrec ½ Ae SνΔν k Ta’ ΔνAe ηa (π/4) D2Sν 3520 Ta’/(ηa [D/m]2)èTa’/Sν 2.84 ηa for the GBT (ηa 0.71 at low ν)Ø Know Sν (use ALMA calibration database for 3mm and VLAcalibration papers for 50GHz) and derive ηa from measuredTa’Ø Measure FWHM from good pointing scans or within yourimage to derived ηmb and Tmb; Tmb Ta’/ ηmbØηmb 0.8899 ηa (θFWHM 100m/ λ)2(assumesGaussian beam, where beam FWHM is in radians)

GBO Data Directories Home area: /users/user name Scratch data area: /home/scratch/user name Raw gbtdata by project (e.g.,AGBT16B 037 04):/home/gbtdata/AGBT16B 037 04 Raw Vegas data by project:/lustre/gbtdata/AGBT16B 037 04/VEGAS sdfits data by project:/home/sdfits/AGBT16B 037/04

Public Data Processing Machines withlustre access: newton, planck, fourier (192GB ram) euclid, thales (16GB ram) arcturus (132GB ram) {pipeline machine} Extra disk space for data processing:/lustre/pipeline/scratch/user name

gbtidl( unipops [12m and 140ft reduction package] convertedto IDL)ØData access (connecting to sdfits file)o gbtidl onlineo gbtidl offline,’AGBT16B 037 04’o gbtidl filein,’mysdfitsfile.fits’o gbtidl summaryØUser ”pro” directory used by gbtidl:/users/user name/gbtidlpro

Standard Reduction scriptsq Ta Tsys(ON-OFF/OFF): getps, scan (position switch) getfs, scan (frequency switch) getnod, scan (nod data) getsigref, scan on,scan offq Raw passband gettp, scan (total power for scan) gettp,scan,ifnum ifnum,plnum plnum,fdnum fdnum,sig state sig state,subref subref,wcalpos wcalpos getrec, rec (get an individual record, see list)

Some Basic GBTIDL Commands:DEMO basics gbtidl offline,’TGBT17A 506 11’gbtidl summary (give summary of session)gbtidl getsigref,6,7 (on,off position switch data reduction)gbtidl header (provide some of the meta data in container 0)gbtidl gettp,6 & copy,0,2 get ON and copy to container 2gbtidl gettp,7 & copy,0,3 get OFF and copy to container 3gbtidl subtract,2,3 (ON-OFF) (container math)gbtidl divide,0,3 (ON-OFF)/OFFgbitidl scale,17.34 (multiply by Tsys to give Ta Tsys*(ON-OFF)/OFF)gbtidl !g.s[0].units 'Ta’ (changing meta data units from counts to Ta [K])gbtidl setregion (select regions for baseline removal)gbtidl nfit,3 (use 3rd order polynominal for baseline fitting)gbtidl bshape (fit baseline)gbtidl baseline (remove baseline)gbtidl gsmooth,3,/decimate (Gaussian smooth with width of 3 channels)gbtidl fitgauss (fit Gaussian to data)gbtidl keep (save current data in container 0 to output file !g.s[0].units 'Ta')

Frequency Switching Example:DEMO frequency switchingGBTIDL - offline,’TGBT17A 506 11’GBTIDL - summary (give summary of session)GBTIDL - getfs,10 (reduce frequency switcheddata)GBTIDL - gettp,10,sig 1 (look at one freq)GBTIDL - freezeGBTIDL - gettp,10,sig 0 (look at other freq)GBTIDL - oshowChange between MHz and Channels at top of IDLplotting window to show how this works

GBTIDL position-switch Demo:DEMO sdfits HIsigref filein,’sdfits example’ (from DATAdemodirectory) summary gettp,56 (look at passband) getsigref,56,57 (look at one ON-OFF pair) dotri,56,70 (reduces ON-OFF-ON sequence andco-adds data for scans 56-70) Smooth data and baseline removal

Example script: “”pro dotri,sc1,sc2;;16A054 HI project;;does ON-OFF-ON reduction for scans sc1-- sc2;;Session 1: sc1 16, sc2 39sclearfor ii sc1,sc2,3 do beginprint,'combining ON-OFF',ii,ii 1getsigref,ii,ii 1,plnum 0accumgetsigref,ii,ii 1,plnum 1accumprint,'combining ON-OFF',ii 2,ii 1getsigref,ii 2,ii 1,plnum 0accumgetsigref,ii 2,ii 1,plnum 1accumendforavecopy,0,10returnend

Argus Mapping Demo:DEMO argus mapping Raw data (40min observations, 167k spectra) first calibratedand reduced at about 0.2 sec per spectrum which takes 9hrs) using argus è save15a901 27.fits filein,’save15a901 27.fits’ (from DATAdemo directory) getrec,50000 for i 70000,70200 do begin & getrec,i & accum & end ave (13CO near channel 6000) Run gbtgridder gbtgridder –c 5900:6100 –a 7 –noline –nocont –o test3save15a901 27.fitso Channels 5900:6100o Averaging over 7 channelso Avoid having software do continuum subtraction (already done) casaviewer (or ds9) to view output cube (test3 cube.fits)

L-band Pipeline Demo:DEMO NGC6946 HI pipeline Gbtidl offline,’TGBT17A 506 11’ Gbtidl summary (map scans 14-26 and reference scanis 27 want on HI which is IFNUM 0) gbtpipeline –i/home/sdfits/TGBT17A 506 11/TGBT17A 506 –m 14:26 –refscan 27 –w 0 –c 1700:2300 -a 50ooooooFirsts calibrates the data then grids the dataMap-scans are 14:26Reference scan is 27IFNUM 0 (spectral window 0)Channels 1700:2300Average 50 channels casaviewer (or ds9) to view output cube data

Argus deep frequency switching coadd:DEMO argus frequency switching deep coadd GBTIDL - offline,’TGBT17A 506 06’ GBTIDL - vanecal,53 (derive atmosphericparameters and Tsys* for all beams) GBTIDL - argus fsw,55,53,ifnum 0,fdnum 9(calibrate one scan for center beam) GBTIDL - for i 55,86 do begin &argus fsw,i,53,ifnum 0,fdnum 9 & accum &end GBTIDL - ave (Coadd all scans for one beam) GBTIDL - argus fsw coadd,55,86,53,ifnum 0(coadd all scans for all beams [takes 20min])

Saving data and Mapping fileout,’mysave.fits’ Reduce data like you want then type: keep After calibration within gbtidl can rungbtgridder (eg.):gbtgridder –c 11000:11251 –a 7 --noline –nocont –o myout mysave.fitsèmyout cube.fits myout weight.fits

Running the Pipeline Works for receivers with noise diodes (designedorignally for KFPA): %gbtpipeline –i –m 14:24 –refscan 13,26(where 14-24 are the map scans and 13 and 26are the reference scans)èwill calibrate and do the gridding

Example of reducing W-band DCR Data(daisy scan of point source)Ø sdfits -backends dcr TRCO 20160927 -scans 1 IDL ftab m,fdnum,exten no 1 {calibrate data based on plnum and fdnum:data1 gain*data} IDL hpfilt,data1,100,10,ndata IDL mymap griddata(ra,dec,ndata,dimension [60,60]) IDL smmap filter image(mymap,FWHM gaussian 3) IDL atv,smmap

The GBT has a lot of different observation types and many different methods for reduction Standard gbtidlroutines and the GBT pipeline supports VEGAS spectral-line data from position-switched or frequency-switched observations for receivers with noise diodes Pulsar data èPresto red