Skip to content

Commit

Permalink
remove gstlal
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinerQ committed Nov 18, 2024
1 parent e19369d commit 5e0d8b9
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions sealgw/simulation/sealinterferometers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from .antenna import GWAntennaOnCPU



class SealInterferometer(Interferometer):
"""Class for the Interferometer for SealGW. ET response function aligned with LAL's."""

Expand Down Expand Up @@ -225,10 +226,12 @@ def get_detector_response(
# So that masked_index + masked_length = unmasked_index
masked_length = len(self.frequency_array) - len(frequencies)


else:
mask = np.ones(len(frequencies), dtype=bool)
masked_length = 0


signal = {}
if self.antenna_response_change:
if 'mass_1' in parameters.keys() and 'mass_2' in parameters.keys():
Expand All @@ -255,12 +258,18 @@ def get_detector_response(
self.antenna_response_change_timescale == 0
): # use parallel calculation for all time(freq) points
# print('use parallel calculation for all time(freq) points')
if (
self.antenna_response_change_timescale == 0
): # use parallel calculation for all time(freq) points
print('use parallel calculation for all time(freq) points')
L = len(times)
ra_array = np.zeros(L) + parameters['ra']
dec_array = np.zeros(L) + parameters['dec']
psi_array = np.zeros(L) + parameters['psi']
dec_array = np.zeros(L) + parameters['dec']
psi_array = np.zeros(L) + parameters['psi']
fp, fc, dt = self.antenna_func.resp_and_dt(

ra_array, dec_array, times, psi_array

)
antenna_response_array_dict = dict()
for mode in waveform_polarizations.keys():
Expand All @@ -270,10 +279,14 @@ def get_detector_response(
antenna_response_array_dict['plus'][masked_length:] = fp
antenna_response_array_dict['cross'][masked_length:] = fc
time_shift = dt
else: # use segment calculation. assume earth is fixed within each segment
# print('use segment calculation. assume earth is fixed within each segment')
else: # use segment calculation. assume earth is fixed within each segment
# print(
'use segment calculation. assume earth is fixed within each segment'
)
segment_starts = segmentize_tau(

tau, self.antenna_response_change_timescale

)

antenna_response_array_dict = dict()
Expand Down Expand Up @@ -339,6 +352,7 @@ def get_detector_response(

dt = dt_geocent + time_shift

else: # not include earth rotation
else: # not include earth rotation
print('not including the earth rotation')
for mode in waveform_polarizations.keys():
Expand Down Expand Up @@ -551,6 +565,7 @@ def __init__(

# was "+" in bilby. Changing to - could reduces the difference with LAL but still has ~1e-4 error
xarm_azimuth -= 240
xarm_azimuth -= 240
yarm_azimuth -= 240

latitude += (
Expand Down

0 comments on commit 5e0d8b9

Please sign in to comment.