30#include <lal/ComplexFFT.h>
31#include <lal/LALDatatypes.h>
32#include <lal/LALgetopt.h>
33#include <lal/LIGOMetadataTables.h>
34#include <lal/RealFFT.h>
36#include <lal/LALStdlib.h>
37#include <lal/LALStdio.h>
38#include <lal/LIGOMetadataTables.h>
39#include <lal/LIGOMetadataUtils.h>
40#include <lal/LIGOMetadataInspiralUtils.h>
41#include <lal/LIGOMetadataRingdownUtils.h>
42#include <lal/AVFactories.h>
43#include <lal/SeqFactories.h>
45#include <lal/RealFFT.h>
46#include <lal/LALFrStream.h>
47#include <lal/LALInspiral.h>
48#include <lal/FindChirp.h>
49#include <lal/FindChirpPTF.h>
50#include <lal/LIGOLwXML.h>
51#include <lal/LIGOLwXMLRead.h>
52#include <lal/DetectorSite.h>
53#include <lal/TimeDelay.h>
54#include <lal/DetResponse.h>
55#include <lal/TimeSeries.h>
56#include <lal/PrintFTSeries.h>
57#include <lal/FindChirpPTF.h>
58#include <lal/RingUtils.h>
59#include <lal/SkyCoordinates.h>
60#include <lal/XLALError.h>
74#include <gsl/gsl_matrix.h>
75#include <gsl/gsl_vector.h>
76#include <gsl/gsl_linalg.h>
77#include <gsl/gsl_eigen.h>
78#include <gsl/gsl_blas.h>
80#define BUFFER_SIZE 256
81#define FILENAME_SIZE 256
85#define sanity_check( condition ) \
86 ( condition ? 0 : ( fputs( #condition " not satisfied\n", stderr ), error( "sanity check failed\n" ) ) )
90#define is_long_option(s) \
91 ( strlen(s) > 2 && (s)[0] == '-' && (s)[1] == '-' && isalpha( s[2] ) )
92#define is_short_option(s) \
93 ( strlen(s) > 1 && (s)[0] == '-' && isalpha( s[1] ) )
94#define is_option(s) ( is_long_option(s) || is_short_option(s) )
98#define UNUSED __attribute__ ((unused))
260typedef struct tagRingDataSegments
267typedef struct tagCohPTFSkyPositions
274typedef struct tagTimeSlideVectorList
323 COMPLEX8FFTPlan *invPlan,
326 REAL4 *frequencyRangesPlus[LAL_NUM_IFO+1],
327 REAL4 *frequencyRangesCross[LAL_NUM_IFO+1],
329 REAL4 **snglOverlapCont,
330 struct timeval startTime,
333 UINT4 **snglAcceptPoints,
334 UINT4 *snglAcceptCount,
335 UINT4 *acceptPointList
356 REAL4 rightAscension,
360 UINT4 *acceptPointList,
361 UINT4 numAcceptPoints,
435 REAL4FFTPlan *fwdplan,
436 REAL4FFTPlan *psdplan,
437 REAL4FFTPlan *revplan,
438 REAL4 **timeSlideVectors,
439 struct timeval startTime
444 const char *ifoChannel,
445 const char *dataCache,
457 REAL4FFTPlan *fwdplan,
458 REAL4FFTPlan *revplan,
459 REAL4FFTPlan *psdplan,
460 REAL4 *timeSlideVectors,
461 struct timeval startTime
474 REAL4FFTPlan *fwdplan,
475 REAL4FFTPlan *revplan,
476 REAL4FFTPlan *psdplan,
488 REAL4FFTPlan *fwdplan,
490 REAL4 *timeSlideVectors,
503 REAL4 *timeSlideVectors,
514 REAL4FFTPlan *fwdplan
567 UINT4 **snglAcceptPoints,
568 UINT4 *snglAcceptCount,
570 COMPLEX8FFTPlan *invPlan,
581 UINT4 *localAcceptPoints
595 INT4 *timeOffsetPoints,
599 gsl_matrix *eigenvecs,
600 gsl_vector *eigenvals,
606 UINT4 **snglAcceptPoints,
607 UINT4 *snglAcceptCount
614 INT4 *timeOffsetPoints,
618 UINT4 **snglAcceptPoints,
619 UINT4 *snglAcceptCount
638 COMPLEX8FFTPlan *invPlan,
645 gsl_matrix *eigenvecsNull,
646 gsl_vector *eigenvalsNull,
654 gsl_matrix *eigenvecsNull,
655 gsl_vector *eigenvalsNull,
666 gsl_matrix *eigenvecs,
667 gsl_vector *eigenvals,
670 INT4 *timeOffsetPoints,
687 struct timeval startTime
696 COMPLEX8FFTPlan *invplan,
698 struct timeval startTime
703 gsl_matrix **Bankeigenvecs,
704 gsl_vector **Bankeigenvals,
712 UINT4 csVecLengthTwo,
719 struct timeval startTime
735 COMPLEX8FFTPlan *invplan,
741 gsl_matrix **AutoeigenvecsP,
742 gsl_vector **AutoeigenvalsP,
749 UINT4 csVecLengthTwo,
755 gsl_matrix **AutoeigenvecsP,
756 gsl_vector **AutoeigenvalsP,
757 REAL4 **frequencyRangesPlus,
758 REAL4 **frequencyRangesCross,
759 REAL4 **powerBinsPlus,
760 REAL4 **powerBinsCross,
769 COMPLEX8FFTPlan *invPlan,
772 UINT4 csVecLengthTwo,
778 REAL4 **frequencyRangesPlus,
779 REAL4 **frequencyRangesCross,
780 REAL4 **powerBinsPlus,
781 REAL4 **powerBinsCross,
788 COMPLEX8FFTPlan *invPlan,
805 INT4 *timeOffsetPoints
810 gsl_matrix *eigenvecs,
811 gsl_vector *eigenvals,
812 REAL4 Fplus[LAL_NUM_IFO],
813 REAL4 Fpcross[LAL_NUM_IFO],
827 INT4 *timeOffsetPoints,
828 gsl_matrix *eigenvecs,
829 gsl_vector *eigenvals,
853 REAL4 rightAscension,
856 INT4 *timeOffsetPoints,
863 REAL4FFTPlan *fwdplan,
864 REAL4FFTPlan *psdplan,
865 REAL4FFTPlan *revplan,
866 COMPLEX8FFTPlan *invPlan,
879 REAL4 *slidTimeOffsets,
888 REAL4 *timeSlideVectors,
936 COMPLEX8FFTPlan *invPlan,
963 COMPLEX8FFTPlan *invBankPlan,
975 COMPLEX8FFTPlan *invBankPlan,
978 UINT4 timeStepPoints,
1001 REAL4 Fplus[LAL_NUM_IFO],
1002 REAL4 Fcross[LAL_NUM_IFO],
1010 INT4 timeOffsetPoints[LAL_NUM_IFO],
1011 gsl_matrix **Bankeigenvecs,
1012 gsl_vector **Bankeigenvals,
1021 REAL4 Fplus[LAL_NUM_IFO],
1022 REAL4 Fcross[LAL_NUM_IFO],
1028 INT4 timeOffsetPoints[LAL_NUM_IFO],
1029 gsl_matrix *Autoeigenvecs,
1030 gsl_vector *Autoeigenvals,
1049 REAL4 Fplus[LAL_NUM_IFO],
1050 REAL4 Fcross[LAL_NUM_IFO],
1051 gsl_matrix *eigenvecs,
1052 gsl_vector *eigenvals,
1053 gsl_matrix *Bankeigenvecs,
1054 gsl_vector *Bankeigenvals,
1064 REAL4 Fplus[LAL_NUM_IFO],
1065 REAL4 Fcross[LAL_NUM_IFO],
1066 REAL4 *frequencyRangesPlus,
1067 REAL4 *frequencyRangesCross,
1068 gsl_matrix *eigenvecs,
1078 REAL4 Fplus[LAL_NUM_IFO],
1079 REAL4 Fcross[LAL_NUM_IFO],
1080 REAL4 *frequencyRangesPlus,
1081 REAL4 *frequencyRangesCross,
1082 REAL4 *powerBinsPlus,
1083 REAL4 *powerBinsCross,
1084 REAL4 **overlapCont,
1085 gsl_matrix *eigenvecs,
1096 REAL4 Fplus[LAL_NUM_IFO],
1097 REAL4 Fcross[LAL_NUM_IFO],
1098 INT4 timeOffsetPoints[LAL_NUM_IFO],
1099 gsl_matrix *eigenvecs,
1100 gsl_vector *eigenvals,
1101 REAL4 *powerBinsPlus,
1102 REAL4 *powerBinsCross,
1186 REAL4 angularResolution,
1225 gsl_vector *product,
1226 const gsl_vector *u,
UINT4 coh_PTF_statistic(REAL4TimeSeries *cohSNR, REAL8Array *PTFM[LAL_NUM_IFO+1], COMPLEX8VectorSequence *PTFqVec[LAL_NUM_IFO+1], struct coh_PTF_params *params, UINT4 spinTemplate, REAL4 *timeOffsets, REAL4 *Fplus, REAL4 *Fcross, INT4 segmentNumber, REAL4TimeSeries *pValues[10], REAL4TimeSeries *gammaBeta[2], REAL4TimeSeries *snrComps[LAL_NUM_IFO], REAL4TimeSeries *nullSNR, REAL4TimeSeries *traceSNR, REAL4TimeSeries *bankVeto[LAL_NUM_IFO+1], REAL4TimeSeries *autoVeto[LAL_NUM_IFO+1], REAL4TimeSeries *chiSquare[LAL_NUM_IFO+1], UINT4 subBankSize, struct bankComplexTemplateOverlaps *bankOverlaps, struct bankTemplateOverlaps *bankNormOverlaps, struct bankDataOverlaps *dataOverlaps, struct bankComplexTemplateOverlaps *autoTempOverlaps, FindChirpTemplate *fcTmplt, REAL4FrequencySeries *invspec[LAL_NUM_IFO+1], RingDataSegments *segment[LAL_NUM_IFO+1], COMPLEX8FFTPlan *invPlan, struct bankDataOverlaps **chisqOverlapsP, struct bankDataOverlaps **chisqSnglOverlapsP, REAL4 *frequencyRangesPlus[LAL_NUM_IFO+1], REAL4 *frequencyRangesCross[LAL_NUM_IFO+1], REAL4 **overlapCont, REAL4 **snglOverlapCont, struct timeval startTime, UINT4 segStartPoint, UINT4 segEndPoint, UINT4 **snglAcceptPoints, UINT4 *snglAcceptCount, UINT4 *acceptPointList)
CohPTFSkyPositions * coh_PTF_read_grid_from_file(const char *fname, UINT4 raColumn, UINT4 decColumn)
void coh_PTF_initialize_time_series(struct coh_PTF_params *params, LIGOTimeGPS segStartTime, REAL8 fLower, REAL4TimeSeries **cohSNRP, REAL4TimeSeries **nullSNRP, REAL4TimeSeries **traceSNRP, REAL4TimeSeries **bankVeto, REAL4TimeSeries **autoVeto, REAL4TimeSeries **chiSquare, REAL4TimeSeries **snrComps, REAL4TimeSeries **pValues, REAL4TimeSeries **gammaBeta, UINT4 spinTemplates)
SnglInspiralTable * conv_insp_tmpl_to_sngl_table(InspiralTemplate *template, UINT4 eventNumber)
int coh_PTF_output_events_xml(char *outputFile, MultiInspiralTable *events, SnglInspiralTable *snglEvents, SimInspiralTable *injections, ProcessParamsTable *processParamsTable, TimeSlide *time_slide_head, TimeSlideSegmentMapTable *time_slide_map_head, SegmentTable *segment_table_head, struct coh_PTF_params *params)
void coh_PTF_chi_square_sngl_setup(struct coh_PTF_params *params, REAL4 **frequencyRangesPlus, REAL4 **frequencyRangesCross, REAL4 **powerBinsPlus, REAL4 **powerBinsCross, REAL4 **overlapCont, struct bankDataOverlaps **chisqSnglOverlapsP, FindChirpTemplate *fcTmplt, REAL4FrequencySeries **invspec, RingDataSegments **segments, REAL8Array **PTFM, COMPLEX8FFTPlan *invPlan, INT4 segmentNumber)
void coh_PTF_set_null_input_REAL4(REAL4 **array, UINT4 length)
REAL4FFTPlan * coh_PTF_get_fft_revplan(struct coh_PTF_params *params)
UINT4 coh_PTF_read_sub_bank(struct coh_PTF_params *params, InspiralTemplate **PTFBankTemplates)
void coh_PTF_calculate_bank_veto_template_filters(struct coh_PTF_params *params, FindChirpTemplate *bankFcTmplts, FindChirpTemplate *fcTmplt, REAL4FrequencySeries **invspec, struct bankComplexTemplateOverlaps *bankOverlaps)
void coh_PTF_create_time_slide_table(struct coh_PTF_params *params, INT8 *slideIDList, RingDataSegments **segments, TimeSlide **time_slide_headP, TimeSlideSegmentMapTable **time_slide_map_headP, SegmentTable **segment_table_headP, TimeSlideVectorList **longTimeSlideListP, TimeSlideVectorList **shortTimeSlideListP, REAL4 *timeSlideVectors, INT4 numSegments)
REAL4 coh_PTF_calculate_bank_veto(UINT4 numPoints, UINT4 position, UINT4 subBankSize, REAL4 Fplus[LAL_NUM_IFO], REAL4 Fcross[LAL_NUM_IFO], struct coh_PTF_params *params, struct bankCohTemplateOverlaps *cohBankOverlaps, struct bankComplexTemplateOverlaps *bankOverlaps, struct bankDataOverlaps *dataOverlaps, struct bankTemplateOverlaps *bankNormOverlaps, COMPLEX8VectorSequence *PTFqVec[LAL_NUM_IFO+1], REAL8Array *PTFM[LAL_NUM_IFO+1], INT4 timeOffsetPoints[LAL_NUM_IFO], gsl_matrix **Bankeigenvecs, gsl_vector **Bankeigenvals, UINT4 detectorNum, UINT4 vecLength, UINT4 vecLengthTwo)
void coh_PTF_rotate_SkyPosition(SkyPosition *skyPoint, gsl_matrix *matrix)
void coh_PTF_convert_time_offsets_to_points(struct coh_PTF_params *params, REAL4 *timeOffsets, INT4 *timeOffsetPoints)
void coh_PTF_rotate_skyPoints(CohPTFSkyPositions *skyPoints, gsl_vector *axis, REAL8 angle)
void coh_PTF_calculate_standard_chisq_power_bins(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt, REAL4FrequencySeries *invspec[LAL_NUM_IFO+1], REAL8Array *PTFM[LAL_NUM_IFO+1], REAL4 Fplus[LAL_NUM_IFO], REAL4 Fcross[LAL_NUM_IFO], REAL4 *frequencyRangesPlus, REAL4 *frequencyRangesCross, REAL4 *powerBinsPlus, REAL4 *powerBinsCross, REAL4 **overlapCont, gsl_matrix *eigenvecs, UINT4 detectorNum, UINT4 singlePolFlag)
void coh_PTF_setup_null_stream(struct coh_PTF_params *params, REAL4TimeSeries **channel, REAL4FrequencySeries **invspec, RingDataSegments **segments, REAL4 *Fplustrig, REAL4 *Fcrosstrig, REAL4 *timeOffsets, REAL4FFTPlan *fwdplan, REAL4FFTPlan *revplan, REAL4FFTPlan *psdplan, REAL4 *timeSlideVectors, struct timeval startTime)
void coh_PTF_calculate_single_detector_filters(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt, REAL4FrequencySeries **invspec, REAL8Array **PTFM, COMPLEX8VectorSequence **PTFqVec, REAL4TimeSeries **snrComps, UINT4 **snglAcceptPoints, UINT4 *snglAcceptCount, RingDataSegments **segments, COMPLEX8FFTPlan *invPlan, UINT4 spinTemplate, UINT4 segNum)
void normalise(gsl_vector *vec)
UINT4 coh_PTF_trig_time_check(struct coh_PTF_params *params, LIGOTimeGPS segStartTime, LIGOTimeGPS segEndTime)
int write_COMPLEX8FrequencySeries(COMPLEX8FrequencySeries *series)
void coh_PTF_calculate_null_stream_snr(struct coh_PTF_params *params, REAL4TimeSeries *nullSNR, COMPLEX8VectorSequence **PTFqVec, gsl_matrix *eigenvecsNull, gsl_vector *eigenvalsNull, UINT4 spinTemplate, UINT4 vecLength, UINT4 vecLoc, UINT4 snrLoc)
REAL4 coh_PTF_calculate_chi_square(struct coh_PTF_params *params, UINT4 position, struct bankDataOverlaps *chisqOverlaps, COMPLEX8VectorSequence *PTFqVec[LAL_NUM_IFO+1], REAL8Array *PTFM[LAL_NUM_IFO+1], REAL4 Fplus[LAL_NUM_IFO], REAL4 Fcross[LAL_NUM_IFO], INT4 timeOffsetPoints[LAL_NUM_IFO], gsl_matrix *eigenvecs, gsl_vector *eigenvals, REAL4 *powerBinsPlus, REAL4 *powerBinsCross, UINT4 detectorNum, UINT4 vecLength, UINT4 vecLengthTwo)
void coh_PTF_template_PTF(FindChirpTemplate *fcTmplt, InspiralTemplate *InspTmplt, FindChirpTmpltParams *params)
ProcessTable * coh_PTF_create_process_table(struct coh_PTF_params *params)
void coh_PTF_set_null_input_COMPLEX8VectorSequence(COMPLEX8VectorSequence **vecSeq, UINT4 length)
int coh_PTF_get_null_stream(struct coh_PTF_params *params, REAL4TimeSeries *channel[LAL_NUM_IFO+1], REAL4 *Fplus, REAL4 *Fcross, REAL4 *timeOffsets)
void coh_PTF_complex_template_overlaps(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt1, FindChirpTemplate *fcTmplt2, REAL4FrequencySeries *invspec, UINT4 spinBank, COMPLEX8Array *PTFM)
void coh_PTF_bank_veto_coh_setup(struct coh_PTF_params *params, gsl_matrix **Bankeigenvecs, gsl_vector **Bankeigenvals, struct bankCohTemplateOverlaps **bankCohOverlapsP, struct bankComplexTemplateOverlaps *bankOverlaps, REAL4 *Fplus, REAL4 *Fcross, REAL8Array **PTFM, struct bankTemplateOverlaps *bankNormOverlaps, UINT4 csVecLength, UINT4 csVecLengthTwo, UINT4 vecLength)
UINT4 coh_PTF_calculate_single_det_spin_snr(struct coh_PTF_params *params, REAL8Array **PTFM, COMPLEX8VectorSequence **PTFqVec, REAL4TimeSeries **snrComps, UINT4 ifoNumber, UINT4 *localAcceptPoints)
void coh_PTF_destroy_time_series(REAL4TimeSeries *cohSNR, REAL4TimeSeries *nullSNR, REAL4TimeSeries *traceSNR, REAL4TimeSeries **bankVeto, REAL4TimeSeries **autoVeto, REAL4TimeSeries **chiSquare, REAL4TimeSeries **pValues, REAL4TimeSeries **gammaBeta, REAL4TimeSeries **snrComps)
UINT8 coh_PTF_add_sngl_triggers(struct coh_PTF_params *params, SnglInspiralTable **eventList, SnglInspiralTable **thisEvent, REAL4TimeSeries *cohSNR, FindChirpTemplate *fcTmplt, InspiralTemplate PTFTemplate, UINT8 eventId, REAL4TimeSeries **pValues, REAL4TimeSeries **bankVeto, REAL4TimeSeries **autoVeto, REAL4TimeSeries **chiSquare, REAL8Array **PTFM, UINT4 startPoint, UINT4 endPoint)
void coh_PTF_auto_veto_coh_setup(struct coh_PTF_params *params, gsl_matrix **AutoeigenvecsP, gsl_vector **AutoeigenvalsP, struct bankCohTemplateOverlaps **autoCohOverlapsP, struct bankComplexTemplateOverlaps *autoTempOverlaps, REAL4 *Fplus, REAL4 *Fcross, REAL8Array **PTFM, UINT4 csVecLength, UINT4 csVecLengthTwo, UINT4 vecLength)
REAL4 coh_PTF_get_spin_SNR(REAL4 *v1p, REAL4 *v2p, UINT4 vecLengthTwo)
int coh_PTF_parse_options(struct coh_PTF_params *params, int argc, char **argv)
CohPTFSkyPositions * coh_PTF_two_det_sky_grid(struct coh_PTF_params *params)
void coh_PTF_calculate_rotated_vectors(struct coh_PTF_params *params, COMPLEX8VectorSequence **PTFqVec, REAL4 *u1, REAL4 *u2, REAL4 *Fplus, REAL4 *Fcross, INT4 *timeOffsetPoints, gsl_matrix *eigenvecs, gsl_vector *eigenvals, UINT4 numPoints, UINT4 position, UINT4 vecLength, UINT4 vecLengthTwo, UINT4 detectorNum)
void coh_PTF_bank_veto_segment_setup(struct coh_PTF_params *params, struct bankDataOverlaps *dataOverlaps, FindChirpTemplate *bankFcTmplts, RingDataSegments **segments, COMPLEX8VectorSequence **PTFqVec, COMPLEX8FFTPlan *invplan, INT4 segmentNum, struct timeval startTime)
void coh_PTF_calculate_coherent_bank_overlaps(struct coh_PTF_params *params, struct bankComplexTemplateOverlaps bankOverlaps, struct bankCohTemplateOverlaps cohBankOverlaps, REAL4 Fplus[LAL_NUM_IFO], REAL4 Fcross[LAL_NUM_IFO], gsl_matrix *eigenvecs, gsl_vector *eigenvals, gsl_matrix *Bankeigenvecs, gsl_vector *Bankeigenvals, UINT4 vecLength, UINT4 vecLengthTwo)
UINT4 coh_PTF_initialize_bank_veto(struct coh_PTF_params *params, struct bankTemplateOverlaps **bankNormOverlapsP, struct bankComplexTemplateOverlaps **bankOverlapsP, struct bankDataOverlaps **dataOverlapsP, FindChirpTemplate **bankFcTmpltsP, FindChirpTemplate *fcTmplt, FindChirpTmpltParams *fcTmpltParams, REAL4FrequencySeries **invspec, struct timeval startTime)
UINT4 coh_PTF_accept_trig_check(struct coh_PTF_params *params, MultiInspiralTable **eventList, MultiInspiralTable thisEvent, INT4 timeDiff, UINT4 currTimeDiff, UINT4 currStorageID)
void coh_PTF_set_null_input_RingDataSegments(RingDataSegments **segment, UINT4 length)
void REALToGSLVector(const REAL8 *input, gsl_vector *output, size_t size)
REAL4 coh_PTF_calculate_auto_veto(UINT4 numPoints, UINT4 position, REAL4 Fplus[LAL_NUM_IFO], REAL4 Fcross[LAL_NUM_IFO], struct coh_PTF_params *params, struct bankCohTemplateOverlaps *cohAutoOverlaps, struct bankComplexTemplateOverlaps *autoTempOverlaps, COMPLEX8VectorSequence *PTFqVec[LAL_NUM_IFO+1], REAL8Array *PTFM[LAL_NUM_IFO+1], INT4 timeOffsetPoints[LAL_NUM_IFO], gsl_matrix *Autoeigenvecs, gsl_vector *Autoeigenvals, UINT4 detectorNum, UINT4 vecLength, UINT4 vecLengthTwo)
CohPTFSkyPositions * coh_PTF_generate_sky_points(struct coh_PTF_params *params)
CohPTFSkyPositions * coh_PTF_parse_time_delays(CohPTFSkyPositions *skyPoints, struct coh_PTF_params *params)
void coh_PTF_initialize_structures(struct coh_PTF_params *params, FindChirpTemplate **fcTmpltP, FindChirpTmpltParams **fcTmpltParamsP, REAL8Array **PTFM, REAL8Array **PTFN, COMPLEX8VectorSequence **PTFqVec, REAL4FFTPlan *fwdplan)
UINT4 coh_PTF_initialize_auto_veto(struct coh_PTF_params *params, struct bankComplexTemplateOverlaps **autoTempOverlapsP, struct timeval startTime)
RingDataSegments * coh_PTF_get_segments(REAL4TimeSeries *channel, REAL4FrequencySeries *invspec, REAL4FFTPlan *fwdplan, InterferometerNumber NumberIFO, REAL4 *timeSlideVectors, struct coh_PTF_params *params)
void coh_PTF_template(FindChirpTemplate *fcTmplt, InspiralTemplate *InspTmplt, FindChirpTmpltParams *params)
int write_REAL4FrequencySeries(REAL4FrequencySeries *series)
INT4 coh_PTF_data_condition(struct coh_PTF_params *params, REAL4TimeSeries **channel, REAL4FrequencySeries **invspec, RingDataSegments **segments, REAL4FFTPlan *fwdplan, REAL4FFTPlan *psdplan, REAL4FFTPlan *revplan, REAL4 **timeSlideVectors, struct timeval startTime)
REAL4FFTPlan * coh_PTF_get_fft_fwdplan(struct coh_PTF_params *params)
void coh_PTF_cleanup(struct coh_PTF_params *params, ProcessParamsTable *procpar, REAL4FFTPlan *fwdplan, REAL4FFTPlan *psdplan, REAL4FFTPlan *revplan, COMPLEX8FFTPlan *invPlan, REAL4TimeSeries **channel, REAL4FrequencySeries **invspec, RingDataSegments **segments, MultiInspiralTable *events, SnglInspiralTable *snglEvents, InspiralTemplate *PTFbankhead, FindChirpTemplate *fcTmplt, FindChirpTmpltParams *fcTmpltParams, REAL8Array **PTFM, REAL8Array **PTFN, COMPLEX8VectorSequence **PTFqVec, REAL4 *timeOffsets, REAL4 *slidTimeOffsets, REAL4 *Fplus, REAL4 *Fcross, REAL4 *Fplustrig, REAL4 *Fcrosstrig, CohPTFSkyPositions *skyPoints, TimeSlide *time_slide_head, TimeSlideVectorList *longTimeSlideList, TimeSlideVectorList *shortTimeSlideList, REAL4 *timeSlideVectors, LALDetector **detectors, INT8 *slideIDList, TimeSlideSegmentMapTable *time_slide_map_head, SegmentTable *segment_table_head)
void coh_PTF_calculate_trace_snr(struct coh_PTF_params *params, REAL4TimeSeries *traceSNR, COMPLEX8VectorSequence **PTFqVec, gsl_matrix *eigenvecs, gsl_vector *eigenvals, REAL4 *Fplus, REAL4 *Fcross, INT4 *timeOffsetPoints, UINT4 spinTemplate, UINT4 vecLength, UINT4 vecLengthTwo, UINT4 vecLoc, UINT4 snrLoc)
void cross_product(gsl_vector *product, const gsl_vector *u, const gsl_vector *v)
int coh_PTF_params_inspiral_sanity_check(struct coh_PTF_params *params)
CohPTFSkyPositions * coh_PTF_generate_sky_grid(struct coh_PTF_params *params)
void coh_PTF_template_overlaps(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt1, FindChirpTemplate *fcTmplt2, REAL4FrequencySeries *invspec, UINT4 spinBank, REAL8Array *PTFM)
UINT4 checkInjectionMchirp(struct coh_PTF_params *params, InspiralTemplate *tmplt, LIGOTimeGPS *epoch)
void coh_PTF_cluster_triggers(struct coh_PTF_params *params, MultiInspiralTable **eventList, MultiInspiralTable **newEventHead, UINT4 numSlides, INT4 timeDiff)
void coh_PTF_chi_square_coh_setup(struct coh_PTF_params *params, gsl_matrix **AutoeigenvecsP, gsl_vector **AutoeigenvalsP, REAL4 **frequencyRangesPlus, REAL4 **frequencyRangesCross, REAL4 **powerBinsPlus, REAL4 **powerBinsCross, REAL4 **overlapCont, struct bankDataOverlaps **chisqOverlapsP, FindChirpTemplate *fcTmplt, REAL4FrequencySeries **invspec, RingDataSegments **segments, REAL4 *Fplus, REAL4 *Fcross, REAL8Array **PTFM, COMPLEX8FFTPlan *invPlan, INT4 segmentNumber, UINT4 csVecLength, UINT4 csVecLengthTwo, UINT4 vecLength)
void timeval_print(struct timeval *tv)
void coh_PTF_auto_veto_overlaps(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt, struct bankComplexTemplateOverlaps *autoTempOverlaps, REAL4FrequencySeries *invspec, COMPLEX8FFTPlan *invBankPlan, UINT4 spinBank, UINT4 numAutoPoints, UINT4 timeStepPoints, UINT4 ifoNumber)
ProcessParamsTable * create_process_params(int argc, char **argv, const char *program)
void coh_PTF_set_null_input_REAL8Array(REAL8Array **array, UINT4 length)
void coh_PTF_calculate_det_stuff(struct coh_PTF_params *params, LALDetector **detectors, REAL4 *timeOffsets, REAL4 *Fplustrig, REAL4 *Fcrosstrig, CohPTFSkyPositions *skyPoints, UINT4 skyPointNum)
int generate_file_name(char *fname, size_t size, const char *sname, int t, int dt)
SnglInspiralTable * coh_PTF_create_sngl_event(struct coh_PTF_params *params, REAL4TimeSeries *cohSNR, FindChirpTemplate *fcTmplt, InspiralTemplate PTFTemplate, UINT8 *eventId, REAL4TimeSeries **pValues, REAL4TimeSeries **bankVeto, REAL4TimeSeries **autoVeto, REAL4TimeSeries **chiSquare, REAL8Array **PTFM, UINT4 currPos)
int coh_PTF_output_tmpltbank(char *outputFile, SnglInspiralTable *tmplts, ProcessParamsTable *processParamsTable, struct coh_PTF_params *params)
void coh_PTF_initialise_sub_bank(struct coh_PTF_params *params, InspiralTemplate *PTFBankTemplates, FindChirpTemplate *bankFcTmplts, UINT4 subBankSize, UINT4 numPoints)
int vrbflg
defined in lal/lib/std/LALError.c
SearchSummaryTable * coh_PTF_create_search_summary(struct coh_PTF_params *params)
UINT4 coh_PTF_accept_sngl_trig_check(struct coh_PTF_params *params, SnglInspiralTable **eventList, SnglInspiralTable thisEvent)
void coh_PTF_calculate_bmatrix(struct coh_PTF_params *params, gsl_matrix *eigenvecs, gsl_vector *eigenvals, REAL4 Fplus[LAL_NUM_IFO], REAL4 Fpcross[LAL_NUM_IFO], REAL8Array *PTFM[LAL_NUM_IFO+1], UINT4 vecLength, UINT4 vecLengthTwo, UINT4 PTFMlen)
CohPTFSkyPositions * coh_PTF_three_det_sky_grid(struct coh_PTF_params *params)
void rotation_matrix(gsl_matrix *matrix, gsl_vector *axis, REAL8 angle)
REAL4FFTPlan * coh_PTF_get_fft_psdplan(struct coh_PTF_params *params)
int coh_PTF_default_params(struct coh_PTF_params *params)
void coh_PTF_rescale_data(REAL4TimeSeries *channel, REAL8 rescaleFactor)
void coh_PTF_calculate_auto_veto_template_filters(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt, struct bankComplexTemplateOverlaps *autoTempOverlaps, REAL4FrequencySeries **invspec, COMPLEX8FFTPlan *invplan, UINT4 timeStepPoints)
void coh_PTF_set_null_input_UINT4(UINT4 **array, UINT4 length)
REAL4TimeSeries * coh_PTF_get_data(struct coh_PTF_params *params, const char *ifoChannel, const char *dataCache, UINT4 ifoNumber)
void coh_PTF_set_null_input_REAL4FrequencySeries(REAL4FrequencySeries **freqSeries, UINT4 length)
UINT8 coh_PTF_add_triggers(struct coh_PTF_params *params, MultiInspiralTable **eventList, MultiInspiralTable **thisEvent, REAL4TimeSeries *cohSNR, FindChirpTemplate *fcTmplt, InspiralTemplate PTFTemplate, UINT8 eventId, UINT4 spinTrigger, REAL4TimeSeries *pValues[10], REAL4TimeSeries *gammaBeta[2], REAL4TimeSeries *snrComps[LAL_NUM_IFO], REAL4TimeSeries *nullSNR, REAL4TimeSeries *traceSNR, REAL4TimeSeries *bankVeto[LAL_NUM_IFO+1], REAL4TimeSeries *autoVeto[LAL_NUM_IFO+1], REAL4TimeSeries *chiSquare[LAL_NUM_IFO+1], REAL8Array *PTFM[LAL_NUM_IFO+1], REAL4 rightAscension, REAL4 declination, INT8 slideId, REAL4 *timeOffsets, UINT4 *acceptPointList, UINT4 numAcceptPoints, UINT4 slideNum, INT4 timeDiff, INT4 startTime)
void coh_PTF_cluster_sngl_triggers(struct coh_PTF_params *params, SnglInspiralTable **eventList, SnglInspiralTable **thisEvent)
void coh_PTF_free_veto_memory(struct coh_PTF_params *params, struct bankTemplateOverlaps *bankNormOverlaps, FindChirpTemplate *bankFcTmplts, struct bankComplexTemplateOverlaps *bankOverlaps, struct bankDataOverlaps *dataOverlaps, struct bankComplexTemplateOverlaps *autoTempOverlaps)
void coh_PTF_calculate_null_stream_norms(UINT4 vecLength, gsl_matrix *eigenvecsNull, gsl_vector *eigenvalsNull, REAL8Array *PTFM[LAL_NUM_IFO+1])
UINT4 coh_PTF_template_time_series_cluster(struct coh_PTF_params *params, REAL4TimeSeries *cohSNR, UINT4 *acceptPoints, INT4 *timeOffsetPoints, INT4 numPointCheck, UINT4 startPoint, UINT4 endPoint, UINT4 **snglAcceptPoints, UINT4 *snglAcceptCount)
COMPLEX8FFTPlan * coh_PTF_get_fft_invplan(struct coh_PTF_params *params)
void coh_PTF_normalize(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt, REAL4FrequencySeries *invspec, REAL8Array *PTFM, REAL8Array *PTFN, COMPLEX8VectorSequence *PTFqVec, COMPLEX8FrequencySeries *sgmnt, COMPLEX8FFTPlan *invPlan, UINT4 spinTemplate)
int write_REAL4TimeSeries(REAL4TimeSeries *series)
void findInjectionSegment(UINT4 *start, UINT4 *end, LIGOTimeGPS *epoch, struct coh_PTF_params *params)
void coh_PTF_set_null_input_LALDetector(LALDetector **detector, UINT4 length)
long int timeval_subtract(struct timeval *t1)
void coh_PTF_calculate_standard_chisq_freq_ranges(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt, REAL4FrequencySeries *invspec[LAL_NUM_IFO+1], REAL8Array *PTFM[LAL_NUM_IFO+1], REAL4 Fplus[LAL_NUM_IFO], REAL4 Fcross[LAL_NUM_IFO], REAL4 *frequencyRangesPlus, REAL4 *frequencyRangesCross, gsl_matrix *eigenvecs, UINT4 detectorNum, UINT4 singlePolFlag)
CohPTFSkyPositions * coh_PTF_circular_grid(REAL4 angularResolution, REAL4 skyError)
REAL4FrequencySeries * coh_PTF_get_invspec(REAL4TimeSeries *channel, REAL4FFTPlan *fwdplan, REAL4FFTPlan *revplan, REAL4FFTPlan *psdplan, struct coh_PTF_params *params)
int coh_PTF_usage(const char *program)
int coh_PTF_params_sanity_check(struct coh_PTF_params *params)
void coh_PTF_reset_time_series(struct coh_PTF_params *params, LIGOTimeGPS segStartTime, REAL4TimeSeries *cohSNR, REAL4TimeSeries *nullSNR, REAL4TimeSeries *traceSNR, REAL4TimeSeries **bankVeto, REAL4TimeSeries **autoVeto, REAL4TimeSeries **chiSquare, REAL4TimeSeries **snrComps, REAL4TimeSeries **pValues, REAL4TimeSeries **gammaBeta, UINT4 spinTemplates)
void coh_PTF_calculate_coherent_SNR(struct coh_PTF_params *params, REAL4 *snrData, REAL4TimeSeries **pValues, REAL4TimeSeries **snrComps, INT4 *timeOffsetPoints, COMPLEX8VectorSequence **PTFqVec, REAL4 *Fplus, REAL4 *Fcross, gsl_matrix *eigenvecs, gsl_vector *eigenvals, UINT4 segStartPoint, UINT4 segEndPoint, UINT4 vecLength, UINT4 vecLengthTwo, UINT4 spinTemplate, UINT4 **snglAcceptPoints, UINT4 *snglAcceptCount)
int is_in_list(int i, const char *list)
MultiInspiralTable * coh_PTF_create_multi_event(struct coh_PTF_params *params, REAL4TimeSeries *cohSNR, FindChirpTemplate *fcTmplt, InspiralTemplate PTFTemplate, UINT8 *eventId, UINT4 spinTrigger, REAL4TimeSeries **pValues, REAL4TimeSeries **gammaBeta, REAL4TimeSeries **snrComps, REAL4TimeSeries *nullSNR, REAL4TimeSeries *traceSNR, REAL4TimeSeries **bankVeto, REAL4TimeSeries **autoVeto, REAL4TimeSeries **chiSquare, REAL8Array **PTFM, REAL4 rightAscension, REAL4 declination, INT8 slideId, INT4 *timeOffsetPoints, UINT4 currPos)
void coh_PTF_set_null_input_REAL4TimeSeries(REAL4TimeSeries **timeSeries, UINT4 length)
UINT4 coh_PTF_test_veto_vals(struct coh_PTF_params *params, REAL4TimeSeries *cohSNR, REAL4TimeSeries *nullSNR, REAL4TimeSeries **bankVeto, REAL4TimeSeries **autoVeto, UINT4 currPointLoc)
void coh_PTF_calculate_null_stream_filters(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt, REAL4FrequencySeries **invspec, REAL8Array **PTFM, COMPLEX8VectorSequence **PTFqVec, RingDataSegments **segments, COMPLEX8FFTPlan *invPlan, UINT4 spinTemplate, UINT4 segNum)
void coh_PTF_bank_filters(struct coh_PTF_params *params, FindChirpTemplate *fcTmplt, UINT4 spinBank, COMPLEX8FrequencySeries *sgmnt, COMPLEX8FFTPlan *invBankPlan, COMPLEX8VectorSequence *PTFqVec, COMPLEX8VectorSequence *PTFBankqVec, REAL8 f_min, REAL8 fFinal)
SimInspiralTable * injections
This structure contains a frequency domain template used as input to the FindChirpFilter() routine.
This structure contains the parameters for generation of templates by the various template generation...
COMPLEX8FrequencySeries * sgmnt
gsl_matrix * rotReOverlaps
gsl_matrix * rotImOverlaps
COMPLEX8Array * PTFM[LAL_NUM_IFO]
COMPLEX8VectorSequence * PTFqVec[LAL_NUM_IFO+1]
REAL8Array * PTFM[LAL_NUM_IFO+1]
REAL4 chiSquareCalcThreshold
const char * skyPositionsFile
UINT4 slideSegments[LAL_NUM_IFO+1]
const char * segmentsToDoList
const char * dataCache[LAL_NUM_IFO]
const char * bankVetoBankName
SimInspiralTable * injectList
char ifoName[MAXIFO][LIGOMETA_IFO_MAX]
const char * channel[LAL_NUM_IFO]
int writeSnglInspiralTable
REAL4 lowTemplateFrequency
const char * templatesToDoList
REAL4 nonspinSNR2threshold
INT4 haveTrig[LAL_NUM_IFO]
REAL4 highFilterFrequency
LIGOTimeGPS frameDataStartTime
int output(const char *outfile, int outtype, REAL4TimeSeries *series)