Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALSimulation 6.2.0.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALSimSphHarmSeries.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2013 Evan 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#include <lal/LALSimSphHarmSeries.h>
21#include <lal/LALStdlib.h>
22#include <lal/Sequence.h>
23#include <lal/TimeSeries.h>
24#include <lal/FrequencySeries.h>
25#include <lal/TimeFreqFFT.h>
26#include <lal/Units.h>
27#include <lal/SphericalHarmonics.h>
28
29#ifdef __GNUC__
30#define UNUSED __attribute__ ((unused))
31#else
32#define UNUSED
33#endif
34
35/**
36 * @addtogroup LALSimSphHarmSeries_h
37 * @{
38 */
39
40/**
41 * @name SphHarmTimeSeries Routines
42 * @{
43 */
44
45/**
46 * Prepend a node to a linked list of SphHarmTimeSeries, or create a new head
47 */
49 SphHarmTimeSeries *appended, /**< Linked list to be prepended */
50 const COMPLEX16TimeSeries* inmode, /**< Time series of h_lm mode being prepended */
51 UINT4 l, /**< l index of h_lm mode being prepended */
52 INT4 m /**< m index of h_lm mode being prepended */
53 )
54{
56
57 // Check if the node with this l, m already exists
58 ts = appended;
59 while( ts ){
60 if( l == ts->l && m == ts->m ){
61 break;
62 }
63 ts = ts->next;
64 }
65
66 if( ts ){
68 ts->mode = XLALCutCOMPLEX16TimeSeries( inmode, 0, inmode->data->length);
69 return appended;
70 } else {
71 ts = XLALMalloc( sizeof(SphHarmTimeSeries) );
72 }
73
74 ts->l = l;
75 ts->m = m;
76 // Cut returns a new series using a slice of the original. I ask it to
77 // return a new one for the full data length --- essentially a duplication
78 if( inmode ){
79 ts->mode = XLALCutCOMPLEX16TimeSeries( inmode, 0, inmode->data->length);
80 } else {
81 ts->mode = NULL;
82 }
83
84 if( appended ){
85 ts->next = appended;
86 ts->tdata = appended->tdata;
87 } else {
88 ts->next = NULL;
89 ts->tdata = NULL;
90 }
91
92 return ts;
93}
94
95/**
96 * Set the tdata member for *all* nodes in the list.
97 */
99 SphHarmTimeSeries *ts, /**< Linked list to be prepended */
100 REAL8Sequence* tdata /**< series of time data*/
101 )
102{
103 while( ts ){
104 ts->tdata = tdata;
105 ts = ts->next;
106 }
107}
108
109/**
110 * Get the tdata member for nodes in the list.
111 */
113 SphHarmTimeSeries *ts /**< Get tdata from this list */
114 )
115{
116 if( ts ){
117 return ts->tdata;
118 }
119 return NULL;
120}
121
122/** Delete list from current pointer to the end of the list */
124 SphHarmTimeSeries* ts /**< Head of linked list to destroy */
125 )
126{
128 while( (pop = ts) ){
129 if( pop->mode ){
131 }
132 // The tdata pointer is shared so we delete on the last node
133 if( pop->next == NULL && pop->tdata ){
135 }
136 ts = pop->next;
137 XLALFree( pop );
138 }
139}
140
141/**
142 * Get the time series of a waveform's (l,m) spherical harmonic mode from a
143 * SphHarmTimeSeries linked list. Returns a pointer to its COMPLEX16TimeSeries
144 */
146 SphHarmTimeSeries *ts, /**< linked list to extract mode from */
147 UINT4 l, /**< l index of h_lm mode to get */
148 INT4 m /**< m index of h_lm mode to get */
149 )
150{
151 if( !ts ) return NULL;
152
153 SphHarmTimeSeries *itr = ts;
154 while( itr->l != l || itr->m != m ){
155 itr = itr->next;
156 if( !itr ) return NULL;
157 }
158 return itr->mode;
159}
160
161/**
162 * Get the largest l index of any mode in the SphHarmTimeSeries linked list
163 */
165 SphHarmTimeSeries *itr = ts;
166 UINT4 maxl=0;
167
168 while( itr ){
169 maxl = itr->l > maxl ? itr->l : maxl;
170 itr = itr ->next;
171 }
172 return maxl;
173}
174
175/**
176 * Get the smallest l index of any mode in the SphHarmTimeSeries linked list
177 */
179 SphHarmTimeSeries *itr = ts;
180 UINT4 minl=INT_MAX;
181
182 while( itr ){
183 minl = itr->l < minl ? itr->l : minl;
184 itr = itr ->next;
185 }
186 return minl;
187}
188
189/**
190 * For every (l,m) node in the SphHarmTimeSeries linked list,
191 * call XLALResizeCOMPLEX16TimeSeries(ts->mode, first, length)
192 *
193 * The TimeSeries of each (l,m) mode will have the given length,
194 * and its contents will consist of that part of the original time series
195 * that started at sample first. If first is negative, then the new time
196 * series is padded at the start by that many samples. The time series' epoch
197 * is adjusted appropriately.
198 */
200 SphHarmTimeSeries *ts, /**< SphHarmTimeSeries to be resized */
201 int first, /**< index of first time sample to be copied over */
202 size_t length /**< length to resize all COMPLEX16TimeSeries to */
203 )
204{
205 SphHarmTimeSeries *this = ts;
206 while( this ) {
207 this->mode = XLALResizeCOMPLEX16TimeSeries(this->mode, first, length);
208 this = this->next;
209 }
210
211 return ts;
212}
213
218 )
219{
220 UINT4 l, Lmax, length,i;
221 int m;
223 COMPLEX16FrequencySeries *hf,*hfBuffer;
224 SphHarmTimeSeries *rhoTlm = NULL;
225 REAL8 deltaF;
226 COMPLEX16 wt;
227 if( !hlms ) // Check head of linked list is valid
229
231 length = hlms->mode->data->length; // N.B. Assuming all hlms same length
232 deltaF = hlms->mode->deltaF;
233 COMPLEX16FFTPlan *revplan = XLALCreateReverseCOMPLEX16FFTPlan(length, 0);
234 // Output working buffer : should be copied
235 rhoT = XLALCreateCOMPLEX16TimeSeries( "rhoTD", &hlms->mode->epoch,
236 0., deltaF, &lalDimensionlessUnit, length);
237 hfBuffer = XLALCreateCOMPLEX16FrequencySeries( "FD Mode", &hlms->mode->epoch,
238 0., deltaF, &lalHertzUnit, length);
239 // Loop over TD modes, FFT, add to SphHarmFrequencySeries
240 for(l = 2; l <= Lmax; l++) {
241 for(m = -l; m <= (int) l; m++) {
243 if( hf ) {
244 hfBuffer->epoch = hf->epoch;
245 hfBuffer->deltaF = hf->deltaF;
246 for (i =0; i<length; i++) {
247 if (psd->data->data[i]) {
248 wt = 1./psd->data->data[i];
249 } else {
250 wt = 0;
251 }
252 hfBuffer->data->data[i] = conj(hf->data->data[i])* data->data->data[i]*wt;
253 }
254 XLALCOMPLEX16FreqTimeFFT(rhoT, hfBuffer, revplan);
255 rhoTlm = XLALSphHarmTimeSeriesAddMode(rhoTlm, rhoT, l, m);
256 }
257 }
258 }
259 return rhoTlm;
260}
261
262
263/** @} */
264
265/**
266 * @name SphHarmPolarTimeSeries Routines
267 * @{
268 */
269
270 /**
271 * Prepend a node to a linked list of SphHarmPolarTimeSeries, or create a new head
272 */
274 SphHarmPolarTimeSeries *appended, /**< Linked list to be prepended */
275 const REAL8TimeSeries* inAmpl, /**< Time series of |h_lm| mode amplitude being prepended */
276 const REAL8TimeSeries* inphase, /**< Time series of phi_lm mode phase being prepended */
277 UINT4 l, /**< l index of h_lm mode being prepended */
278 INT4 m /**< m index of h_lm mode being prepended */
279)
280{
282
283 // Check if the node with this l, m already exists
284 ts = appended;
285 while( ts ){
286 if( l == ts->l && m == ts->m ){
287 break;
288 }
289 ts = ts->next;
290 }
291
292 if( ts ){
295 ts->ampl = XLALCutREAL8TimeSeries( inAmpl, 0, inAmpl->data->length);
296 ts->phase = XLALCutREAL8TimeSeries( inphase, 0, inphase->data->length);
297 return appended;
298 } else {
300 }
301
302 ts->l = l;
303 ts->m = m;
304 // Cut returns a new series using a slice of the original. I ask it to
305 // return a new one for the full data length --- essentially a duplication
306 if( inAmpl ){
307 ts->ampl = XLALCutREAL8TimeSeries( inAmpl, 0, inAmpl->data->length);
308 } else {
309 ts->ampl = NULL;
310 }
311
312 if( inphase ){
313 ts->phase = XLALCutREAL8TimeSeries( inphase, 0, inphase->data->length);
314 XLAL_CHECK_NULL( (inAmpl) && (inphase->data->length == inAmpl->data->length), XLAL_EBADLEN, "Both mode amplitude and phase need to be defined with the same length or NULL.\n");
315 } else {
316 ts->phase = NULL;
317 XLAL_CHECK_NULL(!inAmpl, XLAL_EFUNC, "Both mode amplitude and phase need to be defined with the same length or NULL.\n");
318 }
319
320
321 if( appended ){
322 ts->next = appended;
323 ts->tdata = appended->tdata;
324 } else {
325 ts->next = NULL;
326 ts->tdata = NULL;
327 }
328
329 return ts;
330}
331
332/**
333 * Set the tdata member for *all* nodes in the list.
334 */
336 SphHarmPolarTimeSeries *ts, /**< Linked list to be prepended */
337 REAL8Sequence* tdata /**< series of time data*/
338)
339{
340 while( ts ){
341 ts->tdata = tdata;
342 ts = ts->next;
343 }
344}
345
346
347/**
348 * Get the tdata member for nodes in the list.
349 */
351 SphHarmPolarTimeSeries *ts /**< Get tdata from this list */
352)
353{
354 if( ts ){
355 return ts->tdata;
356 }
357 return NULL;
358}
359
360/** Delete list from current pointer to the end of the list */
362 SphHarmPolarTimeSeries* ts /**< Head of linked list to destroy */
363)
364{
366 while( (pop = ts) ){
367 if( pop->ampl ){
369 }
370 if( pop->phase ){
372 }
373 // The tdata pointer is shared so we delete on the last node
374 if( pop->next == NULL && pop->tdata ){
376 }
377 ts = pop->next;
378 XLALFree( pop );
379 }
380}
381
382/**
383 * Get the time series of a waveform's (l,m) spherical harmonic mode amplitude from a
384 * SphHarmPolarTimeSeries linked list. Returns a pointer to its REAL8TimeSeries
385 */
387 SphHarmPolarTimeSeries *ts, /**< linked list to extract mode from */
388 UINT4 l, /**< l index of h_lm mode to get */
389 INT4 m /**< m index of h_lm mode to get */
390)
391{
392 if( !ts ) return NULL;
393
395 while( itr->l != l || itr->m != m ){
396 itr = itr->next;
397 if( !itr ) return NULL;
398 }
399 return itr->ampl;
400}
401
402/**
403 * Get the time series of a waveform's (l,m) spherical harmonic mode phase from a
404 * SphHarmPolarTimeSeries linked list. Returns a pointer to its REAL8TimeSeries
405 */
407 SphHarmPolarTimeSeries *ts, /**< linked list to extract mode from */
408 UINT4 l, /**< l index of h_lm mode to get */
409 INT4 m /**< m index of h_lm mode to get */
410)
411{
412 if( !ts ) return NULL;
413
415 while( itr->l != l || itr->m != m ){
416 itr = itr->next;
417 if( !itr ) return NULL;
418 }
419 return itr->phase;
420}
421
422
423/**
424 * Get the largest l index of any mode in the SphHarmTimeSeries linked list
425 */
428 UINT4 maxl=0;
429
430 while( itr ){
431 maxl = itr->l > maxl ? itr->l : maxl;
432 itr = itr ->next;
433 }
434 return maxl;
435}
436
437/**
438 * For every (l,m) node in the SphHarmPolarTimeSeries linked list,
439 * call XLALResizeREAL8TimeSeries(ts->ampl, first, length)
440 * and XLALResizeREAL8TimeSeries(ts->phase, first, length)
441 *
442 * The TimeSeries of each (l,m) mode will have the given length,
443 * and its contents will consist of that part of the original time series
444 * that started at sample first. If first is negative, then the new time
445 * series is padded at the start by that many samples. The time series' epoch
446 * is adjusted appropriately.
447 */
449 SphHarmPolarTimeSeries *ts, /**< SphHarmTimeSeries to be resized */
450 int first, /**< index of first time sample to be copied over */
451 size_t length /**< length to resize all COMPLEX16TimeSeries to */
452)
453{
455 while( this ) {
456 this->ampl = XLALResizeREAL8TimeSeries(this->ampl, first, length);
457 this->phase = XLALResizeREAL8TimeSeries(this->phase, first, length);
458 this = this->next;
459 }
460
461 return ts;
462}
463
464
465/**
466 * Create a new SphHarmPolarTimeSeries linked listby extracting a
467 * section of an existing SphHarmPolarTimeSeries linked list.
468 * For every (l,m) node in the SphHarmPolarTimeSeries linked list,
469 * call XLALCutREAL8TimeSeries(ts->ampl, first, length)
470 * and XLALCutREAL8TimeSeries(ts->phase, first, length)
471 *
472 * The TimeSeries of each (l,m) mode will have the given length,
473 * and its contents will consist of that part of the original time series
474 * that started at sample first. If first is negative, then the new time
475 * series is padded at the start by that many samples. The time series' epoch
476 * is adjusted appropriately.
477 */
479 SphHarmPolarTimeSeries *ts, /**< new SphHarmTimeSeries to be filled in */
480 int first, /**< index of first time sample to be copied over */
481 size_t length /**< length to cut all COMPLEX16TimeSeries to */
482)
483{
485 SphHarmPolarTimeSeries *head=NULL, *tail=NULL, *new=NULL;
486
487 REAL8Sequence *tcut;
488
489 while( this ) {
490 new = XLALSphHarmPolarTimeSeriesAddMode(NULL, NULL, NULL, this->l, this->m);
491 if (head) {
492 head->next = new;
493 } else {
494 tail = new;
495 }
496 head = new;
497 head->ampl = XLALCutREAL8TimeSeries(this->ampl, first, length);
498 head->phase = XLALCutREAL8TimeSeries(this->phase, first, length);
499 this = this->next;
500 }
501
502 if (ts->tdata) {
503 tcut = XLALCutREAL8Sequence(ts->tdata, first, length);
505 }
506 else {
507 tail->tdata=NULL;
508 }
509
510 head = NULL;
511 new = NULL;
512 tcut = NULL;
513 LALFree(head);
514 LALFree(new);
515 LALFree(tcut);
516 LALFree(this);
517
518 return tail;
519
520}
521
522
523/** @} */
524
525
526
527
528/**
529 * @name SphHarmFrequencySeries Routines
530 * @{
531 */
532
533/**
534 * Create a SphHarmFrequencySeries from a SphHarmTimeSeries
535 * by performing an FFT on each mode in the SphHarmTimeSeries.
536 */
538 SphHarmTimeSeries *hlms_TD /**< SphHarmTimeSeries to be FFT'd */
539 )
540{
541 UINT4 l, Lmax, length;
542 int m;
545 SphHarmFrequencySeries *hlms_FD = NULL;
546 REAL8 deltaF;
547 if( !hlms_TD ) // Check head of linked list is valid
549
550 Lmax = XLALSphHarmTimeSeriesGetMaxL(hlms_TD);
551 length = hlms_TD->mode->data->length; // N.B. Assuming all hlms same length
552 deltaF = 1./hlms_TD->mode->deltaT/length;
553 COMPLEX16FFTPlan *fwdplan = XLALCreateForwardCOMPLEX16FFTPlan(length, 0);
554 hf = XLALCreateCOMPLEX16FrequencySeries( "FD Mode", &hlms_TD->mode->epoch,
555 0., deltaF, &lalHertzUnit, length);
556 // Loop over TD modes, FFT, add to SphHarmFrequencySeries
557 for(l = 2; l <= Lmax; l++) {
558 for(m = -l; m <= (int) l; m++) {
559 ht = XLALSphHarmTimeSeriesGetMode(hlms_TD, l, m);
560 if( ht ) {
561 XLALCOMPLEX16TimeFreqFFT(hf, ht, fwdplan);
562 hlms_FD = XLALSphHarmFrequencySeriesAddMode(hlms_FD, hf, l, m);
563 }
564 }
565 }
568
569 return hlms_FD;
570
571}
572
573
574/**
575 * Prepend a node to a linked list of SphHarmFrequencySeries, or create a new head
576 */
578 SphHarmFrequencySeries *appended, /**< Linked list to be prepended */
579 const COMPLEX16FrequencySeries* inmode, /**< Time series of h_lm mode being prepended */
580 UINT4 l, /**< l index of h_lm mode being prepended */
581 INT4 m /**< m index of h_lm mode being prepended */
582 )
583{
585
586 // Check if the node with this l, m already exists
587 ts = appended;
588 while( ts ){
589 if( l == ts->l && m == ts->m ){
590 break;
591 }
592 ts = ts->next;
593 }
594
595 if( ts ){
597 ts->mode = XLALCutCOMPLEX16FrequencySeries( inmode, 0, inmode->data->length);
598 return appended;
599 } else {
601 }
602
603 ts->l = l;
604 ts->m = m;
605 // Cut returns a new series using a slice of the original. I ask it to
606 // return a new one for the full data length --- essentially a duplication
607 if( inmode ){
608 ts->mode = XLALCutCOMPLEX16FrequencySeries( inmode, 0, inmode->data->length);
609 } else {
610 ts->mode = NULL;
611 }
612
613 if( appended ){
614 ts->next = appended;
615 ts->fdata = appended->fdata;
616 } else {
617 ts->next = NULL;
618 ts->fdata = NULL;
619 }
620
621 return ts;
622}
623
624/**
625 * Set the tdata member for *all* nodes in the list.
626 */
628 SphHarmFrequencySeries *ts, /**< Linked list to be prepended */
629 REAL8Sequence* fdata /**< series of frequency data*/
630 )
631{
632 while( ts ){
633 ts->fdata = fdata;
634 ts = ts->next;
635 }
636}
637
638/**
639 * Get the fdata member.
640 */
642 SphHarmFrequencySeries *ts /**< Get tdata from this list */
643 )
644{
645 if( ts ){
646 return ts->fdata;
647 }
648 return NULL;
649}
650
651/** Delete list from current pointer to the end of the list */
653 SphHarmFrequencySeries* ts /**< Head of linked list to destroy */
654 )
655{
657 while( (pop = ts) ){
658 if( pop->mode ){
660 }
661 // The fdata pointer is shared so we delete on the last node
662 if( pop->next == NULL && pop->fdata ){
664 }
665 ts = pop->next;
666 XLALFree( pop );
667 }
668}
669
670/**
671 * Get the time series of a waveform's (l,m) spherical harmonic mode from a
672 * SphHarmFrequencySeries linked list. Returns a pointer to its COMPLEX16FrequencySeries
673 */
675 SphHarmFrequencySeries *ts, /**< linked list to extract mode from */
676 UINT4 l, /**< l index of h_lm mode to get */
677 INT4 m /**< m index of h_lm mode to get */
678 )
679{
680 if( !ts ) return NULL;
681
683 while( itr->l != l || itr->m != m ){
684 itr = itr->next;
685 if( !itr ) return NULL;
686 }
687 return itr->mode;
688}
689
690/**
691 * Get the largest l index of any mode in the SphHarmFrequencySeries linked list
692 */
695 UINT4 maxl=0;
696
697 while( itr ){
698 maxl = itr->l > maxl ? itr->l : maxl;
699 itr = itr ->next;
700 }
701 return maxl;
702}
703
704/** @} */
705/** @} */
#define LALFree(p)
int l
Definition: bh_qnmode.c:135
double i
Definition: bh_ringdown.c:118
sigmaKerr data[0]
COMPLEX16FFTPlan * XLALCreateReverseCOMPLEX16FFTPlan(UINT4 size, int measurelvl)
COMPLEX16FFTPlan * XLALCreateForwardCOMPLEX16FFTPlan(UINT4 size, int measurelvl)
void XLALDestroyCOMPLEX16FFTPlan(COMPLEX16FFTPlan *plan)
COMPLEX16FrequencySeries * XLALCreateCOMPLEX16FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
COMPLEX16FrequencySeries * XLALCutCOMPLEX16FrequencySeries(const COMPLEX16FrequencySeries *series, size_t first, size_t length)
void XLALDestroyCOMPLEX16FrequencySeries(COMPLEX16FrequencySeries *series)
double complex COMPLEX16
double REAL8
uint32_t UINT4
int32_t INT4
void * XLALMalloc(size_t n)
void XLALFree(void *p)
REAL8Sequence * XLALSphHarmPolarTimeSeriesGetTData(SphHarmPolarTimeSeries *ts)
Get the tdata member for nodes in the list.
SphHarmTimeSeries * XLALResizeSphHarmTimeSeries(SphHarmTimeSeries *ts, int first, size_t length)
For every (l,m) node in the SphHarmTimeSeries linked list, call XLALResizeCOMPLEX16TimeSeries(ts->mod...
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...
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...
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.
SphHarmPolarTimeSeries * XLALResizeSphHarmPolarTimeSeries(SphHarmPolarTimeSeries *ts, int first, size_t length)
For every (l,m) node in the SphHarmPolarTimeSeries linked list, call XLALResizeREAL8TimeSeries(ts->am...
SphHarmTimeSeries * XLALSphHarmTimeSeriesFromSphHarmFrequencySeriesDataAndPSD(SphHarmFrequencySeries *hlms, COMPLEX16FrequencySeries *data, COMPLEX16FrequencySeries *psd)
void XLALSphHarmTimeSeriesSetTData(SphHarmTimeSeries *ts, REAL8Sequence *tdata)
Set the tdata member for all nodes in the list.
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.
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.
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.
REAL8Sequence * XLALSphHarmTimeSeriesGetTData(SphHarmTimeSeries *ts)
Get the tdata member for 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...
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...
SphHarmPolarTimeSeries * XLALCutSphHarmPolarTimeSeries(SphHarmPolarTimeSeries *ts, int first, size_t length)
Create a new SphHarmPolarTimeSeries linked listby extracting a section of an existing SphHarmPolarTim...
SphHarmFrequencySeries * XLALSphHarmFrequencySeriesFromSphHarmTimeSeries(SphHarmTimeSeries *hlms_TD)
Create a SphHarmFrequencySeries from a SphHarmTimeSeries by performing an FFT on each mode in the Sph...
void XLALSphHarmPolarTimeSeriesSetTData(SphHarmPolarTimeSeries *ts, REAL8Sequence *tdata)
Set the tdata member for all nodes in the list.
REAL8Sequence * XLALSphHarmFrequencySeriesGetFData(SphHarmFrequencySeries *ts)
Get the fdata member.
void XLALSphHarmFrequencySeriesSetFData(SphHarmFrequencySeries *ts, REAL8Sequence *fdata)
Set the tdata member for all nodes in the list.
static const INT4 m
void XLALDestroyREAL8Sequence(REAL8Sequence *sequence)
REAL8Sequence * XLALCutREAL8Sequence(REAL8Sequence *sequence, size_t first, size_t length)
int XLALCOMPLEX16FreqTimeFFT(COMPLEX16TimeSeries *tser, const COMPLEX16FrequencySeries *freq, const COMPLEX16FFTPlan *plan)
int XLALCOMPLEX16TimeFreqFFT(COMPLEX16FrequencySeries *freq, const COMPLEX16TimeSeries *tser, const COMPLEX16FFTPlan *plan)
void XLALDestroyCOMPLEX16TimeSeries(COMPLEX16TimeSeries *series)
COMPLEX16TimeSeries * XLALCreateCOMPLEX16TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
REAL8TimeSeries * XLALResizeREAL8TimeSeries(REAL8TimeSeries *series, int first, size_t length)
COMPLEX16TimeSeries * XLALCutCOMPLEX16TimeSeries(const COMPLEX16TimeSeries *series, size_t first, size_t length)
REAL8TimeSeries * XLALCutREAL8TimeSeries(const REAL8TimeSeries *series, size_t first, size_t length)
COMPLEX16TimeSeries * XLALResizeCOMPLEX16TimeSeries(COMPLEX16TimeSeries *series, int first, size_t length)
const LALUnit lalHertzUnit
const LALUnit lalDimensionlessUnit
#define XLAL_ERROR_NULL(...)
#define XLAL_CHECK_NULL(assertion,...)
XLAL_EBADLEN
XLAL_EFUNC
XLAL_EINVAL
COMPLEX16Sequence * data
COMPLEX16Sequence * data
COMPLEX16 * data
REAL8Sequence * data
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