Skip to content

Commit

Permalink
Modification of the calibration errors and fixing wrong indentation of
Browse files Browse the repository at this point in the history
the code
  • Loading branch information
jacquot committed Dec 2, 2024
1 parent b1b5237 commit 88e5b7a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pycbc/inject/inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,16 +633,16 @@ def make_strain_from_inj_object(self, inj, delta_t, detector_name,
# systematics
cal_errors = {

"H1": (0.03, 0),
"L1": (0.03, 0),
"V1": (0.035, 0)
"H1": (0.036, 0),
"L1": (0.056, 0),
"V1": (0, 0)

}
cal_systematics = 1
mu_log = np.log((cal_systematics**2)/(np.sqrt(cal_systematics**2 + cal_errors[detector_name][0]**2)))
sigma_log = np.sqrt(np.log(1+(cal_errors[detector_name][0]**2)/cal_systematics**2))
cal_offset = 1
mu_log = np.log((cal_offset**2)/(np.sqrt(cal_offset**2 + cal_errors[detector_name][0]**2)))
sigma_log = np.sqrt(np.log1p((cal_errors[detector_name][0]**2)/cal_offset**2))
cal_factor = np.random.lognormal(mu_log, sigma_log)

#inj['coa_phase'] = np.vonmises(inj['coa_pahse'], cal_errors[detector_name][1])
if inj['approximant'] in fd_det:
strain = get_td_det_waveform_from_fd_det(
inj, delta_t=delta_t, f_lower=f_l,
Expand All @@ -656,7 +656,7 @@ def make_strain_from_inj_object(self, inj, delta_t, detector_name,
inj, hp, hc, distance_scale=distance_scale)

#strain.coa_phase = np.vonmises(strain.coa_phase, cal_errors[detector_name][1])
strain /= cal_factor
strain /= cal_factor
return strain

def end_times(self):
Expand Down

0 comments on commit 88e5b7a

Please sign in to comment.