LALSimulation  5.4.0.1-fe68b98
LALSimSphHarmSeries.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 E. Ochsner, C. Pankow
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with with program; see the file COPYING. If not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17  * MA 02110-1301 USA
18  */
19 
20 #ifndef _LALSIMSPHHARMSERIES_H
21 #define _LALSIMSPHHARMSERIES_H
22 
23 #include <limits.h>
24 
25 #include <lal/LALDatatypes.h>
26 #include <lal/TimeSeries.h>
27 
28 #if defined(__cplusplus)
29 extern "C" {
30 #elif 0
31 } /* so that editors will match preceding brace */
32 #endif
33 
34 /**
35  * @defgroup LALSimSphHarmSeries_h Header LALSimSphHarmSeries.h
36  * @ingroup lalsimulation_general
37  *
38  * @brief Routines for manipulating spherical harmonic time- and
39  * frequency-series.
40  *
41  * @{
42  */
43 
44 /**
45  * Structure to carry a collection of spherical harmonic modes in COMPLEX16
46  * time series. Contains convenience getter and setter functions, as well as
47  * a convienence "maximum l mode" function. Implemented as a singly forward
48  * linked list.
49  */
50 typedef struct tagSphHarmTimeSeries {
51  COMPLEX16TimeSeries* mode; /**< The sequences of sampled data. */
52  UINT4 l; /**< Node mode l */
53  INT4 m; /**< Node submode m */
54  REAL8Sequence* tdata; /**< Timestamp values */
55  struct tagSphHarmTimeSeries* next; /**< next pointer */
57 
58 typedef struct tagSphHarmPolarTimeSeries {
59  REAL8TimeSeries* ampl; /**< The sequences of mode amplitude. */
60  REAL8TimeSeries* phase; /**< The sequences of mode phase (not modulo 2Pi). */
61  UINT4 l; /**< Node mode l */
62  INT4 m; /**< Node submode m */
63  REAL8Sequence* tdata; /**< Timestamp values */
64  struct tagSphHarmPolarTimeSeries* next; /**< next pointer */
66 
67 typedef struct tagSphHarmFrequencySeries {
68  COMPLEX16FrequencySeries* mode; /**< The sequences of sampled data. */
69  UINT4 l; /**< Node mode l */
70  INT4 m; /**< Node submode m */
71  REAL8Sequence* fdata; /**< Frequency values */
72  struct tagSphHarmFrequencySeries* next; /**< next pointer */
74 
75 /** @} */
76 
83 
84 #ifdef SWIG
85 SWIGLAL(RETURN_OWNED_BY_1ST_ARG(COMPLEX16TimeSeries*, XLALSphHarmTimeSeriesGetMode));
86 #endif
87 
90 
91 
97 
98 #ifdef SWIG
99 SWIGLAL(RETURN_OWNED_BY_1ST_ARG(REAL8TimeSeries*, XLALSphHarmPolarTimeSeriesGetModeAmplitude));
100 SWIGLAL(RETURN_OWNED_BY_1ST_ARG(REAL8TimeSeries*, XLALSphHarmPolarTimeSeriesGetModePhase));
101 #endif
102 
107 
108 
109 
117 
118 #ifdef SWIG
119 SWIGLAL(RETURN_OWNED_BY_1ST_ARG(COMPLEX16FrequencySeries*, XLALSphHarmFrequencySeriesGetMode));
120 #endif
121 
123 
124 #if 0
125 { /* so that editors will match succeeding brace */
126 #elif defined(__cplusplus)
127 }
128 #endif
129 
130 #endif
int l
Definition: bh_qnmode.c:135
sigmaKerr data[0]
uint32_t UINT4
int32_t INT4
REAL8TimeSeries * XLALSphHarmPolarTimeSeriesGetModePhase(SphHarmPolarTimeSeries *ts, UINT4 l, INT4 m)
Get the time series of a waveform's (l,m) spherical harmonic mode phase from a SphHarmPolarTimeSeries...
UINT4 XLALSphHarmPolarTimeSeriesGetMaxL(SphHarmPolarTimeSeries *ts)
Get the largest l index of any mode in the SphHarmTimeSeries linked list.
UINT4 XLALSphHarmTimeSeriesGetMinL(SphHarmTimeSeries *ts)
Get the smallest l index of any mode in the SphHarmTimeSeries linked list.
SphHarmTimeSeries * XLALSphHarmTimeSeriesAddMode(SphHarmTimeSeries *appended, const COMPLEX16TimeSeries *inmode, UINT4 l, INT4 m)
Prepend a node to a linked list of SphHarmTimeSeries, or create a new head.
SphHarmFrequencySeries * XLALSphHarmFrequencySeriesFromSphHarmTimeSeries(SphHarmTimeSeries *hlms_TD)
Create a SphHarmFrequencySeries from a SphHarmTimeSeries by performing an FFT on each mode in the Sph...
REAL8Sequence * XLALSphHarmTimeSeriesGetTData(SphHarmTimeSeries *ts)
Get the tdata member for nodes in the list.
COMPLEX16TimeSeries * XLALSphHarmTimeSeriesGetMode(SphHarmTimeSeries *ts, UINT4 l, INT4 m)
Get the time series of a waveform's (l,m) spherical harmonic mode from a SphHarmTimeSeries linked lis...
SphHarmTimeSeries * XLALResizeSphHarmTimeSeries(SphHarmTimeSeries *ts, int first, size_t length)
For every (l,m) node in the SphHarmTimeSeries linked list, call XLALResizeCOMPLEX16TimeSeries(ts->mod...
REAL8Sequence * XLALSphHarmPolarTimeSeriesGetTData(SphHarmPolarTimeSeries *ts)
Get the tdata member for nodes in the list.
void XLALSphHarmTimeSeriesSetTData(SphHarmTimeSeries *ts, REAL8Sequence *tdata)
Set the tdata member for all nodes in the list.
REAL8TimeSeries * XLALSphHarmPolarTimeSeriesGetModeAmplitude(SphHarmPolarTimeSeries *ts, UINT4 l, INT4 m)
Get the time series of a waveform's (l,m) spherical harmonic mode amplitude from a SphHarmPolarTimeSe...
SphHarmPolarTimeSeries * XLALSphHarmPolarTimeSeriesAddMode(SphHarmPolarTimeSeries *appended, const REAL8TimeSeries *inampl, const REAL8TimeSeries *inphase, UINT4 l, INT4 m)
Prepend a node to a linked list of SphHarmPolarTimeSeries, or create a new head.
UINT4 XLALSphHarmFrequencySeriesGetMaxL(SphHarmFrequencySeries *ts)
Get the largest l index of any mode in the SphHarmFrequencySeries linked list.
UINT4 XLALSphHarmTimeSeriesGetMaxL(SphHarmTimeSeries *ts)
Get the largest l index of any mode in the SphHarmTimeSeries linked list.
void XLALDestroySphHarmTimeSeries(SphHarmTimeSeries *ts)
Delete list from current pointer to the end of the list.
COMPLEX16FrequencySeries * XLALSphHarmFrequencySeriesGetMode(SphHarmFrequencySeries *ts, UINT4 l, INT4 m)
Get the time series of a waveform's (l,m) spherical harmonic mode from a SphHarmFrequencySeries linke...
SphHarmFrequencySeries * XLALSphHarmFrequencySeriesAddMode(SphHarmFrequencySeries *appended, const COMPLEX16FrequencySeries *inmode, UINT4 l, INT4 m)
Prepend a node to a linked list of SphHarmFrequencySeries, or create a new head.
void XLALDestroySphHarmFrequencySeries(SphHarmFrequencySeries *ts)
Delete list from current pointer to the end of the list.
void XLALDestroySphHarmPolarTimeSeries(SphHarmPolarTimeSeries *ts)
Delete list from current pointer to the end of the list.
void XLALSphHarmPolarTimeSeriesSetTData(SphHarmPolarTimeSeries *ts, REAL8Sequence *tdata)
Set the tdata member for all nodes in the list.
SphHarmPolarTimeSeries * XLALResizeSphHarmPolarTimeSeries(SphHarmPolarTimeSeries *ts, int first, size_t length)
For every (l,m) node in the SphHarmPolarTimeSeries linked list, call XLALResizeREAL8TimeSeries(ts->am...
void XLALSphHarmFrequencySeriesSetFData(SphHarmFrequencySeries *ts, REAL8Sequence *fdata)
Set the tdata member for all nodes in the list.
REAL8Sequence * XLALSphHarmFrequencySeriesGetFData(SphHarmFrequencySeries *ts)
Get the fdata member.
SphHarmPolarTimeSeries * XLALCutSphHarmPolarTimeSeries(SphHarmPolarTimeSeries *ts, int first, size_t length)
Create a new SphHarmPolarTimeSeries linked listby extracting a section of an existing SphHarmPolarTim...
SphHarmTimeSeries * XLALSphHarmTimeSeriesFromSphHarmFrequencySeriesDataAndPSD(SphHarmFrequencySeries *hlms, COMPLEX16FrequencySeries *data, COMPLEX16FrequencySeries *psd)
static const INT4 m
struct tagSphHarmFrequencySeries * next
next pointer
REAL8Sequence * fdata
Frequency values.
COMPLEX16FrequencySeries * mode
The sequences of sampled data.
REAL8TimeSeries * ampl
The sequences of mode amplitude.
REAL8TimeSeries * phase
The sequences of mode phase (not modulo 2Pi).
struct tagSphHarmPolarTimeSeries * next
next pointer
REAL8Sequence * tdata
Timestamp values.
Structure to carry a collection of spherical harmonic modes in COMPLEX16 time series.
struct tagSphHarmTimeSeries * next
next pointer
REAL8Sequence * tdata
Timestamp values.
COMPLEX16TimeSeries * mode
The sequences of sampled data.
INT4 m
Node submode m
UINT4 l
Node mode l