Skip to content

Commit

Permalink
speed up ofti tests a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
sblunt committed Jan 10, 2024
1 parent d9e90b8 commit 00d4bb6
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions tests/test_OFTI.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_run_sampler():

# test to make sure outputs are reasonable
start = time.time()
orbits = s.run_sampler(1000, num_cores=4)
orbits = s.run_sampler(100, num_cores=4)
end = time.time()

print()
Expand Down Expand Up @@ -155,15 +155,15 @@ def test_run_sampler():
ecc_exp = 0.19
inc_exp = np.radians(140)

# test to make sure OFTI values are within 20% of expectations
assert sma == pytest.approx(sma_exp, abs=0.2 * sma_exp)
assert ecc == pytest.approx(ecc_exp, abs=0.2 * ecc_exp)
assert inc == pytest.approx(inc_exp, abs=0.2 * inc_exp)
# test to make sure OFTI values are consistent with expectations
assert sma == pytest.approx(sma_exp, abs=5)
assert ecc == pytest.approx(ecc_exp, abs=0.1)
assert inc == pytest.approx(inc_exp, abs=np.radians(10))

sma_seppa = sma # use for covarinaces test

# test with only one core
orbits = s.run_sampler(100, num_cores=1)
orbits = s.run_sampler(10, num_cores=1)

# test with only one epoch
myDriver = orbitize.driver.Driver(
Expand Down Expand Up @@ -410,12 +410,13 @@ def test_OFTI_pan_priors():


if __name__ == "__main__":
test_scale_and_rotate()
test_run_sampler()
test_OFTI_covariances()
test_OFTI_multiplanet()
test_not_implemented()
test_fixed_sys_params_sampling()
# test_scale_and_rotate()
# test_run_sampler()

# test_OFTI_covariances()
# test_OFTI_multiplanet()
# test_not_implemented()
# test_fixed_sys_params_sampling()
test_OFTI_pan_priors()
# profile_system()
print("Done!")
# # profile_system()
# print("Done!")

0 comments on commit 00d4bb6

Please sign in to comment.