EXAMPLES · SEE_ALSO

## NAME

filtpars -- edit the filter function parameters

## USAGE

filtpars

## PARAMETERS

- f_type = "ramp"
- Type of filter to be used. Possible choices are
- ramp
- A ramp function which begins to rise at the
*cuton*wavenumber and reaches full value (i.e. passes the full value of the component) at the*fullon*wavenumber. It begin to decline at the*cutoff*wavenumber and returns to zero at the*fulloff*wavenumber.

- Hanning
- A Hanning function is used to attenuate the fourier components over the
range specified by the
*cuton*and*cutoff*parameters.

- Welch
- A Welch function is used to attenuate the fourier components over the range
specified by the
*cuton*and*cutoff*parameters.

- Square
- A standard step function which is zero outside the
*cuton*and*cutoff*component numbers and one within those numbers.

- cuton = 0
- The fourier wavenumber at which the filter begins to pass the filtered fft component.

- cutoff = 0
- The fourier wavenumber at which the filter ceases to pass fft components.

- fullon = 0
- Used only for a
`ramp`filter. The fourier wavenumber at which the filter reaches full value and passes all of the data.

- fulloff = 0
- Used only for a
`ramp`filter. The fourier wavenumber at which the filter reaches zero value and passes none of the data.

## DESCRIPTION

The filtering parameters control the type of filter to be used
on the Fourier transformed data as well as the range in wavenumbers over
which it will operate. Filtering of the data may be necessary to remove
high frequency noise or low-frequency tends not removed by continuum
subtraction. If the filtering is enabled, then once the data have been
transformed, a bandpass filter of the type chosen by the
*f_type*
parameter is applied to the Fourier components of the
spectra. Wavenumbers lower than that specified by the *cuton*
parameter
are set to zero and wavenumbers up to that specified by the *cutoff*
parameter (or the *fulloff*
parameter in the case of a `ramp` filter)
are attenuated or passed in full according to the filter chosen.
Since the data are assumed to be linearized in log-wavelength space, applying
a filter to the data in Fourier space introduces no phase shift and has
the same effect as smoothing the data in real space. The data are centered
and zero padded in an array of length 2**N such that the number of elements
is greater than or equal to the number of actual data points. This array in
then Fourier transformed, and the resulting fft is then filtered prior
to correlation.

Filtering is enabled by turning on the *fxcor.filter*
parameter and setting
it to something other than "none". Filtering may be done on only one of the
two spectra or both prior to correlation.

The filter choices behave as follows:

- Square Filter
- The fourier components at wavenumbers between the
*cuton*and*cutoff*wavenumbers are passed without change. Those wavenumbers outside this region are set to zero.

- Ramp Filter
- Fourier components below the
*cuton*and above the*fulloff*wavenumbers are set to zero. At the*cuton*wavenumber the filter function begins to rise until the*fullon*wavenumber is reached. Data in this region is weighted by the slope of the filter until at the*fullon*wavenumber data are passed through without change. Similarly, the filter begins to fall at the*cutoff*wavenumber until it completely blocks (i.e. zeros) the fourier components at the*fulloff*wavenumber.

- Welch Filter
- Fourier components below the
*cuton*and above the*cutoff*wavenumbers are set to zero. Components between these regions are weighted according to the equation for a Welch window. Namely,2 w(j) = 1. - [ (j - 1/2(N-1)) / (1/2(N+1)) ] where j = (wavenumber - cuton_wavenumer) N = (cutoff - cuton) + 1

- Hanning Filter
- Fourier components below the
*cuton*and above the*cutoff*wavenumbers are set to zero. Components between these regions are weighted according to the equation for a Hanning window. Namely,w(j) = 1/2 [ 1. - cos( (TWOPI*j) / (N-1) ) ] where j = (wavenumber - cuton_wavenumer) N = (cutoff - cuton) + 1

## TASK COLON COMMANDS

The values of the *filtpars*
pset may be changed, displayed, or updated
from within the Fourier mode of the *fxcor*
task. Simply
typing the parameter name will have the default action of printing the current
value of that parameter. An optional value may be added to change the named
parameter.

- :update filtpars
- Update the pset with the current values of the filter parameters. The argument "filtpars" must be present or else the command will default to the task parameters.

- :unlearn filtpars
- Reset the parameter values to their defaults. The argument "filtpars" must be present or else the command will default to the task parameters.

- :show filtpars
- Clear the screen and display all values in the filtpars pset. The argument "filtpars" must be present or else the command will default to the task default.

- :filttype [ramp|welch|hanning|square|none]
- Set or show the current value of the filter type to use

- :cuton [int_value]
- Set or show the current value of the cuton fourier component

- :cutoff [int_value]
- Set or show the current value of the cutoff fourier component

- :fullon [int_value]
- Set or show the current value of the fullon fourier component

- :fulloff [int_value]
- Set or show the current value of the fulloff fourier component

## EXAMPLES

1. List the filtering parameters.

rv> lpar filtpars

2. Edit the filtering parameters

rv> filtpars