/******************************************************************************/ /* */ /* COINCIDE.CC */ /* */ /******************************************************************************/ // Tests multiple event lists for time-frequency coincidence and returns the // resulting coincident event list. Events are tested for time-frequency // overlap assuming unity duration and bandwidth inflation, zero coincidence // window bandwidth, and the specified coincidence window duration. This // funciton can handle arbitrary numbers of detectors. Example syntax is shown // below for the two, three, and four detector cases. // // coincide windowDuration12 eventList1 eventList2 // coincidentEventList // // coincide windowDuration12 windowDuration13 windowDuration23 // eventList1 eventList2 eventList3 coincidentEventList // // coincide windowDuration12 windowDuration13 windowDuration14 // windowDuration23 windowDuration24 windowDuration34 // eventList1 eventList2 eventList3 eventList4 // coincidentEventList // Shourov K. Chatterji // shourov@ligo.caltech.edu // $Id: coincide.cc,v 1.1 2006/11/03 15:33:59 shourov Exp $ #include #include #include #include "coincidenteventlist.hh" int main(int argc, char **argv) { if (argc != 5) { std::cerr << "error: incorrect number of arguments" << std::endl; std::cerr << std::endl; std::cerr << "usage: coincide windowDuration12 eventList1 eventList2 \\" << std::endl; std::cerr << " coincidentEventList" << std::endl; return 1; } double coincidenceWindowDuration; double coincidenceWindowBandwidth = 0.0; double durationInflation = 1.0; double bandwidthInflation = 1.0; std::string eventListFile1; std::string eventListFile2; std::string coincidentEventListFile; coincidenceWindowDuration = atof(argv[1]); eventListFile1 = argv[2]; eventListFile2 = argv[3]; coincidentEventListFile = argv[4]; event::EventList eventList1; event::EventList eventList2; eventList1.read(eventListFile1); eventList2.read(eventListFile2); event::CoincidentEventList coincidentEventList; event::EventAlternateTimeFrequencyCoincidenceCriterion coincidenceCriterion(coincidenceWindowDuration, coincidenceWindowBandwidth, durationInflation, bandwidthInflation); event::coincide(eventList1, eventList2, coincidentEventList, coincidenceCriterion); event::EventList eventList(coincidentEventList); eventList.write(coincidentEventListFile); return 0; }