oldstatwt

oldstatwt(vis, dorms=False, byantenna=False, sepacs=True, fitspw='', fitcorr='', combine='', timebin='0s', minsamp=2, field='', spw='', antenna='', timerange='', scan='', intent='', array='', correlation='', observation='', datacolumn='corrected')[source]

Reweight visibilities according to their scatter (Deprecated in CASA 5.8. Not present in CASA 6.2. Use statwt instead.)

[Description] [Examples] [Development] [Details]

Parameters
  • vis (string)

  • dorms (bool=False)

  • byantenna (bool=False)

    byantenna = True
  • fitspw ({string, stringArray, int, intArray}=’’)

  • fitcorr ({string, stringArray, int, intArray}=’’)

  • combine ({string, stringArray}=’’)

  • timebin (string=’0s’)

  • minsamp (int=2)

  • field ({string, stringArray, int, intArray}=’’)

  • spw ({string, stringArray, int, intArray}=’’)

  • antenna ({string, stringArray, int, intArray}=’’)

  • timerange (string=’’)

  • scan (string=’’)

  • intent (string=’’)

  • array (string=’’)

  • correlation ({string, stringArray}=’’)

  • observation ({string, int}=’’)

  • datacolumn (string=’corrected’)

Description

Warning

WARNING : The task oldstatwt is identical to the task statwt in previous CASA versions, given that the current statwt underwent significant development for CASA 5.4.

The WEIGHT and SIGMA columns of measurement sets are often set to arbitrary values (e.g., 1), or theoretically estimated from poorly known antenna and receiver properties. Many tasks (e.g., clean) are insensitive to an overall scale error in WEIGHT, but are affected by errors in the relative weights between visibilities. Other tasks, such as uvmodelfit, or any task which depends on theoretical estimates of the noise, require (reasonably) correct weights and sigmas. oldstatwt empirically measures the visibility scatter (typically as a function of time, antenna, and/or baseline) and uses that to set WEIGHT and SIGMA. It is important that all necessary calibrations are applied to the data prior to running this task for correct determination of weights and sigmas.

Note

NOTE: Some of the parameters (byantenna, sepacs, fitcorr, and timebin) are not yet fully implemented.

Parameter descriptions

vis

Name of input visibility file. Default: none. Examples: vis=’ngc5921.ms’

dorms

Estimate the scatter using RMS instead of the standard deviation.

Ideally the visibilities used to estimate the scatter, as selected by fitspw and fitcorr, should be pure noise. If you know for certain that they are, then setting dorms to True will give the best result. Otherwise, use False (standard sample standard deviation). More robust scatter estimates like the interquartile range or median absolute deviation from the median are not offered because they require sorting by value, which is not possible for complex numbers. Default: False.

byantenna

Assume that the noise is factorable by antenna (feed). If False, treat it separately for each baseline (recommended if there is strong signal). Default: False (*** byantenna=True is not yet implemented)

byantenna=True expandable parameters

sepacs

If solving by antenna, treat autocorrelations separately. (Acknowledge that what autocorrelations “see” is very different from what crosscorrelations see.) Default: True (not yet implemented).

fitspw

The (ideally) signal-free spectral window:channels to estimate the scatter from. Default: ‘’ (All).

fitcorr

The (ideally) signal-free correlations to estimate the scatter from. Default: ‘’ (All) (not yet implemented)

combine

Let samples span multiple spws, corrs, scans, and/or states. Examples:

  • combine = ‘spw’: Recommended when a line spans an entire spw - set fitspw to the neighboring spws and apply their weight to the line spw(s). However, the effect of the line signal per visibility may be relatively harmless compared to the noise difference between spws.

  • combine = ‘scan’: Can be useful when the scan number goes up with each integration, as in many WSRT MSes.

  • combine = [‘scan’, ‘spw’]: disregard scan and spw numbers when gathering samples.

  • combine = ‘spw,scan’: Same as above.

Default: ‘’ (None).

timebin

Sample interval. Default: ‘0s’ or ‘-1s’ (1 integration at a time). Examples: timebin=’30s’, ‘10’ means ’10s’ (not yet implemented)

minsamp

Minimum number of unflagged visibilities for estimating the scatter. Selected visibilities for which the weight cannot be estimated will be flagged. Note that minsamp is effectively at least 2 if dorms is False, and 1 if it is True.

field

Select fields in mosaic. Use field id(s) or field name(s). [go listobs to obtain the list id’s or names] Default: ‘’ = all fields. If field string is a non-negative integer, it is assumed to be a field index otherwise, it is assumed to be a field name. Examples: field=’0~2’, field ids 0,1,2; field=’0,4,5~7’, field ids 0,4,5,6,7; field=’3C286,3C295’, field named 3C286 and 3C295; field = ‘3,4C*’, field id 3 and all names starting with 4C.

spw

