Below are a few examples. The left panels show a plot of the average bandpass per ntime x nchan chunk. The data is shown in red, and the piece-wise polynomial fit is shown in blue. Ideally, the blue line should be a smooth fit across the base of RFI spikes. The middle and right panels show the data ('expr' applied to 'column') as a function of channel number (on the x-axis) and time (on the y-axis). The middle panels show only the data, and the right panels show data with flags (shown in black).
These examples are taken from an L-Band EVLA dataset taken with 1-second integrations and 1-MHz channel resolution.
FLAG LEVEL 0 : Flagged 8% : tfcrop.flag('Four_ants_3C286.ms',spw='9',baseline='1&2',flaglevel=0,maxnpieces=7,ntime=80)
FLAG LEVEL 1 : Flagged 19% : tfcrop.flag('Four_ants_3C286.ms',spw='9',baseline='1&2',flaglevel=1,maxnpieces=7,ntime=80)
FLAG LEVEL 2 : Flagged 44% : tfcrop.flag('Four_ants_3C286.ms',spw='9',baseline='1&2',flaglevel=2,maxnpieces=7,ntime=80)
FLAG LEVEL 0 : Flagged 9% : tfcrop.flag('Four_ants_3C286.ms',spw='10',baseline='2&3',flaglevel=0,maxnpieces=7,ntime=80)
FLAG LEVEL 1 : Flagged 19% : tfcrop.flag('Four_ants_3C286.ms',spw='10',baseline='2&3',flaglevel=1,maxnpieces=7,ntime=80)
FLAG LEVEL 2 : Flagged 47% : tfcrop.flag('Four_ants_3C286.ms',spw='10',baseline='2&3',flaglevel=2,maxnpieces=7,ntime=80)
ALL CHANNELS : Flagged 15% : tfcrop.flag('Four_ants_3C286.ms',spw='6',expr='ABS RR',flaglevel=1,maxnpieces=7,ntime=80,baseline='0&2'); This is an example of the polynomial fit failing at the edge of the band, and data being unnecessarily flagged.
WITHOUT END CHANNELS : Flagged 2% : tfcrop.flag('Four_ants_3C286.ms',spw='6:3 61',expr='ABS RR',flaglevel=1,maxnpieces=7,ntime=80,baseline='0&2'); The polynomial fit is better at the edges.
WITH PRE-EXISTING FLAGS : Old Flags : 12.5% : New Flags : 24.1% : tfcrop.flag('Only_3C286_A.ms',showplots=True,ntime=100,usepreflags=True);
WITHOUT HANNING SMOOTHING : Flagged 15% : tfcrop.flag('Four_ants_3C286.ms',spw='4',baseline='0&1',flaglevel=1,maxnpieces=7,ntime=80); A lot of ringing extending across +/- 10 channels.
WITH HANNING SMOOTHING : Flagged 16% : tfcrop.flag('Hanning_Four_ants_3C286.ms',spw='4',baseline='0&1',flaglevel=1,maxnpieces=7,ntime=80); Less ringing. It has also flagged end-channels, slightly increasing the percentage flagged. Un-selecting end channels can help here.
FLAG LEVEL 0 + HANNING : Flagged 12% : tfcrop.flag('Hanning_Four_ants_3C286.ms',spw='9',baseline='1&2',flaglevel=0,maxnpieces=7,ntime=80)
FLAG LEVEL 1 + HANNING : Flagged 35% : tfcrop.flag('Hanning_Four_ants_3C286.ms',spw='9',baseline='1&2',flaglevel=1,maxnpieces=7,ntime=80)
FLAG LEVEL 2 + HANNING : Flagged 54% : tfcrop.flag('Hanning_Four_ants_3C286.ms',spw='9',baseline='1&2',flaglevel=2,maxnpieces=7,ntime=80)