DR21 13CO Argus commissioning data Individual 0.2sec spectral for 16 beams reduced using "argus_mapcal.pro" ======== IDL CODE: pro argus_mapcal,sc1,sc2,calsc,nint,cut=cut,datasm=datasm ;; ;;Calibrates total power OTF mapping assuming the edges of each scan ;;can be used as the OFF ;; ;;sc1=Initial scan leg ;;sc2=Final scan leg ;;calsc=VANE scan ;;nint=Number of Integrations in Scan leg ;;cut = rms level above which data are ignored in units of [K] in Ta* ;;datasm = smoothing the output data channels ;;;Key Parts of the code: ;;use end samples of each scan to define OFF ;;edge of sca nn=nint-1 i1=0 i2=9 ;;map range 10-291 int i3=10 i4=nn-10 ;;edge of scan i6=nn-9 i7=nn ;;Derive Tcal for Ta* calibration gettp,calsc,fdnum=9,ifnum=ifnum,quiet=1 ;;Compute Tcal ;;twarm in C convert to K twarm=!g.s[0].twarm+273.15 time=!g.s[0].mjd freq=!g.s[0].reference_frequency/1.e9 el=!g.s[0].elevation getatmos,el=el,mjd=time,freq=freq,outvals if (n_elements(tau) eq 0) then tau=outvals(0) tatm=outvals(2) am=1./sin(el*!pi/180.) ;; tbg=2.725 tcal=(tatm -tbg) + (twarm-tatm)*exp(tau*am) ;;Loop over Beams (kk), scans (ii), and samples (j) for kk=0,15 do begin ;;Get Vane Cal scan gettp,calsc,fdnum=kk,ifnum=ifnum,quiet=1 vcal=median(getdata(0)) ;;beams are k, scans are ii for ii=sc1,sc2 do begin chunk = getchunk(scan=ii,fdnum=kk,count=nchunk) ;;Averaging OFF data for scan (using ends of each scan) for j =i1,i2 do accum, dc=chunk[j] for j =i6,i7 do accum, dc=chunk[j] ave ;;Copy OFF to container 1 copy,0,1 vec=median(getdata(0)) ;;Compute Tsys*=Tcal/(VANE/OFF -1.0) mytsys=tcal/(vcal/vec - 1.) ;;Calibrate via tsys*(ON-REF)/REF for every ON sample in scan for j =i3,i4 do begin set_data_container,chunk[j],buffer=0 subtract,0,1 divide,0,1 scale,mytsys ;;Fit and remove baseline bshape baseline ;;Smooth output data gsmooth,datasm,/decimate print,'saving',kk,ii,j keep endfor endfor endfor ====== The above processing can take several hours to complete, so skip ahead and use the output from this step. ==>output file is save15a901_27.fits (11GB file) 167506 calibrated spectra (fv file to examine) Load in data into GBTIDL GBTIDL -> filein,'save15a901_27.fits' GBTIDL -> list (will take awhile) Look an example spectrum GBTIDL -> getrec,50000 Average some of the samples GBTIDL -> freeze GBTIDL -> for i=70000,70200 do begin & getrec,i &print, i & accum &end GBTIDL -> ave % ACCUMAVE: Average of : 201 spectra GBTIDL -> show (average of 201 spectra) see detection of 13CO near channel 6000 Average data from beam10 for several scans GBTIDL -> summary GBTIDL -> for i=21,50 do begin & gettp,i,fdnum=9 & accum & end GBTIDL -> ave % ACCUMAVE: Average of : 33 spectra GBTIDL -> show Each of the 167k spectra has an position associated with it. Use gbtgridder to make data cubes. $gbtgridder -c 5900:6100 -a 7 --noline --nocont -o test3 save15a901_27.fits $casaviewer (load in test3_cube.fits)