; ******************************* ; First part - basic procedures * ; ******************************* readdata,dir='060521_05:17:27' select,source='3c273',/p,/re bl[pbf].iaq=0 select,/p,/re uti_avgband ; check pointing data result=dat_filter(s_f,'"integ" lt "15"',/reset) if result ne 0 then flag,/flag select,/p,/re,band='c1' plot_var ; for DBA, check band='s25' also ; ant 4 blocked by subaru result=dat_filter(s_f,'"tssb" gt "140" and "blcd" like "4"',/reset) flag,/flag select,/reset tsys_ant ; determine the antenna-based tsys values tsys_replace ; replace ant x tsys values with ant y tsys values ; x=8 ; y=6 tsys_bsl ; repopulate the baseline-based values. ; check tsys select,/p,/re apply_tsys ; check tsys again select,/p,/re uti_avgband result=dat_filter(s_f,'"wt" gt "0" and "nch" eq "512"',/reset) pass_cal,cal_type='pha',smoothing=32,ntrim=8,frames_p=8 result=dat_filter(s_f,'"wt" gt "0" and "nch" eq "32"',/reset) pass_cal,cal_type='pha',smoothing=4,ntrim=1,frames_p=16 select,/p,/re uti_avgband result=dat_filter(s_f,'"wt" gt "0" and "nch" eq "512"',/reset) pass_cal,cal_type='amp',smoothing=32,ntrim=8,frames_p=8 result=dat_filter(s_f,'"wt" gt "0" and "nch" eq "32"',/reset) pass_cal,cal_type='amp',smoothing=4,ntrim=1,frames_p=16 select,/p,/re mir_save,'060521.newcal' ; Determine the gain calibrator fluxes- see extra topics below ; use 1517 2.68 jy ; use 1626 1.51 jy ; 2. continue gain cal mir_restore,'060521.newcal' select,/p,/re gain_cal,x='hours', cal_type='pha',/connect,/preavg,tel_bsl='telescope',refant=1 ; type "1517-243 yes 2.68" after prompt ; type "1626-298 yes 1.51" after prompt select,/p,/re gain_cal,x='hours',cal_type='amp',smoothing=0.8,/preavg,tel_bsl='telescope',refant=1 select,/p,/re,source='IMLUP',sideband='l' plot_spectra,x='fsky',frame_v='sb,band',frames_p=1,ntrim=2 select,/p,/re,band=['-s15'],sideband='u',source='IMLUP' uti_avgband select,/p,/re,band=['-s12','-s22'],sideband='l',source='IMLUP' uti_avgband select,/p,/re idl2miriad,dir='imlup.lc.vis',sideband='l',/cont,source='IMLUP' idl2miriad,dir='imlup.uc.vis',sideband='u',/cont,source='IMLUP' select,/p,/re,source='IMLUP' uti_subcont select,/p,/re idl2miriad,dir='imlup.us15.vis',sideband='u',band='s15',source='IMLUP' idl2miriad,dir='imlup.ls12.vis',sideband='l',band='s12',source='IMLUP' idl2miriad,dir='imlup.ls22.vis',sideband='l',band='s22',source='IMLUP' ; position shift select,source='IMLUP',/p,/re uti_pos_fix,-0.35,0.07 ; ******************************* ; second part - extra topics * ; ******************************* ; 1. flux calibration mir_restore,'060521.newcal' select,/p,/re,band='c1' gain_cal,cal_type='pha',/connect,/non_point,tel_bsl='telescope',refant=1 ; type "all yes" after prompt ; then return select,/p,/re,band='c1' gain_cal,cal_type='amp',x='hours',poly=0,tel_bsl='telescope',refant=1,/preavg,/non_point ; type "all no" after prompt ; then type "callisto yes" after prompt ; then return ; note that we select callisto to set the flux in this example. ; use your own flux calibrator. select,/p,/re,band='c1' flux_measure ; Below is the print out. ;# Source Flags Nscans Flux(Jy) SNR meantime REAL IMAG ; 3c273 128 11.7276 1343 5.84 11.7276 -0.0305 ; callisto g 94 4.8347 195 6.95 4.8347 -0.0058 ; 1517-243 80 2.7352 571 10.47 2.7352 -0.0014 ; 1626-298 102 1.5321 632 10.93 1.5321 0.0000 select,/p,/re,band='c1' result=dat_filter(s_f,'"el" gt "35" and "el" lt "47"') flux_measure ; Below is the print out ;# Source Flags Nscans Flux(Jy) SNR meantime REAL IMAG ; callisto g 92 4.8392 193 6.94 4.8392 -0.0056 ; 1517-243 48 2.6753 500 9.86 2.6753 -0.0008 ; 1626-298 40 1.5135 424 10.91 1.5135 0.0028 ; use 1517 2.68 jy ; use 1626 1.51 jy ; 2. baseline correction - if needed, do it before any calibration. mir_restore,'060521.newcal' select,/p,/re,source=['15','16'],ant=[2,3,4,5],sideband='u' plot_continuum,/preavg,frames_p=20,y='pha' select,/reset sma_cal_bas ; for esma ntel=10 ;060521_05:17:27.antennas ;060525_02:01:07.antennas mir_save,'060521.bc' ;3. IF1/IF2 phase offset correction mir_restore,'difif.save' select,source='16',/p,/re uti_difif plot_continuum,y='difif',/preavg ;Check the IF difference (either gradually changing with time or sudden phase jumps) before and after the correction. select,source='16',/p,/re gain_cal,/difif,tel_bsl='telescope',cal_type='pha',refant=6,/connect,/preavg,x='hours' select,source='16',/p,/re uti_avgband select,source='16',/p,/re plot_continuum,y='difif',/preavg uti_difif plot_continuum,y='difif',/preavg ; 4. dopplerTracking on multiple sources mir_restore,'2mass.save' ; sma engineering plot ;DSM_AS_IFLO_RA_D: 2.568678 ;DSM_AS_IFLO_DEC_D: 0.230625 select,/p,/re,band uti_doppler_fix,source='2mass',raref=2.568678, decref=0.230625