Data Selection Syntax Proposal


selectdata    selectdata     Data selection parameters will appear

 baseline      baseline       baselines
 field         field          field name or number
 timerange     selecttime     time range
 correlation   correlation    correlators
 spw           spw            spectral windows
 range         channel        ranges in each spw
 uvrange       uvrange        uvrange in meters
 scan          scan           scan range
 subarray      array          subarray
 feed          feed           Feed selection


Associated help file:

selectdata  Select a subset of the visibility file data to plot/flag.
           default:  False = all data
                     True = opens up data-selection parameters

baseline    Baselines to select:
           default: '' = all
           examples: all antenna designations are NAMES, not INDICES
              (however, if we change all VLA and EVLA names to 'VL04' and
               'EL04', we could have baselines be names or indices.)
           baseline ='5&6' baselines 5-6
           baseline ='5&6;7&8' baseline 5-6 and 7-8
           baseline ='5'  all baselines with antenna 5
           baseline ='5,6' all baselines with antennas 5 and 6
           baseline ='!5' all baselines except those with antenna 5
           baseline  = '!5&6,!10!12'; all baselines except 5-6 and 10-12

field       Field indices or names to select.  If the field is a
              non-negative integer, it is assumed an indice.
           default: '' = all
           field = '0'; field index 0
           field = '0,1,2,5'; field indices 0,1,2,5
           field = '0~2'; field indices 0 to 2 inclusive
           field = '0~12,!8'; field indices 0 through 12 except 8.
           field = '3C84'; field name 3C84
           field = 'VIRGO A, 3C*'; field names VIRGO A and all field
              names beginning with 3C
           field = '3C,!3C273'; field names beginning with 3C
              except 3C273

timerange   Time range to select
           default '' = all
           timerange = 'YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss'
              The full syntax for time range
           timerange = 'hh:mm:ss~hh:mm:ss; The time range on the first
              day of the visibility data set
           timerange = 'YYYY/MM/DD/hh:mm:ss'; only within the integration
              time covered by this time
           timerange = '>hh:mm:ss'; times greater than this on the first
              day of the visibility data set
           timerange = 'hh:mm:ss~hh:mm:ss+13:00; 13-min time range
              on first day of visibility set
           timerange = '!hh:mm:ss~hh:mm:ss+13:00; all times except this
              13-min time range on first day of visibility set

correlation Correlators to select
           default '' = 'RRLL' or 'XXYY'
           Correlator designations are:  'RR', 'LL', 'RL', 'LR',
                                         'XX', 'YY', 'XY', 'YX'
           Correlator combinations permitted area:
                    'RRLL' = both RR and LL; 'XXYY' = both XX and YY
                    'RLLR' = both RL and LR; 'XYYZ' = both XY and YX
                    'ALL'  = RR,LL,RL,LR or XX, YY, XY, YZ
                     'I' = Vector sum of RR and/or LL or XX and/or YY
                     FI' = Vector sum of RR and LL or XX and YY only
                                           if both are measured
                     'Q' = RL+iLR; or XX-YY    [vector sum]
                     'U' = iRL+LR; or XY+YX    [vector sum]
                     'V' = RR-LL; or i(XY-YX)  [vector sum]

spw         Spectral window indices to select.
range       Range of channels/freq/velocity associated with each spw.
           default spw=''; range='10%,10%'; all spw's and skip 10%
               of spw edges (>10 channel spw only)
               spw = '0'; range= ''
                  sp window 0 and all channels
               spw = '2'; range= '10~50';
                  sp window 2 and channels 10 to 50 incl.
               spw = '0~2'; range='5~61'
                  sp window 0,1,2, each with channels 5 to 61 incl.
               spw= '  0,  0,   1,    2,    6'
                  sp window 0 with channels 4,5 and 9,10,11,12,13,14
                  sp windows 1, 2 and 6 with specified channels
           range may be given also in frequency or velocity
               spw = '        0,             0,         2'
               range = '23km/s~19km/s, 17km/s~14km/s, 2~50'
                  sp window 0 from 14 to 17 and 19 to 23 km/s
                  sp window 2, channels 2 to 50, incl
           range may be given also in percentage of spw
               spw = '    0,       2'
               range = '10%,5%,            '
                  sp window 0, skip 10% of beginning chans and 5% of end
                  sp window 2, all channels

