Skip to content

Commit

Permalink
Refactor likelihood import and format code
Browse files Browse the repository at this point in the history
  • Loading branch information
kazewong committed Jan 24, 2024
1 parent 3cf1f41 commit 06d886d
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions example/GW150914_heterodyne.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import time
from jimgw.jim import Jim
from jimgw.single_event.detector import H1, L1
from jimgw.single_event.likelihood import HeterodynedTransientLikelihoodFD, TransientLikelihoodFD
from jimgw.single_event.likelihood import (
HeterodynedTransientLikelihoodFD,
TransientLikelihoodFD,
)
from jimgw.single_event.waveform import RippleIMRPhenomD
from jimgw.prior import Uniform, Composite
import jax.numpy as jnp
Expand Down Expand Up @@ -86,7 +89,21 @@
]
)

bounds = jnp.array([[10.0, 80.0], [0.125, 1.0], [-1.0, 1.0], [-1.0, 1.0], [0.0, 2000.0], [-0.05, 0.05], [0.0, 2 * jnp.pi], [-1.0, 1.0], [0.0, jnp.pi], [0.0, 2 * jnp.pi], [-1.0, 1.0]]).T
bounds = jnp.array(
[
[10.0, 80.0],
[0.125, 1.0],
[-1.0, 1.0],
[-1.0, 1.0],
[0.0, 2000.0],
[-0.05, 0.05],
[0.0, 2 * jnp.pi],
[-1.0, 1.0],
[0.0, jnp.pi],
[0.0, 2 * jnp.pi],
[-1.0, 1.0],
]
)

likelihood = HeterodynedTransientLikelihoodFD(
[H1, L1],
Expand All @@ -96,7 +113,7 @@
trigger_time=gps,
duration=duration,
post_trigger_duration=post_trigger_duration,
n_loops=300
n_loops=300,
)

mass_matrix = jnp.eye(11)
Expand Down

0 comments on commit 06d886d

Please sign in to comment.