#!/bin/csh -f # handling standard 2GHz hybrid-resolution data # # Responsible: Edmund Hodges-Kluck (UMd) & Jun-Hui Zhao (SAO) # Version 2.0 # ehk & jhz 2007-12-05 produce the template scripts for handling std SMA data. # jhz 2011-03-04 handling for both sidebands used for demo script. # jhz 2011-05-04 add illustration for demonstrating the detection # of HCO+ towards SgrA region. # jhz 2011-06-09 change the data path to CF where the test # data located. # testing data: 071004_00:26:54 # 071004_04:41:13 from SMA archive # ############################################################################# # Edmund Hodges-Kluck (UMd) & Jun-Hui Zhao (CfA) 12/5/07 # for the reduction of SMA data taken recently (2007 or later). # The SMA data, used in this example, were taken in a spectral # configuration with a hybrid resolution. The observations had # multiple pointing for mosaic image of molecular lines. This # E2E script consists of nine major steps with some detailed # comments # 1. READ THE RAW SMA DATA INTO MIRIAD # 2. INSPECT THE RAW UV DATA # 3. FRINGE AMPLITUDE CORRECTION # 4. BANDPASS CALIBRATION # 5. ANTENNA GAIN CALIBRATION # 6. BOOTSTRAP THE FLUX DENSITY SCALE # 7. CONTINUUM IMAGE # 8. LINE/CONTINUUM SEPARATION # 9. CONSTRUCT LINE IMAGE CUBE ############################################################## ### INTRODUCTION ############################################# ############################################################## # This is a full reduction in one line (HCO+ 3-2) looking at # a data set with data in both HCO+ and HCN 3-2 in the lower # sideband. To run the script, sequentially step through and # uncomment the various 'continue' markers and run through # until the script exits, then comment the marker out and # uncomment the marker for the next step. Refer to the SMA # MIRIAD manual for additional information. Note that we # find a non-detection on the source, but get nice images of # Sgr A*. ############################################################## set source=S1 goto continue ### LOAD THE DATA ############################################ # In this section we take the data from its original MIR # form and load it into MIRIAD. ############################################################## continue: set darea=/sma/SMAusers/jzhao/data/071004_00:26:54/ set darea2=/sma/SMAusers/jzhao/data/071004_04:41:13/ echo "1. READ THE RAW SMA DATA INTO MIRIAD" \rm -r 1E1740_1_rx1.lsb 1E1740_2_rx1.lsb smalod in=$darea out=1E1740_1 rxif=1 \ sideband=2 readant=8 nscans=1 smalod in=$darea2 out=1E1740_2 rxif=1 \ sideband=2 readant=8 nscans=1 # We had 2 files for the observation, so load in the data # twice and merge. #continue: \rm -r 1E1740_rx1.lsb 1E1740_rx1.usb uvaver vis=1E1740_1_rx1.lsb,1E1740_2_rx1.lsb out=1E1740_rx1.lsb uvaver vis=1E1740_1_rx1.usb,1E1740_2_rx1.usb out=1E1740_rx1.usb ### INSPECT RAW DATA ######################################## # In this section we look first at the sources in the # observation (uvindex) and then the amplitude vs. # time and the system temperature vs. time ############################################################# echo "2. INSPECT THE RAW UV DATA" echo "List the observing scans in the uv data" uvindex vis=1E1740_rx1.lsb uvindex vis=1E1740_rx1.usb echo "Press to continue" $< smauvplt vis=1E1740_rx1.lsb \ axis=time,ampl device=/xs nxy=2,5 \ yrange=0,300 smauvplt vis=1E1740_rx1.usb \ axis=time,ampl device=/xs nxy=2,5 \ yrange=0,300 echo "Press to continue" $< smavarplt vis=1E1740_rx1.lsb device=/xs \ xaxis=time \ yaxis=systemp nxy=2,4 smavarplt vis=1E1740_rx1.usb device=/xs \ xaxis=time \ yaxis=systemp nxy=2,4 ### FRINGE AMPLITUDE CORRECTION ############################# # The changes in the system temperature over the duration # of the observation essentially track changes in the # atmosphere. The system temperature measurements are # obtained by comparing the receiver output power from # an ambient temperature load with the sky power, so we # can calibrate the amplitude gains. ############################################################# echo "3. FRINGE AMPLITUDE CORRECTION" \rm -r 1E1740_rx1.lsb.tsys smafix vis=1E1740_rx1.lsb out=1E1740_rx1.lsb.tsys \ device=/xs xaxis=time \ yaxis=systemp nxy=2,4 \ options=tsyscorr \rm -r 1E1740_rx1.usb.tsys smafix vis=1E1740_rx1.usb out=1E1740_rx1.usb.tsys \ device=/xs xaxis=time \ yaxis=systemp nxy=2,4 \ options=tsyscorr echo "Inspect vis data and flag bad data" # We could filter out various times while we're doing the # flagging here. We can also do this later when looking # at the bandpass calibrator (as is the case in this script) # continue: # Jupiter was just there for pointing and makes it harder to do # interactive flagging. uvflag vis=1E1740_rx1.lsb.tsys select='source(jupiter)' flagval=flag uvflag vis=1E1740_rx1.usb.tsys select='source(jupiter)' flagval=flag # Antenna 4 was apparently not on, flag it just in case uvflag vis=1E1740_rx1.lsb.tsys select='ant(4)' \ flagval=flag uvflag vis=1E1740_rx1.usb.tsys select='ant(4)' \ flagval=flag # Interactively flag bad data smablflag vis=1E1740_rx1.lsb.tsys axis=time,ampl device=/xs smablflag vis=1E1740_rx1.usb.tsys axis=time,ampl device=/xs # Look at the bandpass calibrator echo "Inspect spectral data" echo "for uranus" smauvspec vis=1E1740_rx1.lsb.tsys \ select='source(uranus)' \ interval=1000 \ axis=freq,both device=/xs nxy=1,5 hann=5 smauvspec vis=1E1740_rx1.usb.tsys \ select='source(uranus)' \ interval=1000 \ axis=freq,both device=/xs nxy=1,5 hann=5 echo "for neptune" smauvspec vis=1E1740_rx1.lsb.tsys \ select='source(neptune)' \ interval=1000 \ axis=freq,both device=/xs nxy=1,5 hann=5 smauvspec vis=1E1740_rx1.usb.tsys \ select='source(neptune)' \ interval=1000 \ axis=freq,both device=/xs nxy=1,5 hann=5 # check SgrA* too smauvspec vis=1E1740_rx1.lsb.tsys \ select='source(sgra*,Sg*)' \ interval=1000 \ axis=freq,both device=/xs nxy=1,5 hann=5 smauvspec vis=1E1740_rx1.usb.tsys \ select='source(sgra*,Sg*)' \ interval=1000 \ axis=freq,both device=/xs nxy=1,5 hann=5 ### BANDPASS CALIBRATION #################################### # Bandpass calibration gives the frequency solution, so # we use something bright -- in the case of the SMA, a # planet typically. In this case, Uranus. ############################################################# #continue: echo "4. BANDPASS CALIBRATION" # smamfcal makes calibration corrections (antenna gains, delay # terms and passband shapes) to a multi-frequency observation. # The gains are calculated periodically using the interval # specified. If phase stability is poor or you are using a # planet, set weight=2 (see manual). weight=2 is default for # the SMA. # continue: smamfcal vis=1E1740_rx1.lsb.tsys select='source(uranus,neptune)' edge=2,2 \ weight=2 refant=3 interval=600 echo "Check up the bandpass solutions for LSB data" $< smagpplt vis=1E1740_rx1.lsb.tsys device=/xs \ yaxis=amp,phase \ options=bandpass polyfit=5 \ nxy=2,4 smamfcal vis=1E1740_rx1.usb.tsys select='source(uranus,neptune)' edge=2,2 \ weight=2 refant=3 interval=600 echo "Check up the bandpass solutions for USB data" $< smagpplt vis=1E1740_rx1.usb.tsys device=/xs \ yaxis=amp,phase \ options=bandpass polyfit=5 \ nxy=2,4 echo 'apply the bpass solutions to the data' \rm -r 1E1740_rx1.lsb.tsys.bp uvaver vis=1E1740_rx1.lsb.tsys out=1E1740_rx1.lsb.tsys.bp smauvspec vis=1E1740_rx1.lsb.tsys.bp \ select='source(sgr*,Sgr*)' \ interval=1000 \ axis=freq,both device=/xs nxy=2,2 \rm -r 1E1740_rx1.usb.tsys.bp uvaver vis=1E1740_rx1.usb.tsys out=1E1740_rx1.usb.tsys.bp smauvspec vis=1E1740_rx1.usb.tsys.bp \ select='source(sgr*,Sgr*)' \ interval=1000 \ axis=freq,both device=/xs nxy=2,2 # Interactively flag again to get anything still messing up # the solution. echo 'In next step, please use the interactive editing tool to flag' echo 'the obvious bad visibilities which are with large deviations' echo 'from the normal visibilities.' $< smablflag vis=1E1740_rx1.lsb.tsys.bp \ axis=time,ampl device=/xs smablflag vis=1E1740_rx1.usb.tsys.bp \ axis=time,ampl device=/xs uvflag vis=1E1740_rx1.lsb.tsys.bp edge=15,15 \ flagval=flag select='window(1,2,3,4)' uvflag vis=1E1740_rx1.usb.tsys.bp edge=15,15 \ flagval=flag select='window(1,2,3,4)' # We have to vary the windows we're looking to clean up. # For this observation, # select='window(20,21,22,23,24)' selects the HCN (3-2) # select='window(1,2,3,4)' selects the HCO+ (use this for now, # it's brighter!) smauvspec vis=1E1740_rx1.lsb.tsys.bp \ select='source(sgr*,Sgr*),ant(1)(6)' \ interval=1000 \ axis=freq,both device=/xs nxy=1,1 smauvspec vis=1E1740_rx1.usb.tsys.bp \ select='source(sgr*,Sgr*),ant(1)(6)' \ interval=1000 \ axis=freq,both device=/xs nxy=1,1 ### ANTENNA GAIN CALIBRATION ################################ # The gain calibration sources for this observation were # 1733-130, SgrAstar. Here we apply the gain calibration to # the data. ############################################################# echo "5. ANTENNA GAIN CALIBRATION" # Filter out bad times here -- we decide if/what to filter # based on the smauvplt below, so may have to run this step # again with the line below uncommented and changed as # appropriate. # NOTE: May need to exclude 1.75h-3h based on the # system temperature/phase problems. # # uvflag vis=1E1740_rx1.lsb.tsys.bp \ # select='time(1:45,3:00)' flagval=flag # # If you are unhappy with the result of the flagging, you can # return to this step and run: # # uvflag vis=1E1740_rx1.lsb.tsys.bp \ # select='time(1:45,3:00)' flagval=unflag # # However, doing so may unflag other data you didn't want to unflag, # so you might have to run smablflag again to interactively flag # the data again. If you are worried, start over and don't flag # based on time. You might also create a new file to do the time # filtering on. smablflag vis=1E1740_rx1.usb.tsys.bp device=/xs axis=time,imag \ select='source(1733*,Sgr*)' options=nobase smablflag vis=1E1740_rx1.usb.tsys.bp device=/xs axis=time,imag \ select='source(1733*,Sgr*)' options=nobase echo "Press to continue." $< smauvplt vis=1E1740_rx1.lsb.tsys.bp \ select='source(1733*,Sgr*)' \ device=/xs options=nocal axis=time,amp nxy=1,3 $< smauvplt vis=1E1740_rx1.usb.tsys.bp \ select='source(1733*,Sgr*)' \ device=/xs options=nocal axis=time,amp nxy=1,3 echo "Split the gain calibrators from the multiple source file" # The number after these files will differ based on the dataset. # Therefore, this step may need to be run twice. \rm -r 1733-130.267745 SgrAstar.267745 uvsplit vis=1E1740_rx1.lsb.tsys.bp \ select='source(1733-130,SgrAstar)' options=nowindow \rm -r 1733-130.275865 SgrAStar.275865 uvsplit vis=1E1740_rx1.usb.tsys.bp \ select='source(1733-130,SgrAstar)' options=nowindow echo "rename the calibrator files" \rm -r 1733-130.l.tsys.bp sgra.l.tsys.bp mv 1733-130.267745 1733-130.l.tsys.bp mv SgrAStar.267745 sgra.l.tsys.bp \rm -r 1733-130.u.tsys.bp sgra.u.tsys.bp mv 1733-130.275865 1733-130.u.tsys.bp mv SgrAStar.275865 sgra.u.tsys.bp echo " " echo "Solve for antenna gains" echo " " # Can we use selfcal? Let's hope so. They're both strong point # sources in this case. # Note that here we do phase only so that we can solve for # phase only. echo 'LSB' selfcal vis=1733-130.l.tsys.bp interval=1 options=phas refant=3 selfcal vis=sgra.l.tsys.bp interval=1 options=phas refant=3 echo "Plot the gain solutions" smagpplt vis=1733-130.l.tsys.bp device=/xs \ yaxis=phase log=0102+584gain.log \ options=gains polyfit=6 \ nxy=2,4 echo "Press to continue." $< smagpplt vis=sgra.l.tsys.bp device=/xs \ yaxis=phas \ options=gains polyfit=6 \ nxy=2,4 echo "Merge the two gain tables" smagpplt vis=1733-130.l.tsys.bp,sgra.l.tsys.bp device=/xs \ yaxis=amp,pha \ options=gains,merge polyfit=8 \ nxy=2,4 #the merged gain table is place in the second file, namely, #sgra.tsys.bp smagpplt vis=sgra.l.tsys.bp device=/xs \ yaxis=phas \ options=gains polyfit=6 \ nxy=2,4 # Note that the default interpolation interval equals to # the solution interval. One may make a longer interval # in order to apply (interpolate) the selfcal solutions to # the target sources. # Modify the SgrA* header file so that the interval value # is changed to 0.2day, then copy the gain table back to the # main file with all sources. puthd in=sgra.l.tsys.bp/interval value=0.2 gpcopy vis=sgra.l.tsys.bp out=1E1740_rx1.lsb.tsys.bp \ mode=copy options=nopass echo 'USB' selfcal vis=1733-130.u.tsys.bp interval=1 options=phas refant=3 selfcal vis=sgra.u.tsys.bp interval=1 options=phas refant=3 echo "Plot the gain solutions" smagpplt vis=1733-130.u.tsys.bp device=/xs \ yaxis=phase log=0102+584gain.log \ options=gains polyfit=6 \ nxy=2,4 echo "Press to continue." $< smagpplt vis=sgra.u.tsys.bp device=/xs \ yaxis=phas \ options=gains polyfit=6 \ nxy=2,4 #continue: echo "Merge the two gain tables" smagpplt vis=1733-130.u.tsys.bp,sgra.u.tsys.bp device=/xs \ yaxis=amp,pha \ options=gains,merge polyfit=8 \ nxy=2,4 #the merged gain table is place in the second file, namely, #sgra.tsys.bp smagpplt vis=sgra.u.tsys.bp device=/xs \ yaxis=phas \ options=gains polyfit=6 \ nxy=2,4 # Note that the default interpolation interval equals to # the solution interval. One may make a longer interval # in order to apply (interpolate) the selfcal solutions to # the target sources. # Modify the SgrA* header file so that the interval value # is changed to 0.2day, then copy the gain table back to the # main file with all sources. puthd in=sgra.u.tsys.bp/interval value=0.2 gpcopy vis=sgra.u.tsys.bp out=1E1740_rx1.usb.tsys.bp \ mode=copy options=nopass #continue: # See what the results are. smauvplt vis=1E1740_rx1.lsb.tsys.bp axis=time,amp device=/xs nxy=1,4 smauvspec vis=1E1740_rx1.lsb.tsys.bp axis=freq,both \ interval=1000000 options=nobase,avall \ select='source(sgra*)' device=/xs nxy=1,1 hann=15 echo 'apply the gain to the data' \rm -r 1E1740_rx1.lsb.tsys.bp.gn uvaver vis=1E1740_rx1.lsb.tsys.bp out=1E1740_rx1.lsb.tsys.bp.gn $< smauvplt vis=1E1740_rx1.usb.tsys.bp axis=time,amp device=/xs nxy=1,4 smauvspec vis=1E1740_rx1.usb.tsys.bp axis=freq,both \ interval=1000000 options=nobase,avall \ select='source(sgra*)' device=/xs nxy=1,1 hann=15 echo 'apply the gain to the data' \rm -r 1E1740_rx1.usb.tsys.bp.gn uvaver vis=1E1740_rx1.usb.tsys.bp out=1E1740_rx1.usb.tsys.bp.gn ### BOOTSTRAP THE FLUX DENSITY SCALE ######################## # Find the scaling factor by looking at the bandpass # calibrator, then apply the gain to the data ############################################################# echo "6. BOOTSTRAP THE FLUX DENSITY SCALE" # This will calculate the scaling factor based on your # bandpass calibrator (the SMA function looks specifically # for a planet) and then applies it to the data. To # calculate but not apply, use the option "noapply". smaflux vis=1E1740_rx1.lsb.tsys.bp.gn \ select='source(uranus)' mirhome=$MIR # Specific to this dataset: # Found solar system objects: uranus # Frequency(GHz) Tb(Kelvin) # 267.797 93.61 # Scaling the data by 0.838 smaflux vis=1E1740_rx1.usb.tsys.bp.gn \ select='source(uranus)' mirhome=$MIR echo "Apply the scaling factor gains to the data" \rm -r 1E1740_rx1.lsb.tsys.bp.gn.av uvaver vis=1E1740_rx1.lsb.tsys.bp.gn out=1E1740_rx1.lsb.tsys.bp.gn.av # Check for the spectrum of Sgr A* smauvspec vis=1E1740_rx1.lsb.tsys.bp.gn.av \ select='source(sgra*),window(1,2,3,4)' \ interval=1000 hann=5 \ axis=freq,both device=/xs nxy=1,1 options=nobase,avall \rm -r 1E1740_rx1.usb.tsys.bp.gn.av uvaver vis=1E1740_rx1.usb.tsys.bp.gn out=1E1740_rx1.usb.tsys.bp.gn.av # Check for the spectrum of Sgr A* smauvspec vis=1E1740_rx1.usb.tsys.bp.gn.av \ select='source(sgra*),window(1,2,3,4)' \ interval=1000 hann=5 \ axis=freq,both device=/xs nxy=1,1 options=nobase,avall ############################################################# # At this point, the data has had all the calibrations applied # to it. We now look at various sources within the data set. ############################################################# # Change this to look at different sources, but remember to change # manually in other places too as necessary uvlin vis=1E1740_rx1.lsb.tsys.bp.gn.av chans=1,2784 \ out=1E1740_rx1.lsb.tsys.bp.gn.av.ch0 \ order=1 mode=chan0 options=nowin $< uvlin vis=1E1740_rx1.usb.tsys.bp.gn.av chans=1,2784 \ out=1E1740_rx1.usb.tsys.bp.gn.av.ch0 \ order=1 mode=chan0 options=nowin set source=SgrAStar ### CONTINUUM IMAGE ######################################### # We make an image (via inversion) of the source in the # continuum bands -- in this case we put lines in the 1,2,3,4 # and 20,21,22,23,24 channels and had the rest as wide channels # with no lines. Thus, we look at the source in all of these # wide channels. ############################################################# echo "7. CONTINUUM IMAGE" \rm -r $source.con.map $source.con.beam $source.con.icmp invert vis=1E1740_rx1.lsb.tsys.bp.gn.av.ch0,1E1740_rx1.usb.tsys.bp.gn.av.ch0 \ map=$source.con.map beam=$source.con.beam \ imsize=512 cell=0.6 sup=0 \ select='source(SgrA*)' $< clean map=$source.con.map beam=$source.con.beam \ out=$source.con.icmp gain=0.08 \ cutoff=0 niters=3500 \ region=arcsec,'box(-5,-5,5,5)' $< \rm -r $source.con.icln restor model=$source.con.icmp beam=$source.con.beam \ map=$source.con.map \ out=$source.con.icln $< cgdisp in=$source.con.icln type=pixel \ region=arcsec,'boxes(-25,-25,25,25)' \ xybin=1,1 device=fig1.ps/cps nxy=1,1 \ options=beambr,wedge,blacklab \ labtyp=arcsec,arcsec range=0.25,2.5,lin,2 \ cols1=7 csize=1,1,1 $< imstat in=$source.con.icln region='box(20,20,80,80)' ### LINE/CONTINUUM SEPARATION ################################ # In this section we subtract the continuum from the lines to # enhance contrasts in what is left. ############################################################## #continue: set source=S1 echo "8. LINE/CONTINUUM SEPARATION" # In this case, our rest frequency was set to 267.55762 (HCO+ 3-2) \rm -r $source.hco+.uv # You must set source here -- $source won't work uvaver vis=1E1740_rx1.lsb.tsys.bp.gn.av \ select='source(S1_CR),window(1,2,3,4)'\ out=$source.hco+.uv # Plot of amplitude vs. LSR velocity and phase vs. velocity smauvspec vis=$source.hco+.uv \ interval=10000 options=nobase,avall \ axis=vel,both device=/xs nxy=1,1 hann=15 echo "Convert sky-frequency to velocity " echo "resolution of 1 km/s" $< # The line=velocity argument selects the range in terms of # velocities in the data; in this case we take essentially # the full range. The values used are determined by # looking at the smauvspec plot from above, so you may run # through this section a few times. \rm -r $source.hco+vel.uv uvaver vis=$source.hco+.uv line=velocity,390,-292,1 \ out=$source.hco+vel.uv # Plot of Amplitude vs. channels and phase vs. channels smauvspec vis=$source.hco+vel.uv \ interval=10000 options=nobase,avall \ axis=chan,both device=/xs nxy=1,1 hann=5 echo "Take out the continuum using linear fitting to" echo "the line free channels" \rm -r $source.hco+vel.uv.lin # uvlin performs the continuum subtraction by fitting a polynomial # to the real and imaginary parts of the line-free channels (here # specified) uvlin vis=$source.hco+vel.uv chans=1,100,290,390 \ out=$source.hco+vel.uv.lin\ order=1 mode=line # chans=1,100,290,390 selects channels 1-100 and 290-390 for the # continuum channels we use for subtraction -- from those we use # linear interpolation to do the subtraction # SgrA*: chans=5,80,150,220 (because there are different # molecular features towards this source at various velocities than # our target) # 1E1740.7-2942: chans=1,100,290,390 echo "Press to continue." $< echo "Plot the continuum-free spectrum" smauvspec vis=$source.hco+vel.uv.lin options=nobase,avall \ interval=1000 \ axis=vel,real device=/xs nxy=1,1 hann=15 echo "Press to continue." $< ### CONSTRUCT LINE IMAGE CUBE ################################ # Invert the visibilities in the line of the source and # deconvolve. Apply the model and look at the images. ############################################################## echo "9. CONSTRUCT LINE IMAGE CUBE" \rm -r $source.hco+.map $source.hco+.beam $source.hco+.icmp # A note regarding inversion: see the manual page. The # sidelobe suppression area (sup) is given in arcseconds, and # gives the area around a source where inversion tries to # suppress the sidelobes. The default shape is square, the # default behavior is suppression across the field. # The visibility weighting robustness parameter (robust=x) # assigns weight to visibilities based on uv coverage. # Natural weighting reduces the noise but degrades the # beamshape. # We can also change the fwhm parameter (fwhm=theta_maj,theta_min, pa); # the SNR in the output is optimized when the parameter is set to the # FWHM of features in the image. Careful: In deep cleaning, you # can deconvolve noise this way too and make what looks like a convincing # detection. One may set cutoff to stop the cleaning. # The cutoff can be chosen based on the theoretical noise # calculated from invert. Try cutoff= 2-3 sigma. $< invert vis=$source.hco+vel.uv.lin map=$source.hco+.map \ beam=$source.hco+.beam \ imsize=512,512 cell=0.6 sup=0 \ line=vel,50,-200,2 #version 1.0 setup line=vel,10,-150,2 # For S1, line=vel,10,-160,5, for S2 line=vel,10,-120,5 (we know # where the features are from a previous CARMA observation) echo 'clean' $< \rm -r $source.hco+.icmp clean map=$source.hco+.map beam=$source.hco+.beam \ out=$source.hco+.icmp gain=0.08 \ cutoff=.4 niters=5000 \ region=arcsec,'boxes(-25,-25,25,25)(1,50)' echo 'restor' \rm -r $source.hco+.icln restor model=$source.hco+.icmp beam=$source.hco+.beam \ map=$source.hco+.map \ out=$source.hco+.icln echo 'display' cgdisp in=$source.hco+.icln type=c \ region=arcsec,'boxes(-25,-25,25,25)' \ xybin=1,1 device=/xs nxy=5,5 options=full,beambr,trlab,3val \ labtyp=arcsec,arcsec cols1=7 csize=0.5,0.5,0.5 \ slev=a,0.2 levs1=-5,3,4,8,16,32,64,128,256 echo "statistics on the channel images" imstat in=$source.hco+.icln region=quarter \ axes=ra,dec imstat in=$source.hco+.icln region='boxes(30,30,60,60)' \ axes=ra,dec echo "Press to continue." $< cgdisp in=$source.hco+.icln type=pixel \ region=arcsec,'boxes(-25,-25,25,25)' \ xybin=1,1 device=/xs nxy=3,3 options=beambr,wedge,trlab,3val \ labtyp=arcsec,arcsec range=0,0,lin,2 cols1=7 csize=0.5,0.5,0.5 echo "Press to continue." $< \rm -r $source.hco+.m0 moment in=$source.hco+.icln region='quarter(1,50)' \ out=$source.hco+.m0 axis=3 \ mom=0 clip=-1.2,1.2 cgdisp in=$source.hco+.m0 type=pixel \ region=arcsec,'boxes(-30,-30,30,30)' \ xybin=1,1 device=/xs \ nxy=1,1 options=beambr,wedge,trlab,3val \ labtyp=arcsec,arcsec range=0,0,lin,2 cols1=7 csize=1,1,1 $< \rm -r $source.hco+.m1 moment in=$source.hco+.icln region='quarter(1,50)' \ out=$source.hco+.m1 axis=3 \ mom=1 clip=-1.2,1.2 cgdisp in=$source.hco+.m1 type=pixel \ region=arcsec,'boxes(-30,-30,30,30)' \ xybin=1,1 device=/xs \ nxy=1,1 options=beambr,wedge,trlab,3val \ labtyp=arcsec,arcsec range=-200,-100,lin,2 cols1=7 csize=1,1,1 # check the spectum from the image cube # imspect in=$source.hco+.icln region=arcsec,'box(-3,-3,3,3)' device=/xs # There was a negative detection of HCO+ line towards S1_CR. In the follwoing, # we show the detection of absorption HCO+ towards SgrA* and mapping it set source=SgrAStar \rm -r $source.hco+.uv uvaver vis=1E1740_rx1.lsb.tsys.bp.gn.av select='source(SgrAStar)' \ line=velocity,117,-292,5 out=$source.hco+.uv smauvspec vis=$source.hco+.uv \ interval=10000 options=nobase,avall \ axis=vel,both device=fig2.ps/cps nxy=1,1 \rm -r $source.hco+vel.uv.lin uvlin vis=$source.hco+.uv chans=5,25,90,115 \ out=$source.hco+vel.uv.lin \ order=1 mode=line smauvspec vis=$source.hco+vel.uv.lin options=nobase,avall \ interval=1000 \ axis=vel,real device=/xs nxy=1,1 \rm -r $source.hco+.map $source.hco+.beam $source.hco+.icmp invert vis=$source.hco+vel.uv.lin map=$source.hco+.map \ beam=$source.hco+.beam \ imsize=512,512 cell=0.6 sup=0 options=systemp \ line=vel,100,-250,5 \rm -r $source.hco+.icmp clean map=$source.hco+.map beam=$source.hco+.beam \ out=$source.hco+.icmp gain=0.08 \ cutoff=.4 niters=5000 \ region=arcsec,'boxes(-25,-25,25,25)(1,100)' \rm -r $source.hco+.icln restor model=$source.hco+.icmp beam=$source.hco+.beam \ map=$source.hco+.map \ out=$source.hco+.icln cgdisp in=$source.hco+.icln type=c \ region=arcsec,'boxes(-25,-25,25,25)(1,100)' \ xybin=1,1 device=/xs nxy=5,5 options=full,beambr,trlab,3val \ labtyp=arcsec,arcsec cols1=7 csize=0.5,0.5,0.5 \ slev=a,0.2 levs1=-5,3,4,8,16,32,64,128,256 $< imspect in=$source.hco+.icln region=arcsec,'boxes(-0.,-0.,0.,0.)(1,100)' \ device=fig3.ps/ps yrange=-1.5,1. $< set source=SgrAStar imstat in=$source.hco+.icln region='boxes(30,30,60,60)' \ axes=ra,dec \rm -r $source.hco+.m0 moment in=$source.hco+.icln region='quarter(1,100)' \ out=$source.hco+.m0 axis=3 \ mom=0 clip=-10,0.52 cgdisp in=$source.hco+.m0 type=pixel \ region=arcsec,'boxes(-35,-35,35,35)' \ xybin=1,1 device=fig4.ps/cps \ nxy=1,1 options=beambr,wedge,blacklab \ labtyp=hms,dms range=7,35,lin,2 cols1=7 csize=1,1,1 echo " " echo "The end" echo " " exit #jhz: updated the name of the script #jhz: make figures for demonstration