Select spectral window/channels. Default: ‘’ => all spectral windows and channels. Examples: spw=’0~2,4’, spectral windows 0,1,2,4 (all channels); spw=’0:5~61’, spw 0, channels 5 to 61; spw=’<2’, spectral windows less than 2 (i.e. 0,1); spw=’0,10,3:3~45’, spw 0,10 all channels, spw 3, channels 3 to 45; spw=’0~2:2~6’; spw 0,1,2 with channels 2 through 6 in each; spw=’0:0~10;15~60’; spectral window 0 with channels 0-10,15-60; spw=’0:0~10,1:20~30,2:1;2;3’; spw 0, channels 0-10, spw 1, channels 20-30, and spw 2, channels, 1,2 and 3.

antenna

Select data based on antenna/baseline. Default: ‘’ (all). If antenna string is a non-negative integer, it is assumed to be an antenna index, otherwise, it is considered an antenna name. Examples: antenna=’5&6’; baseline between antenna index 5 and index 6; antenna=’VA05&VA06’, baseline between VLA antenna 5 and 6; antenna=’5&6;7&8’, baselines 5-6 and 7-8; antenna=’5’, all baselines with antenna index 5; antenna=’05’, all baselines with antenna number 05 (VLA old name); antenna=’5,6,9’, all baselines with antennas 5,6,9 index numbers.

timerange

Select data based on time range. Default: ‘’ (all). Examples: timerange = ‘YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss’;

Note

NOTE: if YYYY/MM/DD is missing date defaults to first day in data set.

timerange=’09:14:0~09:54:0’ picks 40 min on first day; timerange=’25:00:00~27:30:00’ picks 1 hr to 3 hr 30min on NEXT day; timerange=’09:44:00’ pick data within one integration of time; timerange=’>10:24:00’ data after this time.

scan

Scan number range. Default: ‘’ (all). Examples: scan=’1~5’. Check ‘go listobs’ to insure the scan numbers are in order.

intent

Select by scan intent (state). Case sensitive. Default: ‘’ = all. Examples: intent = ‘CALIBRATE_ATMOSPHERE_REFERENCE’; intent = ‘calibrate_atmosphere_reference’.upper() same as above. Select states that include one or both of CALIBRATE_WVR.REFERENCE or OBSERVE_TARGET_ON_SOURCE; intent = ‘CALIBRATE_WVR.REFERENCE, OBSERVE_TARGET_ON_SOURCE’

array

(Sub)array number range. Default: ‘’=all.

correlation

Select correlations, e.g. ‘RR, LL’ or [‘XY’, ‘YX’]. Default ‘’ (all).

Note

NOTE: In CASA v4.5, non-trivial correlation selection has been disabled since it was not working correctly, and it is likely undesirable to set the weights in a correlation-dependent way.

observation

Select by observation ID(s). Default: ‘’ = all.

datacolumn

Which data column to calculate the scatter from. Default: datacolumn=’corrected’. Examples: datacolumn=’data’. Options: ‘data’, ‘corrected’, ‘model’, ‘float_data’

Note

NOTE: ‘corrected’ will fall back to DATA if CORRECTED_DATA is absent.

Examples

To run oldstatwt on all targets in an MS and estimate the scatter using the standard deviation (not the RMS):

oldstatwt(vis='example.ms', dorms=False, intent='*TARGET*',
          datacolumn='corrected', minsamp=2)
Development

No additional development details

Parameter Details

Detailed descriptions of each function parameter

vis (string) - Name of measurement set
dorms (bool=False) - Use rms instead of stddev?
byantenna (bool=False) - Estimate the noise per antenna -not implemented (vs. per baseline)
sepacs (bool=True) - If solving by antenna, treat autocorrs separately (not implemented)
fitspw ({string, stringArray, int, intArray}='') - The signal-free spectral window:channels to estimate the scatter from
fitcorr ({string, stringArray, int, intArray}='') - The signal-free correlation(s) to estimate the scatter from (not implemented)
combine ({string, stringArray}='') - Let estimates span changes in spw, corr, scan and/or state
timebin (string='0s') - Bin length for estimates (not implemented)
minsamp (int=2) - Minimum number of unflagged visibilities for estimating the scatter
field ({string, stringArray, int, intArray}='') - Select field using ID(s) or name(s)
spw ({string, stringArray, int, intArray}='') - Select spectral window/channels
antenna ({string, stringArray, int, intArray}='') - Select data based on antenna/baseline
timerange (string='') - Select data by time range
scan (string='') - Select data by scan numbers
intent (string='') - Select data by scan intents
array (string='') - Select (sub)array(s) by array ID number
correlation ({string, stringArray}='') - Select correlations to reweight (DEPRECATED in CASA v4.5)
observation ({string, int}='') - Select by observation ID(s)
datacolumn (string='corrected') - Which data column to calculate the scatter from