Skip to content

Commit

Permalink
update number of samples in conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanMarx committed Feb 4, 2025
1 parent 2952739 commit 20a00d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion ml4gw/waveforms/cbc/coefficients.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def taylor_t2_timing_0pn_coeff(total_mass: BatchTensor, eta: BatchTensor):
https://git.ligo.org/lscsoft/lalsuite/-/blob/master/lalsimulation/lib/LALSimInspiralPNCoefficients.c#L1528
"""

output = total_mass * G / torch.pow(torch.tensor(C), 3.0)
output = total_mass * G / C**3
return -5.0 * output / (256.0 * eta)


Expand All @@ -28,5 +28,8 @@ def taylor_t2_timing_4pn_coeff(eta: BatchTensor):


def taylor_t3_frequency_0pn_coeff(total_mass: BatchTensor):
"""
https://git.ligo.org/lscsoft/lalsuite/-/blob/master/lalsimulation/lib/LALSimInspiralPNCoefficients.c#L1723
"""
output = total_mass * G / C**3.0
return 1.0 / (8.0 * torch.pi * output)
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def validate(whitened, highpass, lowpass, sample_rate, df):

# number of samples to draw from
# the distributions for testing
N_SAMPLES = 100
N_SAMPLES = 500


@pytest.fixture(params=[256, 1024, 2048])
Expand Down Expand Up @@ -147,13 +147,13 @@ def distance(request):

@pytest.fixture()
def distance_far(request):
dist = Uniform(400, 3000)
dist = Uniform(500, 3000)
return dist.sample((N_SAMPLES,))


@pytest.fixture()
def distance_close(request):
dist = Uniform(100, 400)
dist = Uniform(100, 500)
return dist.sample((N_SAMPLES,))


Expand Down

0 comments on commit 20a00d4

Please sign in to comment.