Provides routines to efficiently calculate the running median.
This header covers routines to efficiently calculate the running median of REAL4 and REAL8 sequences
The routine LALDRunningMedian()
calculates the running medians of a REAL8Sequence. The routine LALSRunningMedian()
does the same for a REAL4Sequence. input
ist a REAL4/REAL8Sequence containing the input array, blocksize
is the length of the block the medians are calculated of. With n being the lenght of the input array and b being the blocksize, the medians array must be a REAL4/REAL8 sequence of length (n-b+1). LALDRunningMedian2()
and LALSRunningMedian2()
are a different implentation of the same algorithm. It should behave exactly like LALDRunningMedian()
, but has proven to be a little faster and more stable. Check if it works for you.
For a detailed description of the algorithm see the LIGO document T-030168-00-D, Somya D. Mohanty: Efficient Algorithm for computing a Running Median
Prototypes | |
void | LALDRunningMedian (LALStatus *status, REAL8Sequence *medians, const REAL8Sequence *input, LALRunningMedianPar param) |
See LALRunningMedian_h for documentation. More... | |
void | LALSRunningMedian (LALStatus *status, REAL4Sequence *medians, const REAL4Sequence *input, LALRunningMedianPar param) |
See LALRunningMedian_h for documentation. More... | |
void | LALDRunningMedian2 (LALStatus *status, REAL8Sequence *medians, const REAL8Sequence *input, LALRunningMedianPar param) |
See LALRunningMedian_h for documentation. More... | |
void | LALSRunningMedian2 (LALStatus *status, REAL4Sequence *medians, const REAL4Sequence *input, LALRunningMedianPar param) |
See LALRunningMedian_h for documentation. More... | |
Data Structures | |
struct | LALRunningMedianPar |
This is the parameter structure for the LALRunningMedian functions. More... | |
Files | |
file | LALRunningMedianTest.c |
Program to test running median function. | |
Error Codes | |
#define | LALRUNNINGMEDIANH_EMALOC1 1 |
Could not allocate indexblock. More... | |
#define | LALRUNNINGMEDIANH_EMALOC2 2 |
Could not allocate checks. More... | |
#define | LALRUNNINGMEDIANH_EMALOC3 3 |
Could not allocate checks4shift. More... | |
#define | LALRUNNINGMEDIANH_EMALOC4 4 |
Could not allocate nodeaddresses. More... | |
#define | LALRUNNINGMEDIANH_EMALOC5 5 |
Could not aloocate first node. More... | |
#define | LALRUNNINGMEDIANH_EMALOC6 6 |
Could not allocate node. More... | |
#define | LALRUNNINGMEDIANH_ECV 7 |
Could not create output vector (LALCreateVector() failed) More... | |
#define | LALRUNNINGMEDIANH_ENULL 8 |
Invalid input: NULL pointer. More... | |
#define | LALRUNNINGMEDIANH_EZERO 9 |
Invalid input: block length must be >2. More... | |
#define | LALRUNNINGMEDIANH_ELARGE 10 |
Invalid input: block length larger than imput length. More... | |
#define | LALRUNNINGMEDIANH_EIMED 11 |
Invalid input: wrong size of median array. More... | |
void LALDRunningMedian | ( | LALStatus * | status, |
REAL8Sequence * | medians, | ||
const REAL8Sequence * | input, | ||
LALRunningMedianPar | param | ||
) |
See LALRunningMedian_h for documentation.
Definition at line 118 of file LALRunningMedian.c.
void LALSRunningMedian | ( | LALStatus * | status, |
REAL4Sequence * | medians, | ||
const REAL4Sequence * | input, | ||
LALRunningMedianPar | param | ||
) |
See LALRunningMedian_h for documentation.
Definition at line 526 of file LALRunningMedian.c.
void LALDRunningMedian2 | ( | LALStatus * | status, |
REAL8Sequence * | medians, | ||
const REAL8Sequence * | input, | ||
LALRunningMedianPar | param | ||
) |
See LALRunningMedian_h for documentation.
find point of insertion:
Definition at line 936 of file LALRunningMedian.c.
void LALSRunningMedian2 | ( | LALStatus * | status, |
REAL4Sequence * | medians, | ||
const REAL4Sequence * | input, | ||
LALRunningMedianPar | param | ||
) |
See LALRunningMedian_h for documentation.
find point of insertion:
Definition at line 1220 of file LALRunningMedian.c.
#define LALRUNNINGMEDIANH_EMALOC1 1 |
Could not allocate indexblock.
Definition at line 68 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_EMALOC2 2 |
Could not allocate checks.
Definition at line 69 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_EMALOC3 3 |
Could not allocate checks4shift.
Definition at line 70 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_EMALOC4 4 |
Could not allocate nodeaddresses.
Definition at line 71 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_EMALOC5 5 |
Could not aloocate first node.
Definition at line 72 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_EMALOC6 6 |
Could not allocate node.
Definition at line 73 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_ECV 7 |
Could not create output vector (LALCreateVector() failed)
Definition at line 74 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_ENULL 8 |
Invalid input: NULL pointer.
Definition at line 75 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_EZERO 9 |
Invalid input: block length must be >2.
Definition at line 76 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_ELARGE 10 |
Invalid input: block length larger than imput length.
Definition at line 77 of file LALRunningMedian.h.
#define LALRUNNINGMEDIANH_EIMED 11 |
Invalid input: wrong size of median array.
Definition at line 78 of file LALRunningMedian.h.