Skip to content

Commit

Permalink
Add test for light curve infinite flux removal
Browse files Browse the repository at this point in the history
  • Loading branch information
golmschenk committed Aug 27, 2024
1 parent 7512fdb commit ea412d8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/unit_tests/test_transform.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import numpy as np

from qusi.internal.light_curve import LightCurve, remove_infinite_flux_data_points_from_light_curve


def test_remove_infinite_flux_data_points_from_light_curve():
times = np.array([0.0, 1.0, 2.0])
fluxes = np.array([0.0, np.inf, 20.0])
light_curve = LightCurve.new(
times=times,
fluxes=fluxes,
)
updated_light_curve = remove_infinite_flux_data_points_from_light_curve(light_curve=light_curve)
expected_times = np.array([0.0, 2.0])
expected_fluxes = np.array([0.0, 20.0])
assert np.array_equal(updated_light_curve.times, expected_times)
assert np.array_equal(updated_light_curve.fluxes, expected_fluxes)

0 comments on commit ea412d8

Please sign in to comment.