Skip to content

Commit

Permalink
resolve issue with mdc pp plots (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanMarx authored Dec 11, 2024
1 parent 8f9c721 commit 569a524
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions amplfi/train/data/datasets/testing/mdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def phi_from_ra(ra: np.ndarray, gpstimes: np.ndarray) -> float:
# calculate the relative azimuthal angle in the range [0, 2pi]
phi = np.remainder(ra - gmsts, 2 * np.pi)

# convert to range [-pi, pi]
phi[phi > np.pi] -= 2 * np.pi
return phi


Expand Down
6 changes: 4 additions & 2 deletions amplfi/train/priors.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ def cbc_prior() -> ParameterSampler:
torch.as_tensor(0, dtype=torch.float32),
torch.as_tensor(2 * torch.pi, dtype=torch.float32),
),
chi1=distributions.DeltaFunction(
chi1=Uniform(
torch.as_tensor(0, dtype=torch.float32),
torch.as_tensor(0.999, dtype=torch.float32),
),
chi2=distributions.DeltaFunction(
chi2=Uniform(
torch.as_tensor(0, dtype=torch.float32),
torch.as_tensor(0.999, dtype=torch.float32),
),
)

Expand Down

0 comments on commit 569a524

Please sign in to comment.