Skip to content

Commit

Permalink
add controls for applying time offset in space det initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
acorreia61201 committed Dec 10, 2024
1 parent 1cfbaa9 commit 493b888
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions pycbc/inject/inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@
from pycbc.waveform import ringdown_td_approximants
from pycbc.types import float64, float32, TimeSeries, load_timeseries
from pycbc.detector import (Detector, SpaceDetector, _space_detectors,
get_available_space_detectors, parse_det_name)
get_available_space_detectors, parse_det_name)
from pycbc.conversions import (tau0_from_mass1_mass2,
get_final_from_initial,
tau_from_final_mass_spin)
from pycbc.coordinates.space import TIME_OFFSET_20_DEGREES
from pycbc.filter import resample_to_delta_t
import pycbc.io
from pycbc.io.ligolw import LIGOLWContentHandler
Expand Down Expand Up @@ -89,7 +90,17 @@ def projector(detector_name, inj, hp, hc, distance_scale=1):
detector frame
"""
if detector_name in get_available_space_detectors():
detector = SpaceDetector(detector_name)
# FIXME : This should probably be moved to project_wave;
# wait on code reviews to see if this is OK here
apply_offset = False
offset = TIME_OFFSET_20_DEGREES
if 'apply_offset' in inj.dtype.names:
apply_offset = inj.apply_offset
if 'offset' in inj.dtype.names:
offset = inj.offset
detector = SpaceDetector(detector_name,
apply_offset=apply_offset,
offset=offset)
else:
detector = Detector(detector_name)

Expand Down

0 comments on commit 493b888

Please sign in to comment.