LAL  7.5.0.1-08ee4f4
Header ResampleTimeSeries.h

Detailed Description

Provides routines to resample a time series.

Author
Brown, D. A.

At present only integer downsampling of REAL4TimeSeries by a power of two is supported.

Synopsis

#include <lal/ResampleTimeSeries.h>

This header covers routines that resample time series by applying a low pass filter and decimating the resulting time series. Further documentation is given in the individual routines' modules.

Modules

 Module ResampleTimeSeries.c
 Downsamples a time series in place by an integer power of two.
 

Data Structures

union  ResampleTSFilterParams
 This union is provided so that the code can store the parameters of the filter in a place accessible by the user for user designed low pass filters. More...
 
struct  ResampleTSParams
 This structure controls the behaviour of the resampling function. More...
 

Enumerations

enum  ResampleTSFilter { defaultButterworth , LDASfirLP }
 This enum type contains the different low pass filters available to prevent power above the new Nyquist frequency entering the resampled time series due to aliasing. More...
 

Error Codes

#define RESAMPLETIMESERIESH_ENULL   1
 Null pointer. More...
 
#define RESAMPLETIMESERIESH_ENNUL   2
 Non-null pointer. More...
 
#define RESAMPLETIMESERIESH_EZERO   3
 Length of input time series is zero. More...
 
#define RESAMPLETIMESERIESH_ERATE   4
 Sample rate is zero. More...
 
#define RESAMPLETIMESERIESH_EUPSM   5
 Cannot upsample. More...
 
#define RESAMPLETIMESERIESH_EHIGH   6
 Input sample rate is greater than 32kHz. More...
 
#define RESAMPLETIMESERIESH_ELOG2   7
 Only power-of-two resampling is avaliable. More...
 
#define RESAMPLETIMESERIESH_EFILT   8
 Unknown filter type. More...
 
#define RESAMPLETIMESERIESH_EINVD   9
 Invalid or non-integer resample factor. More...
 
#define RESAMPLETIMESERIESH_ELDAS   10
 Input resample factor with LDAS FIR. More...
 

Enumeration Type Documentation

◆ ResampleTSFilter

This enum type contains the different low pass filters available to prevent power above the new Nyquist frequency entering the resampled time series due to aliasing.

Enumerator
defaultButterworth 

An IIR butterwoth filter of order 20 with attenuation 0.1 at the new Nyquist frequency.

See the package tdfilters for documentation of butterworth filters in LAL.

LDASfirLP 

For downsampling by a factor of 2, 4 or 8 an implementation of the FIR filter used by the LDAS datacondAPI resample().

This is provided for testing the result of standalone codes and codes running under LDAS. The LDAS filter provided here has filter order parameter 10, so the order of the filter is \(2 \times 10 \times q\) where \(q\) is the resampling ratio.

Definition at line 86 of file ResampleTimeSeries.h.

Macro Definition Documentation

◆ RESAMPLETIMESERIESH_ENULL

#define RESAMPLETIMESERIESH_ENULL   1

Null pointer.

Definition at line 56 of file ResampleTimeSeries.h.

◆ RESAMPLETIMESERIESH_ENNUL

#define RESAMPLETIMESERIESH_ENNUL   2

Non-null pointer.

Definition at line 57 of file ResampleTimeSeries.h.

◆ RESAMPLETIMESERIESH_EZERO

#define RESAMPLETIMESERIESH_EZERO   3

Length of input time series is zero.

Definition at line 58 of file ResampleTimeSeries.h.

◆ RESAMPLETIMESERIESH_ERATE

#define RESAMPLETIMESERIESH_ERATE   4

Sample rate is zero.

Definition at line 59 of file ResampleTimeSeries.h.

◆ RESAMPLETIMESERIESH_EUPSM

#define RESAMPLETIMESERIESH_EUPSM   5

Cannot upsample.

Definition at line 60 of file ResampleTimeSeries.h.

◆ RESAMPLETIMESERIESH_EHIGH

#define RESAMPLETIMESERIESH_EHIGH   6

Input sample rate is greater than 32kHz.

Definition at line 61 of file ResampleTimeSeries.h.

◆ RESAMPLETIMESERIESH_ELOG2

#define RESAMPLETIMESERIESH_ELOG2   7

Only power-of-two resampling is avaliable.

Definition at line 62 of file ResampleTimeSeries.h.

◆ RESAMPLETIMESERIESH_EFILT

#define RESAMPLETIMESERIESH_EFILT   8

Unknown filter type.

Definition at line 63 of file ResampleTimeSeries.h.

◆ RESAMPLETIMESERIESH_EINVD

#define RESAMPLETIMESERIESH_EINVD   9

Invalid or non-integer resample factor.

Definition at line 64 of file ResampleTimeSeries.h.

◆ RESAMPLETIMESERIESH_ELDAS

#define RESAMPLETIMESERIESH_ELDAS   10

Input resample factor with LDAS FIR.

Definition at line 65 of file ResampleTimeSeries.h.