!!======================================================= !! oo.mopsic version 2006-02-28 !! !! usage: @init !! @oo [yes/no] [diagnostic output and pauses] !! !! on-off script condensed from RZ's mopsic pipeline !! bertoldi@astro.uni-bonn.de !! !! before running @oo run @init !!======================================================= let dafsdir "/home/bertoldi/mambo/175_05_carilli/dafs/MRT_MAMBO.CAL" let dafsname "MRT_MAMBO" let niter 5 !! NUMBER OF SN ITERATIONS let reaph yes !! READ THE PHASES let plow -500 !! PLOTTING RANGE let phigh 500 let cmin 1 !! PLOT CHANNEL RANGE let cmax 120 if exist('&1') then let diagnostic '&1' else let diagnostic no endif init history clear init in_lis in_list "mydata" sel type oo !! SELECT YOUR OBJECT BY NAME AND DELETE BAD SCANS !let oname 0818+1722 ; sel 0818+1722 !del scan 20051208s18 20051219s47 20051219s48 20051219s49 20051219s50 20060129s11 !let oname 0927+2001 ; sel 0927+2001 !let oname 1335+3533 ; sel 1335+3533 !del scan 20051209s32 20051209s33 20051209s34 20051209s35 !del scan 20051218s33 20051218s34 20051218s35 let oname 1602+4228 ; sel 1602+4228 del scan 20051208s39 20051208s40 !let oname all !sel 0818+1722 0927+2001 1335+3533 1602+4228 !sel JD 2453722.7 2453730 sort in_list sel nrc 120 sel subscans even if diagnostic then list say " " say "Now you can select further by julian_d or object or type" pause endif init oo cle a !!------------------------------------------------------------ for i 1 to nobsin close dev if reaph then rea 'i' /phase else rea 'i' /ac_phase diff /dc_phase sum endif open dev !! SET THE BASELINE ORDER - CAN PLAY BTW 0 AND 3 !! YOU MAY CHOOSE DIFFERENT ORDERS FOR SUBSETS !if i.ne.48 then let order1 1 let order2 2 let order3 2 !else ! let order1 1 ! let order2 1 ! let order3 1 !endif !! DIGNOSTIC PLOT PHASES TO CHECK FOR BAD SCANS if exist(GTV%DEVICES).and.diagnostic then set cha .4 set tick .2 pen /def clear plot sig 118 pause clear plot sig 20 pause endif !! DELETE BAD CHANNELS del dc del rc default del rc 39 73 !! THEY SEEM SPIKY IN WINTER 05/06 if reaph then !! REGRIDDING THE DATA REDUCES THE SIGNAL IN ONE CASE TESTED: ! grid tinc phas dif endif init spike_pointer !! MASK SPIKES bas t 0 < -5 rms /mode not_oo > 5 rms /mode not_oo ! > 7 rms ! < -7 rms bas t 'order1' < -5 rms /mode not_oo > 5 rms /mode not_oo !! OPACITY bas t 'order1' tau default 10000 correct ext !! GAIN-ELEVATION bas t 'order2' correct ge !! CALIBRATION bas t 'order2' calibrate default !! SELECT DEFAULT CALIBRATION FILE calibrate dividing mul 1000 !! CONVERT TO mJy bas t 'order3' ! PLOT SIGNAL if exist(GTV%DEVICES) then set cha .4 set tick .1 cle pen /def plot sig 'cmin' 'cmax' /lim 'plow' 'phigh' if diagnostic then pause endif endif !! MASK - CARFUL: NEED TO MASK PAIRS OF SUBSCANS ! if i.eq.13 then ! mask subs 5 to 8 ! mask rows rms > 60 ! end if ! stor wei rms2 az < 1e9 > -1e9 oo_mode stor wei rms2 x < 1e9 > -1e9 oo_mode !!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - !!- - - - - - - - - - CORRELATED NOISE FILTER aka SKYNOISE FILTER - - - - if 'niter'.gt.0 then csf iterations 'niter' 0 disable source_calculation ds -4 !! SIGMA CLIPPING range 1 46 !! DISTANCE RANGE OVER WHICH COR NOISE IS COMPUTED best 7 !! NUMBER OF CHANNELS FOR WITH COR NOISE IS COMPUTED !! DESPIKE ! < -4 rms /mode standard > 4 rms /mode standard < -4 rms /mode not_oo > 4 rms /mode not_oo ! < -6 rms > 6 rms ! ffc avcn rc llsf 1 ! ffc avcn ph llsf 1 ffc default ! cn aver cn median !! CAN PLAY WITH WEIGHT TRANSFER FUNCTION. DEFAULT: ccrc 2 0.8 best cn weighting ccrc 2 0.8 best !! SOME OLD OPTIONS THAT MAY NOT WORK: ! cn nw ! cn ave cn cor cn cd cn w cfr 1 0.9 b ! cn ave cn cd cn w cfr 1 0.9 b ! EITHER bcn 0 OR rff on_rc ; LATTER GIVES BETTER S/N ! bcn 0 rff on_rc run endif !!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if exist(GTV%DEVICES) then pen 1 plot sig 'cmin' 'cmax' /lim 'plow' 'phigh' if diagnostic then pause endif endif ! phase dif !! IN CASE YOU DID SKYNOISE REDUCTION ON PHASES init spike bas t 'order2' hig 6 rms low -6 rms bas t 'order2' ! stor wei rms2 az < 1e9 > -1e9 oo_mode stor wei rms2 x < 1e9 > -1e9 oo_mode !! TO COADD DATA FROM DIFFERENT POSITIONS/SOURCES: ! set sys eq ! projection 1 2 3 4 5 6 ! set syst hor pen 4 oo append calc per subscan weighting per subscan ! gate flux -20 20 !oo append calc per scan weighting per scan !oo append calc per subscan weighting per scan no plot !oo append calc per scan weighting per subscan no plot !oo append calc per subscan weighting per subscan no plot !oo append body calc per subscan weighting per subscan no plot !oo append calc per subscan weighting per subscan no plot gate flux -10 20 gate rms 25 70 ! oo app body wtg stored !! NEW PROBLEM IN LATEST MOPSIC: PLOT OPTION ! pl scal lin -5 5 if diagnostic then pause endif next !!-------------------------------------------------------------------------------- !pause open dev if exist(GTV%DEVICES) then cle a cle set char .5 plot oo plane 1 yrange -4 10 let scom "rm "'oname'".ps" sys 'scom' hard 'oname' /dev ps color endif !!=================================================================================