Skip to content

Commit

Permalink
Adding m1-m2 into GW150914 Pv2 testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunhopang committed Oct 16, 2024
1 parent 0320a53 commit afe4e9a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/integration/test_GW150914_Pv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
DistanceToSNRWeightedDistanceTransform,
GeocentricArrivalTimeToDetectorArrivalTimeTransform,
GeocentricArrivalPhaseToDetectorArrivalPhaseTransform,
UniformInComponentMassSecondaryMassTransform,
ComponentMassesToChirpMassMassRatioTransform,
)
from jimgw.single_event.utils import Mc_q_to_m1_m2
from flowMC.strategy.optimization import optimization_Adam
Expand Down Expand Up @@ -55,10 +57,10 @@
# Mass prior
M_c_min, M_c_max = 10.0, 80.0
q_min, q_max = 0.125, 1.0
Mc_prior = UniformPrior(M_c_min, M_c_max, parameter_names=["M_c"])
q_prior = UniformPrior(q_min, q_max, parameter_names=["q"])
m1_prior = UniformPrior(15.0, 280.0, parameter_names=['m_1'])
m2_prior = UniformPrior(0.0, 1.0, parameter_names=['m_2_quantile'])

prior = prior + [Mc_prior, q_prior]
prior = prior + [m1_prior, m2_prior]

# Spin prior
s1_prior = UniformSpherePrior(parameter_names=["s1"])
Expand Down Expand Up @@ -93,6 +95,8 @@
# Defining Transforms

sample_transforms = [
UniformInComponentMassSecondaryMassTransform(q_min=q_min, q_max=q_max, M_c_min=M_c_min, M_c_max=M_c_max, m_1_min=m1_prior.xmin, m_1_max=m1_prior.xmax),
ComponentMassesToChirpMassMassRatioTransform,
DistanceToSNRWeightedDistanceTransform(gps_time=gps, ifos=ifos, dL_min=dL_prior.xmin, dL_max=dL_prior.xmax),
GeocentricArrivalPhaseToDetectorArrivalPhaseTransform(gps_time=gps, ifo=ifos[0]),
GeocentricArrivalTimeToDetectorArrivalTimeTransform(tc_min=t_c_prior.xmin, tc_max=t_c_prior.xmax, gps_time=gps, ifo=ifos[0]),
Expand All @@ -113,6 +117,8 @@
]

likelihood_transforms = [
UniformInComponentMassSecondaryMassTransform(q_min=q_min, q_max=q_max, M_c_min=M_c_min, M_c_max=M_c_max, m_1_min=m1_prior.xmin, m_1_max=m1_prior.xmax),
ComponentMassesToChirpMassMassRatioTransform,
MassRatioToSymmetricMassRatioTransform,
SphereSpinToCartesianSpinTransform("s1"),
SphereSpinToCartesianSpinTransform("s2"),
Expand Down

0 comments on commit afe4e9a

Please sign in to comment.