23 #include <lal/AVFactories.h>
24 #include <lal/Calibration.h>
25 #include <lal/LALConstants.h>
26 #include <lal/TimeFreqFFT.h>
27 #include <lal/Units.h>
28 #include <lal/VectorOps.h>
29 #include <lal/Window.h>
30 #include <lal/FrequencySeries.h>
63 REAL4FFTPlan *fwdPlan=NULL, *invPlan=NULL;
65 UINT4 inTimeLength = 0;
66 UINT4 paddedTimeLength = 0;
67 const LALUnit countPerStrain = {0,{0,0,0,0,0,-1,1},{0,0,0,0,0,0,0}};
68 const CHAR *chname =
"Temporary Transfer";
70 if ( ! strain || ! transfer )
72 if ( ! strain->
data || ! transfer->
data )
78 paddedTimeLength = 2 * inTimeLength;
97 memset( tmpWave->
data, 0, paddedTimeLength *
sizeof(
REAL4) );
98 for( k=0; k < inTimeLength; k++ )
108 &strain->
epoch, 0.0, 1.0/(paddedTimeLength * strain->
deltaT),
109 &countPerStrain, tmpFFTWave->
length);
120 tmpFFTWave->
data[0] = 0.0;
121 tmpFFTWave->
data[inTimeLength] = crealf(tmpFFTWave->
data[inTimeLength]);
123 memset( tmpWave->
data, 0, 2*inTimeLength*
sizeof(
REAL4) );
126 for( k=0; k < inTimeLength ; k++)
128 strain->
data->
data[k] = tmpWave->
data[k] / (2 * inTimeLength);
157 if ( ! strain || ! transfer )
159 if ( ! strain->
data || ! transfer->
data )
161 if ( strain->
deltaT <= 0.0 )
INT4 XLALResponseConvert(COMPLEX8FrequencySeries *output, COMPLEX8FrequencySeries *input)
UNDOCUMENTED.
REAL4TimeSeries * XLALRespFilt(REAL4TimeSeries *strain, COMPLEX8FrequencySeries *transfer)
Apply transfer function to time series.
REAL4TimeSeries * XLALREAL4Convolution(REAL4TimeSeries *strain, REAL4TimeSeries *transfer)
SHOULD Convolve two time series, but doesn't.
COMPLEX8FrequencySeries * XLALCreateCOMPLEX8FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
void XLALDestroyCOMPLEX8FrequencySeries(COMPLEX8FrequencySeries *series)
char CHAR
One-byte signed integer, see Headers LAL(Atomic)Datatypes.h for more details.
uint32_t UINT4
Four-byte unsigned integer.
float REAL4
Single precision real floating-point number (4 bytes).
REAL4FFTPlan * XLALCreateReverseREAL4FFTPlan(UINT4 size, int measurelvl)
Returns a new REAL4FFTPlan for a reverse transform.
REAL4FFTPlan * XLALCreateForwardREAL4FFTPlan(UINT4 size, int measurelvl)
Returns a new REAL4FFTPlan for a forward transform.
void XLALDestroyREAL4FFTPlan(REAL4FFTPlan *plan)
Destroys a REAL4FFTPlan.
int XLALREAL4ReverseFFT(REAL4Vector *output, const COMPLEX8Vector *input, const REAL4FFTPlan *plan)
Performs a reverse FFT of REAL4 data.
int XLALREAL4ForwardFFT(COMPLEX8Vector *output, const REAL4Vector *input, const REAL4FFTPlan *plan)
Performs a forward FFT of REAL4 data.
LALUnit * XLALUnitMultiply(LALUnit *output, const LALUnit *unit1, const LALUnit *unit2)
This function multiplies together the LALUnit structures *(input->unitOne) and *(input->unitTwo),...
void XLALDestroyREAL4Vector(REAL4Vector *vector)
REAL4Vector * XLALCreateREAL4Vector(UINT4 length)
COMPLEX8Vector * XLALCreateCOMPLEX8Vector(UINT4 length)
void XLALDestroyCOMPLEX8Vector(COMPLEX8Vector *vector)
COMPLEX8Vector * XLALCCVectorMultiply(COMPLEX8Vector *out, const COMPLEX8Vector *in1, const COMPLEX8Vector *in2)
#define XLAL_ERROR_NULL(...)
Macro to invoke a failure from a XLAL routine returning a pointer.
@ XLAL_EBADLEN
Inconsistent or invalid length.
@ XLAL_EFAULT
Invalid pointer.
@ XLAL_EFUNC
Internal function call failed bit: "or" this with existing error number.
@ XLAL_EINVAL
Invalid argument.
See DATATYPE-FrequencySeries types for documentation.
Vector of type COMPLEX8, see DATATYPE-Vector types for more details.
UINT4 length
Number of elements in array.
COMPLEX8 * data
Pointer to the data array.
This structure stores units in the mksA system (plus Kelvin, Strain, and ADC Count).
Time series of REAL4 data, see DATATYPE-TimeSeries types for more details.
REAL4Sequence * data
The sequence of sampled data.
LALUnit sampleUnits
The physical units of the quantity being sampled.
REAL8 deltaT
The time step between samples of the time series in seconds.
LIGOTimeGPS epoch
The start time of the time series.
Vector of type REAL4, see DATATYPE-Vector types for more details.
REAL4 * data
Pointer to the data array.
UINT4 length
Number of elements in array.