NRAO Home > CASA > CASA Toolkit Reference Manual
sd.scantable.create_mask - Function

5.1.2 Return a bool array based on [min,max] windows
Description

Compute and return a mask based on [min, max] windows. The specified windows are to be INCLUDED, when the mask is applied.

The mask window should be given as a pairs of start/end points, e.g. [min, max], [min2, max2], ... If the invert argument specified as True, return an inverted mask, i.e. the regions specified are EXCLUDED. The mask is created using the specified row for unit conversions. This is only necessary if frequency varies over rows.

Arguments





Inputs

Pairs of start/end points

allowed:

list or sequence of lists

Default:

invert

Determine the operation is inclusive or exclusive

allowed:

bool

Default:

False (inclusive)

row

create the mask using the specified row for unit conversions

allowed:

integer

Default:

0





Returns
bool array

Example

        scan = sd.scantable(’OrionS_rawACSmod_cal’,average=True)  
        scan.set_unit(’channel’)  
        # a)  
        msk = scan.create_mask([400, 500], [800, 900])  
        # masks everything outside 400 and 500  
        # and 800 and 900 in the unit ’channel’  
 
        # b)  
        msk = scan.create_mask([400, 500], [800, 900], invert=True)  
        # masks the regions between 400 and 500  
        # and 800 and 900 in the unit ’channel’  
 
        # c)  
        #mask only channel 400  
        msk =  scan.create_mask([400])


More information about CASA may be found at the CASA web page

Copyright 2016 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search