Commit 6c7b03fb authored by Marc Arene's avatar Marc Arene
Browse files

Moving set_inj.py, set_psds.py, logL_snr.py, dlogL.py, FIM.py to /Codes

parent ea68d282
......@@ -22,14 +22,12 @@ import Library.config as conf
import bilby
import Library.bilby_waveform as bilby_wv
import Library.bilby_utils as bilby_utils
import Library.set_injection_parameters as set_inj
import Library.set_psds as set_psds
import Library.logL_snr as logL_snr
import Library.dlogL as dlogL
import Library.FIM as FIM
import Codes.set_injection_parameters as set_inj
import Codes.set_psds as set_psds
import Codes.logL_snr as logL_snr
import Codes.dlogL as dlogL
import Codes.FIM as FIM
if __name__=='__main__':
# previously was : run BNS_HMC_9D.py input_file #n_traj_HMC_tot #n_traj_fit #n_1_fit #n_2_fit #source_id SkipPhase1=False
......
......@@ -9,8 +9,8 @@ from Headers.PN_Coefficients import * # Headers.Constants already imported in PN
import Library.param_utils as paru
import Library.config as conf
import Library.set_injection_parameters as set_inj
import Library.set_psds as set_psds
import Codes.set_injection_parameters as set_inj
import Codes.set_psds as set_psds
......
......@@ -9,10 +9,10 @@ from Headers.PN_Coefficients import * # Headers.Constants already imported in PN
import Library.param_utils as paru
import Library.config as conf
import Library.set_injection_parameters as set_inj
import Library.set_psds as set_psds
import Codes.set_injection_parameters as set_inj
import Codes.set_psds as set_psds
import Library.logL_snr as logL_snr
import Codes.logL_snr as logL_snr
def main(signal1, signal2, signal3, injection_parameters, start_time, minimum_frequency, interferometers, do_prints=False):
......
......@@ -8,8 +8,8 @@ import Library.bilby_utils as bilby_utils
from Headers.PN_Coefficients import * # Headers.Constants already imported in PN_Coeff
import Library.bilby_waveform as bilby_wv
import Library.set_injection_parameters as set_inj
import Library.set_psds as set_psds
import Codes.set_injection_parameters as set_inj
import Codes.set_psds as set_psds
......
......@@ -6,7 +6,7 @@ import numpy as np
import bilby
import Library.psd_utils as psd_utils
import Library.set_injection_parameters as set_inj
import Codes.set_injection_parameters as set_inj
......
......@@ -14,7 +14,7 @@ import Library.bilby_utils as bilby_utils
import Library.config as conf
import Library.dlogL as dlogL
import Codes.dlogL as dlogL
def FindClosestPoints(q_pos_fit, PointFit_Sort, n_pt_fit, n_param, n_1_fit, param_index):
"""
......@@ -449,8 +449,7 @@ def NumericalGradientLeapfrog_ThreeDetectors_Trajectory(q_pos_0, p_mom_0, dlogL_
# Compute numerically the gradient of logL
# QUESTION: should I pass as an input the injection_parameters dictionary and update it here with the following parameters dictionary or is it sufficient to just give as input to bilby/lal this parameters dictionary?
parameters = paru.q_pos_to_dictionary(q_pos, start_time)
# dlogL_pos = bilby_wv.dlogL_ThreeDetectors(signal_1, signal_2, signal_3, parameters, start_time, minimum_frequency, interferometers, l, i)
dlogL_pos = dlogL.main(signal_1, signal_2, signal_3, parameters, start_time, minimum_frequency, interferometers, False)
dlogL_pos = bilby_wv.dlogL_ThreeDetectors(signal_1, signal_2, signal_3, parameters, start_time, minimum_frequency, interferometers)
# 1/2 step in momentum (leapfrog algorithm)
p_mom += 0.5 * epsilon * dlogL_pos * scale
......
......@@ -602,7 +602,7 @@ def dlogL_ThreeDetectors2(signal1, signal2, signal3, parameters, start_time, min
if __name__=='__main__':
from optparse import OptionParser
import Library.set_injection_parameters as set_inj
import Codes.set_injection_parameters as set_inj
usage = """%prog [options]
Plots the three waveforms in the time domain"""
......
......@@ -5,7 +5,7 @@ sys.path.append('../')
from Headers.PN_Coefficients import * # Headers.Constants already imported in PN_Coeff
import Library.config as conf
import Library.set_injection_parameters as set_inj
import Codes.set_injection_parameters as set_inj
......
......@@ -796,9 +796,9 @@ Next Meeting with Ed:
- [DONE] simplify the call to bilby's waveform generation
- [DONE] remove dependencies of `import sigpar_utils as su`
- remove the `sigpar version of the functions` in `bilby_waveform.py`
- [DONE] remove dependency to Yann's function which are replaced by bilby's
- remove the `h_wave_1, h_wave_2, h_wave_3 =` structure
- have the `verbose` option really control the prints.
- remove dependency to Yann's function which are replaced by bilby's
- create a new and proper directory structure
- reproduce bilby's structure ?
- do a global `autoflake` at the end
......@@ -9,7 +9,7 @@ sys.path.append('../')
from Headers.PN_Coefficients import * # Headers.Constants already imported in PN_Coeff
import bilby
import Library.set_injection_parameters as set_inj
import Codes.set_injection_parameters as set_inj
A0 = 2.2542206004661943e-21
......
......@@ -11,7 +11,7 @@ import Library.config as conf
import Library.sigpar_utils as su
import Library.param_utils as paru
from Library.BNS_Utility_Functions import Mc_and_mu_to_M_eta_m1_and_m2
# import Library.set_injection_parameters as set_inj
# import Codes.set_injection_parameters as set_inj
import GW170817_parameters
import GW170817_set_psds
......
......@@ -11,7 +11,7 @@ import Library.config as conf
import Library.sigpar_utils as su
import Library.param_utils as paru
from Library.BNS_Utility_Functions import Mc_and_mu_to_M_eta_m1_and_m2
# import Library.set_injection_parameters as set_inj
# import Codes.set_injection_parameters as set_inj
import GW170817_parameters
import GW170817_set_psds
......
......@@ -9,7 +9,7 @@ import bilby
import Library.bilby_waveform as bilby_wv
import Library.bilby_utils as bilby_utils
import Library.config as conf
# import Library.set_injection_parameters as set_inj
# import Codes.set_injection_parameters as set_inj
import GW170817_parameters
import GW170817_set_psds
......
......@@ -9,7 +9,7 @@ import bilby
import Library.bilby_waveform as bilby_wv
import Library.bilby_utils as bilby_utils
import Library.config as conf
import Library.set_injection_parameters as set_inj
import Codes.set_injection_parameters as set_inj
injection_parameters = set_inj.ini_file_to_dict()
parameters = injection_parameters.copy()
......
......@@ -11,7 +11,7 @@ import Library.config as conf
import Library.sigpar_utils as su
import Library.param_utils as paru
from Library.BNS_Utility_Functions import Mc_and_mu_to_M_eta_m1_and_m2
# import Library.set_injection_parameters as set_inj
# import Codes.set_injection_parameters as set_inj
import GW170817_parameters
import GW170817_set_psds
......
......@@ -11,7 +11,7 @@ import Library.config as conf
import Library.sigpar_utils as su
import Library.param_utils as paru
from Library.BNS_Utility_Functions import Mc_and_mu_to_M_eta_m1_and_m2
# import Library.set_injection_parameters as set_inj
# import Codes.set_injection_parameters as set_inj
import GW170817_parameters
import GW170817_set_psds
......
......@@ -8,7 +8,7 @@ import matplotlib.pyplot as plt
import bilby
import Library.bilby_waveform as bilby_wv
from Headers.PN_Coefficients import * # Headers.Constants already imported in PN_Coeff
import Library.set_injection_parameters as set_inj
import Codes.set_injection_parameters as set_inj
def numerical_derivative(parameters, start_time, minimum_frequency, interferometers, offset):
......
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