-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for light curve infinite flux removal
- Loading branch information
1 parent
7512fdb
commit ea412d8
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |