|
|||
NRAO Home > CASA > CASA Task Reference Manual |
|
0.1.100 sdaverageold
Requires:
Synopsis
ASAP SD task [DEPRECATED]: averaging and smoothing of spectra
Description
### DEPRECATION WARNING
#################################################
This task will be removed in CASA 5.1. To a very great extent, the
functionality of this task with MeasurementSet format is replicated with
sdsmooth and mstransform.
#########################################################################
Task sdaverageold performs averaging in time/polarization and smoothing of the single-dish spectra. When timeaverage=True, spectra are averaged in time. Spectra within each scan ID are averaged when scanaverage=True. When polaverage=True, spectra are averaged in polarization and time (Note time averaging with polaverage=True would be discarded in future). See examples in below for details of time/polarization average. When kernel is specified (!=”), each spectrum is smoothed by convolving the kernel after averaging of spectra.
If you give multiple IFs (spectral windows) in spw, then your scantable will have multiple IFs by default. Averaging of multi-resolution (multi-IFs) spectra can be achieved by setting a sub-parameter in timeaverage, averageall = True. It handles multi-IFs by merging IFs which have overlaps in frequency coverages and assigning new IFs in the output spectra.
Set plotlevel ¿= 1 to plot spectrum before and after smoothing, and
verify=True to interactively select whether or not accept smoothing results.
NOTE, so far, there is no mechanism to verify averaging of spectra in time
and/or polarization.
Arguments
Inputs |
| ||
infile |
| name of input SD dataset
| |
| allowed: | string |
|
| Default: |
|
|
antenna |
| select an antenna name or ID, e.g. ’PM03’ (only effective
for MS input)
| |
| allowed: | any |
|
| Default: | variant 0 |
|
field |
| select data by field IDs and names, e.g. ’3C2*’ (”=all)
| |
| allowed: | string |
|
| Default: |
|
|
spw |
| select data by IF IDs (spectral windows), e.g. ’3,5,7’
(”=all)
| |
| allowed: | string |
|
| Default: |
|
|
scan |
| select data by scan numbers, e.g. ’21~23’ (”=all)
| |
| allowed: | string |
|
| Default: |
|
|
pol |
| select data by polarization IDs, e.g. ’0,1’ (”=all)
| |
| allowed: | string |
|
| Default: |
|
|
timeaverage |
| average spectra over time [True, False] (see examples in
help)
| |
| allowed: | bool | |
| Default: | False |
|
tweight |
| weighting for time averaging
| |
| allowed: | string |
|
| Default: | tintsys |
|
scanaverage |
| average spectra within a scan number [True, False] (see
examples in help)
| |
| allowed: | bool | |
| Default: | False |
|
averageall |
| set True only when averaging spectra with different
spectral resolutions
| |
| allowed: | bool |
|
| Default: | False |
|
polaverage |
| average spectra over polarizations [True, False]
| |
| allowed: | bool |
|
| Default: | False |
|
pweight |
| weighting for polarization averaging
| |
| allowed: | string |
|
| Default: | tsys |
|
kernel |
| type of spectral smoothing kernel (”=no smoothing)
| |
| allowed: | string |
|
| Default: |
|
|
kwidth |
| width of smoothing kernel in channels
| |
| allowed: | int |
|
| Default: | 5 |
|
chanwidth |
| width of regridded channels
| |
| allowed: | string |
|
| Default: | 5 |
|
verify |
| interactively verify the results of smoothing for each
spectrum. [not available for kernel=”regrid”]
| |
| allowed: | bool |
|
| Default: | False |
|
plotlevel |
| plot and summarize results (0=none). See description in
help
| |
| allowed: | int |
|
| Default: | 0 |
|
outfile |
| name of output file (See a WARNING in help)
| |
| allowed: | string |
|
| Default: |
|
|
outform |
| output file format (See a WARNING in help)
| |
| allowed: | string |
|
| Default: | ASAP |
|
overwrite |
| overwrite the output file if already exists
| |
| allowed: | bool |
|
| Default: | False |
|
void
Example
Keyword arguments:
infile -- name of input SD dataset
antenna -- select an antenna name or ID
default: 0
example: ’PM03’
NOTE this parameter is effective only for MS input
field -- select data by field IDs and names
default: ’’ (use all fields)
example: field=’3C2*’ (all names starting with 3C2)
field=’0,4,5~7’ (field IDs 0,4,5,6,7)
field=’0,3C273’ (field ID 0 or field named 3C273)
this selection is in addition to the other selections to data
spw -- select data by IF IDs (spectral windows)
NOTE this task only supports IF ID selction and ignores channel
selection.
default: ’’ (use all IFs and channels)
example: spw=’3,5,7’ (IF IDs 3,5,7; all channels)
spw=’<2’ (IF IDs less than 2, i.e., 0,1; all channels)
spw=’30~45GHz’ (IF IDs with the center frequencies in range 30-45GHz; all channels)
this selection is in addition to the other selections to data
scan -- select data by scan numbers
default: ’’ (use all scans)
example: scan=’21~23’ (scan IDs 21,22,23)
this selection is in addition to the other selections to data
pol -- select data by polarization IDs
default: ’’ (use all polarizations)
example: pol=’0,1’ (polarization IDs 0,1)
this selection is in addition to the other selections to data
timeaverage -- average spectra over time
options: (bool) True, False
default: False
>>>timeaverage expandable parameter
tweight -- weighting for time averaging
options: ’var’ (1/var(spec) weighted)
’tsys’ (1/Tsys**2 weighted)
’tint’ (integration time weighted)
’tintsys’ (Tint/Tsys**2)
’median’ ( median averaging)
default: ’tintsys’
scanaverage -- average spectra within a scan number
when True, spectra are NOT averaged over
different scan numbers.
options: (bool) True, False
default: False
averageall -- average multi-resolution spectra
spectra are averaged by referring
their frequency coverage
default: False
polaverage -- average spectra over polarizations
options: (bool) True, False
default: False
>>>polaverage expandable parameter
pweight -- weighting for polarization averaging
options: ’var’ (1/var(spec) weighted)
’tsys’ (1/Tsys**2 weighted)
default: ’tsys’
kernel -- type of spectral smoothing kernel
options: ’’, ’hanning’,’gaussian’,’boxcar’,’regrid’
default: ’’ (no smoothing)
>>>kernel expandable parameter
kwidth -- width of spectral smoothing kernel
options: (int) in channels
default: 5
example: 5 or 10 seem to be popular for boxcar
ignored for hanning (fixed at 5 chans)
(0 will turn off gaussian or boxcar)
chanwidth -- channel width of regridded spectra
default: ’5’ (in channels)
example: ’500MHz’, ’0.2km/s’
verify -- interactively verify the results of smoothing for each
spectrum. When verify = True, for each input spectrum,
spectra before and after the operation are displayed
in a plot window. At the prompt there are four choices
of action: ’Y’ (accept the operation and continue to
the next input spectrum), ’N’ (reject the operation
and continue to the next input spectrum), ’A’ (accept
the current operation and continue non-interactively),
and ’R’ (reject the current operation and exit from
operation).
Note that when the operation is rejected by ’N’ or ’R’,
no smoothing is done to the spectrum/spectra.
options: (bool) True,False
default: False
outfile -- name of output file
default: ’’ (<infile>_sm)
outform -- output file format
options: ’ASAP’,’MS2’, ’ASCII’,’SDFITS’
default: ’ASAP’
NOTE the ASAP format is easiest for further sd
processing; use MS2 for CASA imaging.
If ASCII, then will append some stuff to
the outfile name
overwrite -- overwrite the output file if already exists
options: (bool) True,False
default: False
NOTE this parameter is ignored when outform=’ASCII’
plotlevel -- control for plotting and summary of smoothing results
options: (int) 0, 1, 2, and their negative counterparts
default: 0 (no plotting)
example: plotlevel=1; plot spectra before and after smoothing
plotlevel=2; additionally list data before and after operation.
plotlevel<0 as abs(plotlevel), e.g.
-1 => hardcopy of final plot (will be named
<outfile>_smspec.eps)
-------------------------------------
AVERAGING OF SPECTRA
-------------------------------------
Task sdaverageold has two modes of averaging spectra, i.e., time and
polarization average.
When timeaverage=True, spectra are averaged over time for each IF
(spectral window), polarization, and beam, independently. Note that,
by default (scanaverage=False), timeaverage=True averages spectra
irrespective of scan IDs.
It is possible to average spectra separately for each scan ID by setting
a sub-parameter scanaverage=True.
For example, the combination of parameters: scan=’0~2’, timeaverage=True, and
scanaverage=False: averages spectra in scan ID 0 through 2 all together
to a spectrum,
scanaverage=True : averages spectra per scan ID and end up with three
spectra from scan 0, 1, and 2.
When polaverage=True, spectra are averaged over polarization for
each IF (spectral window) and beam. Note that, so far, time averaging is
automatically switched on when polaverage is set to True. This behavior
is not desirable and will be discarded in future.
-------
WARNING
-------
For the GBT raw SDFITS format data as input:
SDtasks are able to handle GBT raw SDFITS format data since the
data filler is available. However, the functionality is not well
tested yet, so that there may be unknown bugs.
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