Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
hippke committed Nov 22, 2021
1 parent 630cd19 commit 4ef0f14
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 265 deletions.
89 changes: 0 additions & 89 deletions transitleastsquares.egg-info/PKG-INFO

This file was deleted.

27 changes: 0 additions & 27 deletions transitleastsquares.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion transitleastsquares.egg-info/dependency_links.txt

This file was deleted.

3 changes: 0 additions & 3 deletions transitleastsquares.egg-info/entry_points.txt

This file was deleted.

10 changes: 0 additions & 10 deletions transitleastsquares.egg-info/requires.txt

This file was deleted.

1 change: 0 additions & 1 deletion transitleastsquares.egg-info/top_level.txt

This file was deleted.

135 changes: 3 additions & 132 deletions transitleastsquares/tests/test_synthetic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import division, print_function
import os
import numpy
import batman
from transitleastsquares import transitleastsquares
Expand Down Expand Up @@ -45,7 +43,8 @@
transit_depth_min=10 * 10 ** -6,
oversampling_factor=5,
duration_grid_step=1.02,
verbose=True
verbose=True,
use_threads=1
)

numpy.testing.assert_almost_equal(results.chi2_min, 8831.654060613922, decimal=5)
Expand All @@ -62,132 +61,4 @@
numpy.testing.assert_almost_equal(
results.transit_times[0], 68.00349264912924, decimal=5
)
"""
numpy.testing.assert_almost_equal(results.depth, 0.999897160189092, decimal=5)
numpy.testing.assert_almost_equal(results.duration, 0.5908251624976649, decimal=5)
numpy.testing.assert_almost_equal(
min(results.chi2red), 0.6719167401148216, decimal=5
)
numpy.testing.assert_almost_equal(results.SDE, 5.691301613227594, decimal=5)
numpy.testing.assert_almost_equal(
results.odd_even_mismatch, 0.29083256866622437, decimal=5
)
numpy.testing.assert_almost_equal(results.rp_rs, 0.009119851811944274, decimal=5)
# Full light curve model
numpy.testing.assert_almost_equal(
max(results.model_lightcurve_time), 1143.7472155961277, decimal=5
)
numpy.testing.assert_almost_equal(
min(results.model_lightcurve_time), 48.0059010663453, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.mean(results.model_lightcurve_time), 595.877471821318, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.sum(results.model_lightcurve_time), 39166430.34534341, decimal=5
)
numpy.testing.assert_almost_equal(max(results.model_lightcurve_model), 1, decimal=5)
numpy.testing.assert_almost_equal(
min(results.model_lightcurve_model), 0.999897160189092, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.mean(results.model_lightcurve_model), 0.9999998641488729, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.sum(results.model_lightcurve_model), 65728.99107064126, decimal=5
)
transit_times_expected = [68.003492, 433.261711, 798.519931]
numpy.testing.assert_almost_equal(
results.transit_times, transit_times_expected, decimal=5
)
numpy.testing.assert_almost_equal(results.duration, 0.590825, decimal=5)
numpy.testing.assert_almost_equal(
max(results.model_folded_phase), 1.0000380285975052, decimal=5
)
numpy.testing.assert_almost_equal(
min(results.model_folded_phase), 3.8028597505324e-05, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.mean(results.model_folded_phase), 0.5000380285975052, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.sum(results.model_folded_phase), 6574.499999999999, decimal=5
)
numpy.testing.assert_almost_equal(max(results.model_folded_model), 1, decimal=5)
numpy.testing.assert_almost_equal(
min(results.model_folded_model), 0.999897160189092, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.mean(results.model_folded_model), 0.9999998679702978, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.sum(results.model_folded_model), 13147.998264073476, decimal=5
)
numpy.testing.assert_almost_equal(
max(results.folded_phase), 0.9999608485845858, decimal=5
)
numpy.testing.assert_almost_equal(
min(results.folded_phase), 1.44015016259047e-05, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.mean(results.folded_phase), 0.500000089528271, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.sum(results.folded_phase), 6574.001177117707, decimal=5
)
numpy.testing.assert_almost_equal(
max(results.folded_y), 1.000019008301075, decimal=5
)
numpy.testing.assert_almost_equal(
min(results.folded_y), 0.9998860842491378, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.mean(results.folded_y), 0.9999997920032417, decimal=5
)
numpy.testing.assert_almost_equal(
numpy.sum(results.folded_y), 13147.997265, decimal=5
)
numpy.testing.assert_almost_equal(
results.depth_mean_even, (0.999915, 6.785539e-06), decimal=5
)
numpy.testing.assert_almost_equal(
results.depth_mean_odd, (0.999920, 1.209993e-05), decimal=5
)
numpy.testing.assert_almost_equal(
results.depth_mean, (0.999917, 6.086923e-06), decimal=5
)
numpy.testing.assert_almost_equal(
results.transit_depths, [0.99991085, 0.99992095, 0.99992007], decimal=5
)
numpy.testing.assert_almost_equal(
results.transit_depths_uncertainties,
[4.19177855e-06, 1.20999330e-05, 1.26699399e-05],
decimal=5,
)
numpy.testing.assert_almost_equal(
results.odd_even_mismatch, 0.29083256866622437, decimal=5
)
numpy.testing.assert_almost_equal(
results.per_transit_count, [7.0, 7.0, 7.0], decimal=5
)
numpy.testing.assert_almost_equal(results.transit_count, 3, decimal=5)
numpy.testing.assert_almost_equal(results.distinct_transit_count, 3, decimal=5)
numpy.testing.assert_almost_equal(results.empty_transit_count, 0, decimal=5)
numpy.testing.assert_almost_equal(
results.snr_per_transit, [38.92162, 34.51048, 34.89514], decimal=5
)
numpy.testing.assert_almost_equal(results.snr, 62.542764907612785, decimal=5)
numpy.testing.assert_almost_equal(
results.snr_pink_per_transit, [52.24377, 46.32278, 46.8391], decimal=5
)
"""
print("passed")

4 changes: 2 additions & 2 deletions transitleastsquares/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
TLS_VERSIONING = "1.0.30"
TLS_DATE = "17 Nov 2021"
TLS_VERSIONING = "1.0.31"
TLS_DATE = "22 Nov 2021"

0 comments on commit 4ef0f14

Please sign in to comment.