next up previous contents
Next: 1.6 Reference frame transformation Up: 1 The MSTransform framework Previous: 1.4 Combination of spectral   Contents

1.5 Channel averaging

Similar to task split, mstransform can average the selected channels based on a channel bin parameter. The parameter chanbin can be either an integer or a list of integers that will apply to each spw in the selection. Note that the chanbin parameter is independent of the width parameter used in the reference frame transformation controlled by the regridms parameter. See the Examples Section.

Starting at version 4.3 WEIGHT/SIGMA_SPECTRUM will be used (if present) in addition to the flags to compute a weighted average. The calculation is done as follows:

* When using flags (WEIGHT/SIGMA_SPECTRUM not present):

    Avg = SUM(Chan_i*Flag_i)/SUM(Flag_i)     
    
(where boolean values are converted to 0 for True and 1 for False)

* When using flags and weights, (WEIGHT/SIGMA_SPECTRUM present):

    Avg = SUM(Chan_i*Flag_i*WeightSpectrum_i)/SUM(Flag_i*WeightSpectrum_i)
         
(using directly the WEIGHT_SPECTRUM values provided that they are already numerical)

Whereas the output WEIGHT_SPECTRUM is defined as the sum of the weights of all un-flagged input channels contributing to one output channel. When all the input channels contributing to one output channel are flagged, then mstransform will calculate and store the average of all the flagged channels, and set the output channel flag to True. The same applies to WEIGHT_SPECTRUM but using a sum instead of and average. The output row-level WEIGHT value is defined and set as the average of WEIGHT_SPECTRUM across the channel axis. A median algorithm was considered, but finally ruled out to actually account for the impact of reduced weights in the regions with significant systematic errors.

When the number of unflagged channels in an interval is fewer than chanbin, mstransform will consider only the flagged channels in that interval. If fewer channels than chanbin are left at the end of the spw, these channels will be dropped. See the following example: input channels 0,1,2,3,4,5,-,-,8,9,10,11,12,13, where channels 6 and 7 are flagged; chanbin=4; first average will contain channels 0,1,2,3, second average will contain channels 4,5, third average will contain channels 8,9,10,11; the last two channels, 12,13 will be dropped.


next up previous contents
Next: 1.6 Reference frame transformation Up: 1 The MSTransform framework Previous: 1.4 Combination of spectral   Contents
Sandra Castro 2014-12-16