#
# stub function definition file for docstring parsing
#
[docs]def hanningsmooth(vis, outputvis='', keepmms=True, field='', spw='', scan='', antenna='', correlation='', timerange='', intent='', array='', uvrange='', observation='', feed='', datacolumn='all'):
r"""
Hanning smooth frequency channel data to remove Gibbs ringing
[`Description`_] [`Examples`_] [`Development`_] [`Details`_]
Parameters
- vis_ (path) - Name of input visibility file
- outputvis_ (string='') - Name of output visibility file
- keepmms_ (bool=True) - Create a Multi-MS as the output if the input is a Multi-MS.
- field_ ({string, stringVec, int, intVec}='') - Select field using field id(s) or field name(s)
- spw_ ({string, stringVec, int, intVec}='') - Select spectral window/channels
- scan_ ({string, stringVec, int, intVec}='') - Scan number range
- antenna_ ({string, stringVec, int, intVec}='') - Select data based on antenna/baseline
- correlation_ ({string, stringVec}='') - Select data based on correlation
- timerange_ ({string, stringVec, int, intVec}='') - Select data based on time range
- intent_ ({string, stringVec, int, intVec}='') - Select observing intent
- array_ ({string, stringVec, int, intVec}='') - Select (sub)array(s) by array ID number.
- uvrange_ ({string, stringVec, int, intVec}='') - Select data by baseline length.
- observation_ ({string, stringVec, int, intVec}='') - Select by observation ID(s)
- feed_ ({string, stringVec, int, intVec}='') - Multi-feed numbers: Not yet implemented.
- datacolumn_ (string='all') - Which data column(s) to use for processing
.. _Description:
Description
This is the new implementation of **hanningsmooth**.
.. note:: Task **hanningsmooth2** has been renamed to **hanningsmooth**.
Please, update your scripts to call **hanningsmooth** instead.
The new **hanningsmooth** task uses the MSTransform framework
underneath but keeps roughly the same interface as previous
version of hanningsmooth.
This function Hanning smooths the frequency channels with a
weighted running average. The weights are 0.5 for the central
channel and 0.25 for each of the two adjacent channels. The first
and last channels are flagged. Inclusion of a flagged value in an
average causes that data value to be flagged.
If the *CORRECTED* data column is requested for an MS that does
not contain this column, it will use *DATA* to calculate the
smoothing and save it to *DATA* in the output MS.
.. warning:: WARNING: by default, all visibility columns will be smoothed.
.. rubric:: Parameter Descriptions
.. rubric:: Input and output MeasurementSets
The input visibility file (MS or MMS) given by the
*vis* parameters will be Hanning smoothed and saved in an output
given by the *outputvis* parameter.
For example, *vis* = ['ngc5921.ms'], *output vis* =
'out_ngc5921.mms'.
.. rubric:: Output MS or Multi-MS: keepmms parameter
If *keepmms* = True, a
`Multi-MS <../../notebooks/parallel-processing.ipynb#The-Multi-MS>`__
will be created as the output if the input is a Multi-MS(MMS),
which is the default behaviour. The output Multi-MS will have the
same partition axis of the input MMS. See the `Parallel
Processing <../../notebooks/parallel-processing.ipynb>`__
chapter for more information on the MMS format.
.. rubric:: Data Column parameter
The parameter *datacolumn* chooses which column to use for the
processing (case-insensitive). The default is set to all columns
that exist in the input MS.
.. rubric:: Data Selection parameters
For more details on how to perform data selection within the MS
(i.e., selecting by field, SPW, antenna, etc.), see the
`Visibility Data
Selection <../../notebooks/visibility_data_selection.ipynb>`__
chapter.
.. _Examples:
Examples
Apply Hanning smoothing on the CORRECTED column. The output will
be saved into the DATA column.
::
hanningsmooth(vis='example.ms', outputvis='test.ms',
datacolumn='corrected')
Apply Hanning smoothing on all visibility columns of the Multi-MS.
In this case, if CASA is started with
`mpicasa <../../notebooks/parallel-processing.ipynb#Configuration-and-Control>`__,
the processing will happen in parallel.
::
hanningsmooth(vis='example.mms', outputvis='test.mms') --> default
hanningsmooth(vis='example.mms', outputvis='test.mms',
datacolumn='all', keepmms=True) --> set the parameters explicitly
.. _Development:
Development
The following information was in the inline help for hanningsmooth
but is now being maintained in one place in the Visibility Data
Selection chapter, so a link has been added to those pages. It has
been deleted from the Description tab for now and included below
for reference in case it's needed, once a comprehensive plan has
been established for all task pages with this issue.
--- Data selection parameters ---
field -- Select field using field id(s) or field name(s).
[run listobs to obtain the list iof d's or names]
If field string is a non-negative integer then it is assumed to be a field index.
Otherwise, it is assumed to be a field name.
default: ''=all fields
field='0~2'; field ids 0,1,2
field='0,4,5~7'; field ids 0,4,5,6,7
field='3C286,3C295'; fields named 3C286 and 3C295
field = '3,4C\*'; field id 3, all names starting with 4C
spw -- Select spectral window/channels
default: ''=all spectral windows and channels
spw='0~2,4'; spectral windows 0,1,2,4 (all channels)
spw='<2'; spectral windows less than 2 (i.e. 0,1)
spw='0:5~61'; spw 0, channels 5 to 61
spw='0,10,3:3~45'; spw 0,10 all channels, spw 3 - chans 3 to 45.
spw='0~2:2~6'; spw 0,1,2 with channels 2 through 6 in each.
spw = '\*:3~64' channels 3 through 64 for all sp id's
spw = ' :3~64' will NOT work.
NOTE: mstransform does not support multiple channel ranges per
spectral window (';').
scan -- Scan number range
default: ''=all
antenna -- Select data based on antenna/baseline
default: '' (all)
Non-negative integers are assumed to be antenna indices, and
anything else is taken as 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 5
antenna='5,6,10': all baselines including antennas 5, 6, or 10
antenna='5,6,10&': all baselines with \*only\* antennas 5, 6, or
. 10. (cross-correlations only. Use &&
. to include autocorrelations, and &&&
. to get only autocorrelations.)
antenna='!ea03,ea12,ea17': all baselines except those that
. include EVLA antennas ea03, ea12, or
. ea17.
correlation -- Correlation types or expression.
default: '' (all correlations)
example: correlation='XX,YY'
timerange -- Select data based on time range:
default: '' (all); examples,
timerange = 'YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss'
Note: if YYYY/MM/DD is missing date, timerange defaults to the
first day in the dataset
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' data within one integration of time
timerange='>10:24:00' data after this time
array -- (Sub)array number range
default: ''=all
uvrange -- Select data within uvrange (default units meters)
default: ''=all; example:
uvrange='0~1000klambda'; uvrange from 0-1000 kilo-lambda
uvrange='>4klambda';uvranges greater than 4 kilo-lambda
uvrange='0~1000km'; uvrange in kilometers
observation -- Select by observation ID(s)
default: ''=all
feed -- Selection based on the feed - NOT IMPLEMENTED YET
default: ''=all
datacolumn -- Which data column to use for processing (case-insensitive).
default: 'all'; whichever of the visibility data columns that are present.
options: 'data', 'model', 'corrected', 'all','float_data', 'lag_data'.
example1: datacolumn='data'; it will smooth the input DATA column and save the
smoothed data in DATA of the output MS.
example2: datacolumn='corrected'; it will smooth the input CORRECTED_DATA column
and save the smoothed data in DATA of the output MS.
example3: datacolumn='all', where the input MS has DATA,CORRECTED_DATA,MODEL_DATA.
It will smooth all three columns and save the smoothed data in
DATA, CORRECTED_DATA and MODEL_DATA of the output MS.
.. _Details:
Parameter Details
Detailed descriptions of each function parameter
.. _vis:
| ``vis (path)`` - Name of input visibility file
| Default: none
| Example: vis='ngc5921.ms'
.. _outputvis:
| ``outputvis (string='')`` - Name of output visibility file
| Default: '' (same as vis)
| Example: outputvis='ngc5921_out.ms'
.. _keepmms:
| ``keepmms (bool=True)`` - Create a Multi-MS as the output if the input is a
| Multi-MS.
| Default: True
| Options: True|False
| By default it will create a Multi-MS when the
| input is a Multi-MS. The output Multi-MS will
| have the same partition axis of the input
| MMS. See CASA Docs for more information on
| the MMS format.
.. _field:
| ``field ({string, stringVec, int, intVec}='')`` - Select field using field id(s) or field name(s)
| Default: '' (all fields)
|
| Use 'go listobs' to obtain the list id's or
| names. If field string is a non-negative integer,
| it is assumed a field index, otherwise, it is
| assumed 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, all names
| starting with 4C
.. _spw:
| ``spw ({string, stringVec, int, intVec}='')`` - Select spectral window/channels
| Default: ''=all spectral windows and channels
|
| Examples:
| spw='0~2,4'; spectral windows 0,1,2,4 (all channels)
| spw='<2'; spectral windows less than 2 (i.e. 0,1)
| spw='0:5~61'; spw 0, channels 5 to 61
| spw='0,10,3:3~45'; spw 0,10 all channels, spw
| 3 - chans 3 to 45.
| spw='0~2:2~6'; spw 0,1,2 with channels 2
| through 6 in each.
| spw = '\*:3~64' channels 3 through 64 for all sp id's
| spw = ' :3~64' will NOT work.
| NOTE: mstransform does not support multiple
| channel ranges per spectral window (';').
.. _scan:
| ``scan ({string, stringVec, int, intVec}='')`` - Scan number range
| Subparameter of selectdata=True
| Default: '' = all
.. _antenna:
| ``antenna ({string, stringVec, int, intVec}='')`` - Select data based on antenna/baseline
| Subparameter of selectdata=True
| Default: '' (all)
| If antenna string is a non-negative integer, it
| is assumed an antenna index, otherwise, it is
| assumed as 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 with
| indices 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,10'; all baselines with antennas
| 5,6,10 index numbers
| antenna='!ea03,ea12,ea17': all baselines
| except those that include EVLA antennas
| ea03, ea12, or ea17.
.. _correlation:
| ``correlation ({string, stringVec}='')`` - Select data based on correlation
| Default: '' ==> all
| Example: correlation="XX,YY".
.. _timerange:
| ``timerange ({string, stringVec, int, intVec}='')`` - Select data based on time range
| Subparameter of selectdata=True
| Default = '' (all)
| Examples:
| timerange =
| 'YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss'
| (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
.. _intent:
| ``intent ({string, stringVec, int, intVec}='')`` - Select observing intent
| Default: '' (no selection by intent)
| Example: intent='*BANDPASS*' (selects data
| labelled with BANDPASS intent)
.. _array:
| ``array ({string, stringVec, int, intVec}='')`` - (Sub)array number range
| Default: '' (all)
.. _uvrange:
| ``uvrange ({string, stringVec, int, intVec}='')`` - Select data by baseline length.
| Default = '' (all)
| Examples:
| uvrange='0~1000klambda'; uvrange from 0-1000 kilo-lambda
| uvrange='>4klambda';uvranges greater than 4 kilo-lambda
| uvrange='0~1000km'; uvrange in kilometers
.. _observation:
| ``observation ({string, stringVec, int, intVec}='')`` - Select by observation ID(s)
| Subparameter of selectdata=True
| Default: '' = all
| Example: observation='0~2,4'
.. _feed:
| ``feed ({string, stringVec, int, intVec}='')`` - Selection based on the feed
| NOT IMPLEMENTED YET!
| Default: '' = all
.. _datacolumn:
| ``datacolumn (string='all')`` - Which data column(s) to use for processing
| (case-insensitive).
| Default: 'all' (= whichever of the options that
| are present)
| Options: 'data', 'model', 'corrected',
| 'all','float_data', 'lag_data',
| 'float_data,data', 'lag_data,data'
| Example: datacolumn='data'
"""
pass