SNEWS2 / snewpdag

SNEWS2 alert calculations
BSD 3-Clause "New" or "Revised" License
2 stars 13 forks source link

Update TimeOffset.py #47

Closed chensihan1999 closed 3 years ago

chensihan1999 commented 3 years ago

Added bias to generate gaussian noise. Instead of updating the generated true time, it records the offsetted time to "neutrino_time:"

tsengj10 commented 3 years ago

Maybe just change "neutrino_time" to "neutrino_times" and put it in the "gen" dictionary.

Then have another plugin which takes a single detector name as an argument. On each alert, look up the detector in gen/sn_times and gen/neutrino_times, and store the values in sn_time and neutrino_time in the payload?

mcolomermolla commented 3 years ago

Can you let me know which is the csv file from which you read the T0of each detector? I would maybe propose that it is not a separate file with the T0 of a list of detectors, but it is a field of the data file provided by each detector that is read, so that to make it close to what we will receive.

chensihan1999 commented 3 years ago

Can you let me know which is the csv file from which you read the T0of each detector? I would maybe propose that it is not a separate file with the T0 of a list of detectors, but it is a field of the data file provided by each detector that is read, so that to make it close to what we will receive.

The file name is "detector_location.csv" in the data folder. It contains the latitude, longitude, height, time uncertainty, bias information of five different detectors. I wasn't able to find the time uncertainty and bias for all five detectors, so some of the values are my guesses just to make the code run.