uvrange     Uvrange to include (default units = kilolambda)
           default: '' = all
           uvrange = '0~1000'; uvrange between 0 and 1000 klambda
           uvrange = '<500'; uvrange less than 500 klambda
           uvrange = '0km,4km'; uvrange between 0 and 4 km

scan        Scan range to select
           default '' = all
           scan = '3; scan number 3.  The first scan is 0
           scan = '0~8'; scan numbers 0 through 8, inclusive
           scan = '0,2,4,6'; scans 0,2,4,6

subarray    Subarray to choose
           default '' = all subarrays
           subarrays = '0'; first subarray
           subarrays = '0,3'; subarray 0,3
           subarrays = '0~3'; subarray 0 through 3, inclusive

feed        Feed selection for focal plane array
           default '' = all feeds
           feeds = '0'; first feed
           feeds = '0,3'; feed 0,3
           feeds = '0~3'; feed 0 through 3, inclusive

Steve Myers:

I propose a couple of clarifications and a few minor changes:

1. Of course, the range string has to use the "~" delimiter e.g. '1~10'
   as per the other string-based selections.

2. In line with the other "range" params (timerange, uvrange) the name
   should be "chanrange" and not just "range"
        -->OK but happy with this even though it describes frequency/velocity 
        ranges also

3. As proposed here, both spw and chanrange are only strings.  I propose
   that lists of numbers be allowed also.  These are specific spw's and
   channels.  Note that spw/chan selection comes down to lists of specific
   channels in specific spw's and it makes sense to allow the user
   (particularly scripts) to specify these directly.  The string shorthand
   of ranges and steps is to streamline arrival at this list.

   spw=0  chanrange=2                     # chan 2 of spw 0
   spw=0  chanrange=[1,2,3]               # chans 1,2,3 of spw 0
   spw=[0,1] chanragne=[1,2,3]            # chans 1,2,3 of spw 0 and 1
   spw=[0,1] chanrange=[[1,2,3],[4,5,6]]  # chans 1,2,3 of spw 0, chans 4,5,6 of spw 1

   COMPLICATION:  I don't know how passing lists of lists works in the
   casapy binding, which might make this impractical.
        -->Not for the beta

4. Lists of chans in chanrange.  Need to option for lists of chans
   in the chanrage string, e.g.
   spw = '0, 1'
   chanrange = ' 0~15 , [1,2,3,4]'
        -->Not for the beta

5. Stepping.  This is really a selection issues as it is a shorthand for
   picking channels.  But its not used alot so I propose that it just be
   included as an option in the string chanrange with a carat "^"
   delimiter, e.g. chanrange = '0~99^10'

   Note that if stepping is used in freq or vel mode it picks the nearest
   channel to that step, e.g.
   chanrange = '100GHz~150GHz^10GHz'
   picks the channels closest to 100GHz,110GHz,...,150GHz

   With this option we dont need a separate "chanstep" variable.
        Other options:
                        step='1;5'  <-not often used can usually be ignored/defaulted
                        range='0.9'  to get the middle 90% of the channels, or use
                        edgeskip='0.05' to not select 5% of the channels on each side of the band
#the argument here is that you may have many heterogeneous bands that you want
#to do the same thing to (cut off the band roll-off on the edges) - make that easy

6. Other options.  Looking back at Sanjay's proposed selection syntax
   it looks like nice features might be:
   chanrange='>5'       # all chans above 5
   chanrange='<50'      # all chans below 50
   chanrange='10+100'   # 100 channels starting with 10

-- JosephMcMullin - 30 May 2007
Topic revision: r1 - 2007-05-30, JosephMcMullin
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback