Commit b6c11b33 authored by Marc Arene's avatar Marc Arene
Browse files

allowing for individual minimum_frequencies for ifos

parent e14b7e8f
No preview for this file type
......@@ -177,8 +177,13 @@ if __name__ == '__main__':
interferometers = gwdn.InterferometerList(ext_analysis_dict['ifos'])
# The minimun frequency for each interferometer needs to be set if we want the strain derived from the psd to start being non zero at that frequency and not at the default one which is 20Hz
# if type(ext_analysis_dict['minimum_frequency']) == str:
# ifos_min_freqs_dict = cut.convert_string_to_dict(ext_analysis_dict['minimum_frequency'])
# else:
# ifos_min_freqs_dict = {ifo: ext_analysis_dict['minimum_frequency'] for ifo in ext_analysis_dict['ifos']}
for i, ifo in enumerate(interferometers):
ifo.minimum_frequency = ext_analysis_dict['minimum_frequency']
ifo.minimum_frequency = ext_analysis_dict['minimum_frequency_ifos'][ifo.name]
ifo.maximum_frequency = ext_analysis_dict['maximum_frequency_ifo']
# Should look like: '../__input_data/GW170817/H-H1_GWOSC_4KHZ_R1-1187006835-4096.hdf5'
......@@ -263,7 +268,7 @@ if __name__ == '__main__':
# WAVEFORM GENERATION
waveform_arguments = {}
waveform_arguments['minimum_frequency'] = ext_analysis_dict['minimum_frequency']
waveform_arguments['minimum_frequency'] = min(ext_analysis_dict['minimum_frequency_ifos'].values())
waveform_arguments['waveform_approximant'] = ext_analysis_dict['approximant']
waveform_arguments['reference_frequency'] = ext_analysis_dict['reference_frequency']
waveform_arguments['maximum_frequency'] = ext_analysis_dict['maximum_frequency_injected_waveform']
......@@ -288,7 +293,7 @@ if __name__ == '__main__':
interferometers = gwdn.InterferometerList(ext_analysis_dict['ifos'])
# The minimun frequency for each interferometer needs to be set if we want the strain derived from the psd to start being non zero at that frequency and not at the default one which is 20Hz
for ifo in interferometers:
ifo.minimum_frequency = ext_analysis_dict['minimum_frequency']
ifo.minimum_frequency = ifos_min_freqs_dict[ifo]
ifo.maximum_frequency = ext_analysis_dict['maximum_frequency_ifo']
# The following line is called automatically when setting the PSDs, which we donnot do here hence the line.
# Stangely however, in bilby, the `Interferometer` class does not have `duration` and `sampling_frequency` arguments when the `InterferometerStrainData` and the `InterferometerList` classes do. Hence one needs to set those arguments for the list of `InterferometerStrainData` so that the `InterferometerList` inherits from them. The values will be inherited from the first one in the list...
......
......@@ -13,6 +13,8 @@ import Library.param_utils as paru
import Library.CONST as CONST
import Library.roq_utils as roqu
import core.utils as cut
LAL_PI = 3.141592653589793238462643383279502884
LAL_MSUN_SI = 1.988546954961461467461011951140572744e30
......@@ -108,7 +110,11 @@ def compute_extended_analysis_dict(mass_1, mass_2, geocent_time, chirp_mass, **a
approximant = analysis_kwargs['approximant']
roq = analysis_kwargs['roq']
roq_directory = analysis_kwargs['roq_b_matrix_directory']
minimum_frequency = analysis_kwargs['minimum_frequency']
if type(analysis_kwargs['minimum_frequency_ifos']) == str:
minimum_frequency_ifos = cut.convert_string_to_dict(analysis_kwargs['minimum_frequency_ifos'])
else:
minimum_frequency_ifos = {ifo: analysis_kwargs['minimum_frequency_ifos'] for ifo in analysis_kwargs['ifos']}
minimum_frequency_all = min(minimum_frequency_ifos.values())
reference_frequency = analysis_kwargs['reference_frequency']
maximum_frequency = analysis_kwargs['maximum_frequency']
......@@ -127,7 +133,7 @@ def compute_extended_analysis_dict(mass_1, mass_2, geocent_time, chirp_mass, **a
# Set the duration and sampling frequency of the data segment that we're going
# to inject the signal into. For the
# TaylorF2 waveform, we cut the signal close to the isco frequency
tc_3p5PN = ComputeChirpTime3p5PN(minimum_frequency, mass_1, mass_2)
tc_3p5PN = ComputeChirpTime3p5PN(minimum_frequency_all, mass_1, mass_2)
# We integrate the signal up to the frequency of the "Innermost stable circular orbit (ISCO)"
R_isco = 6. # Orbital separation at ISCO, in geometric units. 6M for PN ISCO; 2.8M for EOB
m1_min = 1
......@@ -179,7 +185,7 @@ def compute_extended_analysis_dict(mass_1, mass_2, geocent_time, chirp_mass, **a
# Settings which give me consistent results between the classic and the roq compute logL
minimum_frequency = rescaled_params['flow']
minimum_frequency_all = rescaled_params['flow']
maximum_frequency_injected_waveform = rescaled_params['fhigh']
# maximum_frequency_injected_waveform = min(2048, rescaled_params['fhigh'])
maximum_frequency_ifo = min(maximum_frequency, rescaled_params['fhigh'])
......@@ -198,7 +204,7 @@ def compute_extended_analysis_dict(mass_1, mass_2, geocent_time, chirp_mass, **a
ext_analysis_dict['roq']['rescaled_params'] = rescaled_params
ext_analysis_dict['roq']['scale_factor'] = scale_factor
tc_3p5PN = ComputeChirpTime3p5PN(minimum_frequency, mass_1, mass_2)
tc_3p5PN = ComputeChirpTime3p5PN(minimum_frequency_all, mass_1, mass_2)
LAL_MTSUN_SI = 4.925491025543575903411922162094833998e-6
f_CUT = 0.2
......@@ -236,7 +242,8 @@ def compute_extended_analysis_dict(mass_1, mass_2, geocent_time, chirp_mass, **a
# duration = int(geocent_time - start_time) + 1 + 2
ext_analysis_dict.update(
minimum_frequency = minimum_frequency,
minimum_frequency_ifos = minimum_frequency_ifos,
minimum_frequency_all = minimum_frequency_all,
maximum_frequency_injected_waveform = maximum_frequency_injected_waveform,
maximum_frequency_search_waveform = maximum_frequency_search_waveform,
maximum_frequency_ifo = maximum_frequency_ifo,
......
......@@ -2,7 +2,7 @@
# Interferometers to run the analysis on.
ifos = H1,L1,V1
approximant = IMRPhenomHM
minimum_frequency = 20
minimum_frequency_ifos = {H1: 20.0, L1: 20.0, V1: 20.0}
maximum_frequency = 1024
reference_frequency = 20
roq = False
......
......@@ -223,7 +223,7 @@
```
$ git checkout -b branch_ed
```
The `-b` option directly activates that branch. Note that the branch you are on does not depend on your terminal session.
Note that the branch you are on does not depend on your terminal session.
- What's your code editor ? It probably provides short-cuts to run the usual git commands, like commit etc.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment