Skip to content

Commit

Permalink
fix batch inputs bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ravioli1369 authored and EthanMarx committed Jan 9, 2025
1 parent 368d0dd commit 13f61f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ml4gw/waveforms/cbc/phenom_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ def PhenomPOneFrequency(
diffRDphase = (diff[:, 1:] + diff[:, :-1]) / (
2 * delta_fRds.unsqueeze(1)
)
# reshape x to have same shape as diffRDphase
x = x[1:-1].unsqueeze(0).expand(diffRDphase.shape)
# interpolate at x = 1, as thats the same as f = fRD
diffRDphase = -self.interpolate(
torch.tensor([1]), x[1:-1], diffRDphase
)
diffRDphase = -self.interpolate(torch.tensor([1]), x, diffRDphase)
return hPhenom, diffRDphase

# Utility functions
Expand Down

0 comments on commit 13f61f6

Please sign in to comment.