Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: calibrater.setsolve - Function Up: calibrater - Tool Previous: calibrater.setapply - Function


calibrater.smooth - Function



Package synthesis
Module calibrater
Tool calibrater


Produce a smooth and/or interpolated table


Synopsis
smooth(infile, outfile, append, select, smoothtype, smoothtime, interptype, interptime)



Arguments

infile in Input calibration table
Allowed: String
Default: No default
outfile in Output calibration table
Allowed: String
Default: No default
append in Append to an existing output table?
Allowed: Bool
Default: F
select in TAQL selection string
Allowed: String
Default: No selection
smoothtype in The smoothing filter to be used
Allowed: String from 'mean', 'median', 'smean' (sliding mean), 'smedian' (sliding median) or 'none'
Default: 'mean'
smoothtime in Smoothing filter time constant (sec)
Allowed: Float
Default: 0.0
interptype in The type of interpolation desired
Allowed: String from 'nearest','spline','linear','cubic',or 'none'
Default: 'spline'
interptime in Sampling interval for interpolation (sec)
Allowed: Float
Default: 0.0


Returns
Bool



Description

This function is intended to be used for interpolating and/or smoothing Jones matrices derived from one or more sources (calibraters). The time-stamps at which the interpolating function is sampled is defined by the selection (via the select argument) and the Measurement Set associated with the input calibration table. The interpolated values are then written to the output calibration table. A smoothing filter can be optionally applied to the input table and the smoothed table then used to derive the specified interpolation function.

A value of 'none' for either interptype or smoothtype switches off interpolation or smoothing respectively. A value of 'none' for both these would therefore just copy the input table to the output table.

The size of the 'mean' and 'median' smoothing filters is truncated (as against rounded) to the nearest value smaller than or equal to the specified smoothing time constant. This means that the smoothing filter size can be smaller than the specified time constant by some fraction of the sampling interval in the input table. The 'smean' and 'smedian' are sliding versions of the 'mean' and 'median' filters. The sliding step is always one pixel, with the filter centered on each pixel (gain solutions in the input table). At the boundaries, the filters expand (from the starting edge) or shrink (for the ending edge) from a size of one pixel (for the last and first point) till they are of the size smaller than or equal to the specified time-constant.

The filter output is used for deriving the parameters of the specified interpolation function. The interpolated function is then sampled at the sampling interval specified by interptime. The output table can then be applied to the data as usual (via the setapply()->correct() sequence).



Example
c:=calibrater('3C273XC1.MS');
c.smooth(infile='in.gcal',outfile='out.gcal', append=F, select='',smoothtype='median',smoothtime=10,interptype='spline');
c.setapply (type='G', table='out.cal', select='FIELD_NAME==FIELD1')
c.correct();
c.close();

In this example, 'G' solutions in the table 'in.gcal' are first smoothed using the median filter with a time-constant of 10sec and then interpolated on timestamps from the associated MS using the spline interpolation function. The output is written into 'out.gcal' and applied to a field named 'FIELD1'.





next up previous contents index
Next: calibrater.setsolve - Function Up: calibrater - Tool Previous: calibrater.setapply - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15