00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _TFTRANSFORM_H
00023 #define _TFTRANSFORM_H
00024
00025
00026 #include <gsl/gsl_matrix.h>
00027
00028
00029 #include <lal/LALDatatypes.h>
00030 #include <lal/Window.h>
00031 #include <lal/RealFFT.h>
00032 #include <lal/LIGOMetadataTables.h>
00033 #include <lal/Sequence.h>
00034
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00040
00041 #include <lal/LALRCSID.h>
00042 NRCSID(TFTRANSFORMH, "$Id: TFTransform.h,v 1.76 2008/09/04 02:46:38 kipp Exp $");
00043
00044
00045
00046
00047
00048
00049
00050 typedef struct tagLALExcessPowerFilterBank {
00051 int n_filters;
00052 struct ExcessPowerFilter {
00053 COMPLEX16FrequencySeries *fseries;
00054
00055
00056 REAL8 unwhitened_rms;
00057 } *basis_filters;
00058
00059
00060
00061
00062 REAL8Sequence *twice_channel_overlap;
00063
00064
00065 REAL8Sequence *unwhitened_cross;
00066 } LALExcessPowerFilterBank;
00067
00068
00069 LALExcessPowerFilterBank *XLALCreateExcessPowerFilterBank(
00070 double filter_deltaF,
00071 double flow,
00072 double channel_bandwidth,
00073 int n_channels,
00074 const REAL8FrequencySeries *psd,
00075 const REAL8Sequence *two_point_spectral_correlation
00076 );
00077
00078
00079 void XLALDestroyExcessPowerFilterBank(
00080 LALExcessPowerFilterBank *bank
00081 );
00082
00083
00084
00085
00086
00087
00088
00089 typedef struct tagREAL8TimeFrequencyPlane {
00090
00091 CHAR name[LALNameLength];
00092
00093 LIGOTimeGPS epoch;
00094
00095 REAL8 deltaT;
00096
00097 REAL8 fseries_deltaF;
00098
00099 REAL8 deltaF;
00100
00101 REAL8 flow;
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 gsl_matrix *channel_data;
00112
00113 REAL8Sequence *channel_buffer;
00114 REAL8Sequence *unwhitened_channel_buffer;
00115
00116 struct TFTiling {
00117 unsigned max_length;
00118 unsigned min_channels;
00119 unsigned max_channels;
00120 unsigned tiling_start;
00121 unsigned tiling_end;
00122 unsigned inv_fractional_stride;
00123 double dof_per_pixel;
00124 } tiles;
00125
00126
00127 REAL8Window *window;
00128
00129
00130 INT4 window_shift;
00131
00132
00133 REAL8Sequence *two_point_spectral_correlation;
00134 } REAL8TimeFrequencyPlane;
00135
00136
00137 REAL8TimeFrequencyPlane *XLALCreateTFPlane(
00138 UINT4 tseries_length,
00139 REAL8 tseries_deltaT,
00140 REAL8 flow,
00141 REAL8 bandwidth,
00142 REAL8 tiling_fractional_stride,
00143 REAL8 tiling_max_bandwidth,
00144 REAL8 tiling_max_duration
00145 );
00146
00147
00148 void XLALDestroyTFPlane(
00149 REAL8TimeFrequencyPlane *plane
00150 );
00151
00152
00153 int XLALFreqSeriesToTFPlane(
00154 REAL8TimeFrequencyPlane *tfplane,
00155 const LALExcessPowerFilterBank *filter_bank,
00156 const COMPLEX16FrequencySeries *fseries,
00157 const REAL8FFTPlan *reverseplan
00158 );
00159
00160
00161 SnglBurst *XLALComputeExcessPower(
00162 const REAL8TimeFrequencyPlane *plane,
00163 const LALExcessPowerFilterBank *filter_bank,
00164 SnglBurst *head,
00165 double confidence_threshold
00166 );
00167
00168
00169 INT4 XLALOverlappedSegmentsCommensurate(
00170 INT4 target_length,
00171 INT4 segment_length,
00172 INT4 segment_shift
00173 );
00174
00175
00176 INT4 XLALEPGetTimingParameters(
00177 INT4 window_length,
00178 INT4 max_tile_length,
00179 REAL8 fractional_tile_stride,
00180 INT4 *psd_length,
00181 INT4 *psd_shift,
00182 INT4 *window_shift,
00183 INT4 *window_pad,
00184 INT4 *tiling_length
00185 );
00186
00187
00188 #ifdef __cplusplus
00189 }
00190 #endif
00191 #endif