|
|||
NRAO Home > CASA > CASA Toolkit Reference Manual |
|
5.1.3 sd.selector - Tool
Data selection tool for single-dish data
Description
The selector is a data selection object that affects a scantable object via
set_selection function. Selection by the following attributes are available:
- scan number
- beam number
- cycle number
- IF number
- source name (allows regular expression)
- polarization number
- row number
- source type
- value of system temperature (minimum and maximum threshold)
Note that the selection by an integer is 0-based (scan, beam, cycle, IF, polarization, and row).
In addition, the selector provides interface for more flexible data selection using TaQL.
The selector also support sorting data. The selector sorts data based on values of columns specified by the user.
Summary of the current selection is stored in the object as a string. Thus, you can see that summary by using print (see example below).
The constructor takes some arguments to set selection criteria. So, the user can set selection either using constructor options and available setter functions.
Source types should be given as an integer or an enumerations that are properly defined for source type. That enumeration can be accessed via sd.srctype. The list of enumerations defined (following sd.srctype.) are as follows:
enum | int | description |
pson | 0 | on-source scan of position switched data |
psoff | 1 | off-source scan of position switched data |
nod | 2 | nod scan |
fson | 3 | on-source scan of frequency switched data |
fsoff | 4 | reference scan of frequency switched data |
sky | 6 | sky scan for calibration |
hot | 7 | hot load scan for calibration |
warm | 8 | warm load scan for calibration |
cold | 9 | cold load scan for calibration |
poncal | 10 | on-source calibration scan of position switched data |
poffcal | 11 | off-source calibration scan of position switched data |
nodcal | 12 | nod calibration scan |
foncal | 13 | on-source calibration scan of frequency switched data |
foffcal | 14 | reference calibration scan of frequency switched data |
fslo | 20 | lower frequency throw of symmetric freuqnecy switching |
flooff | 21 | off-source lower frequency throw of symmetric frequency switching |
flosky | 26 | sky lower frequency throw of symmetric frequency switching |
flohot | 27 | hot load lower frequency throw of symmetric frequency switching |
flowarm | 28 | warm load lower frequency throw of symmetric frequency switching |
flocold | 29 | cold load lower frequency throw of symmetric frequency switching |
fshi | 30 | higher frequency throw of symmetric freuqnecy switching |
fhioff | 31 | off-source higher frequency throw of symmetric frequency switching |
fhisky | 36 | sky higher frequency throw of symmetric frequency switching |
fhihot | 37 | hot load higher frequency throw of symmetric frequency switching |
fhiwarm | 38 | warm load higher frequency throw of symmetric frequency switching |
fhicold | 39 | cold load higher frequency throw of symmetric frequency switching |
sig | 90 | signal scan |
ref | 91 | reference scan |
cal | 92 | calibration scan |
notype | 99 | no type |
Arguments
Inputs |
| ||
beams |
| Beam number selection | |
| allowed: | integer, integer array |
|
| Default: | None (no selection) |
|
cycles |
| Cycle number selection
| |
| allowed: | integer, integer array |
|
| Default: | None (no selection) |
|
ifs |
| IF number selection | |
| allowed: | integer, integer array |
|
| Default: | None (no selection) |
|
name |
| Source name selection. Allows regular expression.
| |
| allowed: | string |
|
| Default: | None (no selection) |
|
pols |
| Polarization number selection
| |
| allowed: | integer, integer array, string, string array |
|
| Default: | None (no selection) |
|
query |
| TaQL selection query
| |
| allowed: | string |
|
| Default: | None (no selection) |
|
scans |
| Scan number selection
| |
| allowed: | integer, integer array |
|
| Default: | None (no selection) |
|
types |
| Source type selection
| |
| allowed: | integer, integer array |
|
| Default: | None (no selection) |
|
rows |
| Row number selection
| |
| allowed: | integer, integer array |
|
| Default: | None (no selection) |
|
sel=sd.selector()
# These are equivalent if data is ’linear’
sel.set_polarisations(["XX","Re(XY)"])
sel.set_polarisations([0,2])
# reset the polarisation selection
sel.set_polarisations()
# these are equivalent
sel2=sd.selector(ifs=[0,1])
sel2=sd.selector()
sel2.set_ifs([0,1])
# check current selection
print sel
IFNO: [0,1]
# apply selection on scantable
s=sd.scantable(’OrionS_rawACSmod_cal’,average=False)
s.set_selection(sel)
get_beams | Return a list of current beam selection |
get_cycles | Return a list of current cycle selection |
get_ifs | Return a list of current IF selection |
get_name | Return a selection string for source name (not yet implemented) |
get_order | Return a list of columns used for sorting |
get_pols | Return a list of current polarization selection |
get_poltypes | Return a list of polarization types for current polarization selection |
get_query | Return current selection string for TaQL selection |
get_rows | Return a list of current row number selection |
get_scans | Return a list of current scan number selection |
get_types | Return a list of current source type selection |
is_empty | Check if any selection has been set |
reset | Unset all selections |
set_beams | Set a sequence of beam numbers |
set_cycles | Set a sequence of cycle numbers |
set_ifs | Set a sequence of IF numbers |
set_name | Set a selection based on a source name |
set_order | Set column names that is used for sorting data |
set_polarisations | Set a sequence of polarization numbers or strings |
set_polarizations | Set a sequence of polarization numbers or strings |
set_pols | Set a sequence of polarization numbers or strings |
set_query | Set a selection string based on TaQL |
set_rows | Set a sequence of row numbers |
set_scans | Set a sequence of scan numbers |
set_tsys | Set range of system temperature |
set_types | Set a sequence of source types |
sd.selector.get_cycles - Function
sd.selector.get_ifs - Function
sd.selector.get_name - Function
sd.selector.get_order - Function
sd.selector.get_pols - Function
sd.selector.get_poltypes - Function
sd.selector.get_query - Function
sd.selector.get_rows - Function
sd.selector.get_scans - Function
sd.selector.get_types - Function
sd.selector.is_empty - Function
sd.selector.reset - Function
sd.selector.set_beams - Function
sd.selector.set_cycles - Function
sd.selector.set_ifs - Function
sd.selector.set_name - Function
sd.selector.set_order - Function
sd.selector.set_polarisations - Function
sd.selector.set_polarizations - Function
sd.selector.set_pols - Function
sd.selector.set_query - Function
sd.selector.set_rows - Function
sd.selector.set_scans - Function
sd.selector.set_tsys - Function
sd.selector.set_types - Function
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