Skip to content

Add timeslides

Avi Vajpeyi requested to merge avi.vajpeyi/bilby_pipe:timeshifts into master

This MR will allow a user to timeshift each detector's GPS start time at the point when data is generated. To use this, the user must provide --detectors, --gps-file gps_times.txt and --timeshift-file timeshift.txt.


Applying timeshifts

The timeshift.txt file must have the same number of rows as the gps_times.txt and len(detector) number of columns. Each column represents the timeshift at a detector. The order of the columns must be in the same order in which the detectors are specified.

For example, the following arguments could be passed:

--detectors [H1, L1]

gps_times.txt

1126259462
1126259466

timeshift.txt

-1  1
20  -20

The first job for gps time of 1126259462 will have its data for H1 and L1 timeshifted by 1126259462 -1 and 1126259462 +1 respectively.


Plotting during data gen

A plotting function is included in the step right after the timeshift is applied to help users verify if timeshifts are being applied correctly as they would like. An example of one of these plots is shown below.

ExampleImage


Testing on real events

The following table summarises three jobs using timeshifts and their results:

GPS Time H1 Δt L1 Δt Timeshifted to lnBCR LnBF H1 LnBF L1 LnBF
1 GW150914: 1126259460.4 0 0 - 12.6 299 191 90
2 GW150914 -1000s: 1126258460.4 1000 1000 timshifted to GW150914 13.0 299 197 87
3 GW150914 +500s: 1126259960.4 -500 500 timeshift H1 to GW150914, L1 to noise -4.6 188 192 0.5

From the table, we can see that

  • The results for (1) (2) match up and positively detect the signal
  • For (3) there is a signal in H1 (high lnBF at H) and just noise in L1 (low lnBF at L), so the BCR is low.
Edited by Avi Vajpeyi

Merge request reports