!------------------------------------------------------------------ ! @oo (.MOPSI is default extention) ! example macro for onoff reduction of MAMBO2 117-channel data ! ! note that you need to set your environment ! variable MOPSI_RCP=/aux/pc191b/mambo/rcp ! or wherever your RCP files (MRT_2002s_120.rcp etc) are. ! you can download a current tarball of my rcp dir from ! http://www.mpifr-bonn.mpg.de/staff/bertoldi/mambo !------------------------------------------------------------------ !dev i w lut idl4 set cha .4 set tick .2 sic set marker 0 0 0 0 pen /def init history init in_lis ! -- PICO VELETA: ! calibrate "/mrt-lx1/vis/flexible/bertoldi/rcp/MRT_MAMBO.CAL" ! i-d "/mrt_data/flexbol/fits/" ! o-d "/mrt-lx1/vis/flexible/mopsi/td" ! -- BONN: calibrate "/aux/pc191b/mambo/rcp/MRT_MAMBO.CAL" ! i-d "/aux/pc191b/mambo/mrt99s" ! i-d "/aux/pc191b/mambo/mrt99a" ! i-d "/aux/pc191b/mambo/mrt00s" ! i-d "/aux/pc191b/mambo/mrt00a" ! i-d "/aux/pc191b/mambo/mrt01a/fits" i-d "/aux/pc191b/mambo/mrt02s/fits" ! o-d "/aux/pc191b/bertoldi/mambo/mopsi/td" !-- MAKE A LIST OF ALL SCANS ! sys "cd /aux/pc191b/mambo/mrt02s/fits;ls | grep fits > ~/all.LIST" ! list "/homes/bertoldi/all.LIST" ! sel type oo ! sys "rm onof.LIST" ! write list onof ! pause !-- OR READ A PREPARED LIST ! list onof ! list 3C list "list/GRB-0203" sel GRB030329 ! list "list/UX25-0203" ! list "list/GRB021004.LIST" ! del scan 20021006_1436 ! list "list/GRB030306-0203.LIST" ! list "list/GRB030329-0203.LIST" ! sel BODYKX76* ! del scan 20030206_0434 ! sel 3C469.1 ! sel nrc 120 ! sel nrcs 40 sort lis list say " " say "Now you can select further by julian_d or object or type" pause !-- RUNS FASTER IF YOU DON'T PLOT !clo dev !============================================== init oo cl a !-- THE FIRST ITERATION IS TO DETERMINE THE SKY NOISE ! RELATIVE GAINS, NOT YET TO SUBTRACT THE CORRELATED NOISE! ! WE DO THIS USING THE SINGLE PHASES. !>>>>>>>>>>>>>>> START DETERMINATION OF FF <<<<<<<<<<<<<<<<<<<<<<<< for i 13 to 14 clos dev rea i phases open dev del dc !-- DELETE BAD CHANNELS TAKEN FROM MASTER LIST ! del rc "/vis/flexible/bertoldi/rcp/MRT_MAMBO.DRC" del rc "/aux/pc191b/mambo/rcp/MRT_MAMBO.DRC" ! del rc default !-- MASK SPIKES ! WARNING: THE SOURCE PEAK FLUX MUST NOT BE LARGER THAN 5 RMS init spike_poi bas t 0 > 6 rms < -6 rms bas t 0 > 5 rms < -5 rms bas t 1 !-- USE THE non_oo_mode FOR WEAK SOURCES ONLY stor wei rms2 az < 1e9 > -1e9 oo_mode ! stor wei rms2 az < 1e9 > -1e9 non_oo_mode pen /def set tick .05 ! cl ! plot corr !!--------------------------------------- SKY NOISE FILTER snf it 0 no sou ds -4 r 1 46 best 0 > 5 rms < -5 rms ff avcn ph llsf 1 ! DANGEROUS OPTION: cn cor ! cn cor cn cd cn w cfr 1 0.95 b cn av cn cd cn w cfr 1 0.95 b no rff ! pcm pcc pff pp pause run !--------------------------------------- ! SAVE THE CALCULATED FLAT FIELD !! sto rcp ! sto ff !>>>>>>>>>>>>>><<<<<<<<<<<>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<< !>>>>>>>>>>>>>> END DETERMINATION OF FF <<<<<<<<<<<<<<<<<<<<<<<< !-- NOW THE SECOND ITERATION IS TO SUBTRACT THE CORRELATED ! NOISE USING THE FLAT FIELD FROM THE PREVIOUS ITEREATION ! NOW WE READ IN THE PHASE DIFFERENCES. clo dev rea i phas diff open dev !mul -1 del dc !-- DELETE BAD CHANNELS TAKEN FROM MASTER LIST del rc "/aux/pc191b/mambo/rcp/MRT_MAMBO.DRC" ! del rc "/vis/flexible/bertoldi/rcp/MRT_MAMBO.DRC" ! del rc default !del rc 3 !-- MASK SPIKES ! WARNING: THE SOURCE PEAK FLUX MUST NOT BE LARGER THAN 5 RMS init spike_poi bas t 0 > 6 rms < -6 rms bas t 1 > 5 rms < -5 rms bas t 1 !-- OPACITY CORRECTION, READ FROM TAU TABLE ! tau "/vis/flexible/bertoldi/rcp/MRT_MAMBO" 10000 tau "/aux/pc191b/mambo/rcp/MRT_MAMBO" 10000 ! tau default 10000 !-- OR SET TAU EXPLICITLY, IF NOT AVAILABLE ! tau1 0.2 /st start ! tau1 0.2 /st end corr ext bas t 1 !-- GAIN-ELEVATION CORRECTION corr ge bas t 2 !-- FLUX CALIBRATION calibrate dividing mul 1000 bas t 2 set tick .1 cl pen /def plot sig lim -500 500 !-- USE THE non_oo_mode FOR WEAK SOURCES ONLY stor wei rms2 az < 1e9 > -1e9 oo_mode ! stor wei rms2 az < 1e9 > -1e9 non_oo_mode !-- READ THE AVERAGE SNFFCF: ! rcpars file "/aux/pc191b/mambo/rcp/MRT_2003_snff_new.rcp" ! sto rcp !-- FOLLOWING DOES NOT WORK (YET): ! ff file "/aux/pc191b/mambo/rcp/MRT_2003_snff.rcp" ! ff file "/aux/pc191b/mambo/rcp/MRT_2003_snff_new.rcp" ! sto ff !--------------------------------------- SKY NOISE FILTER snf it 4 ! sou gs.fits no sou ds -4 r 1 46 best 8 > 5 rms < -5 rms ! ff stored ff avcn rc llsf 1 ! DANGEROUS OPTION: cn cor cn ave cn cor cn cd cn w cfr 1 0.95 b ! cn cor cn cd cn w cfr 1 0.95 b ! cn ave cn cor cn cd cn w cfr 1 0.9 b !-- FLATFIELD RESTORE OPTIONS: no rff, rff rc #, rff on_rc, rff rff on_rc ! rff rc 1 run !--------------------------------------- !-- BASELINE ORDER USUALLY BEST 2, SOMETIMES 1 OR 3 bas t 2 hig 5 rms low -5 rms bas t 2 pen 1 plot sig lim -500 500 !-- USE THE non_oo_mode FOR WEAK SOURCES ONLY stor wei rms2 az < 1e9 > -1e9 oo_mode ! stor wei rms2 az < 1e9 > -1e9 non_oo_mode pen 4 !-- ON-OFF EVALUATION. PARAMETERS: ! on-rc 1 SET THE TARGET CHANNEL (check the obs log!) ! 1 OR 26 for 37-array ! 53 or 1 for 117-array ! pl sc lin -5 5 SET COLOR SCALE LIMITS ! wting stored USE WEIGHTING ! wting disab NO WEIGHTING ! app APPEND SCANS ! lim 70 -70 -70 70 SET PLOT LIMITS (37) ! 125 -125 -125 125 (117) ! no plot DONT PLOT oo app wtg stored lim 175 -175 -175 175 pl sc lin -10 10 !oo app wtg stored lim 70 -70 -70 70 pl sc lin -4 4 on-rc 1 !pause next !=========================================================== !list !pause open dev cl a cl plot oo plane 1 !-- OPTIONS: plane 1 pannel 2 yrange -2 2 !-- MAKE HARD COPIES sys "rm GRB.ps oo1.ps oo2.ps oo3.ps" hard GRB.ps /dev ps color hard oo1 /dev ps color list pause !plot oo plane 2 !hard oo2 /dev ps color !pause !cl !plot oo plane 3 !hard oo3 /dev ps color