Skip to content

Commit

Permalink
TST: Change unit tests to correspond to actual correct answers.
Browse files Browse the repository at this point in the history
rcjackson committed Jun 15, 2021
1 parent d04159b commit b6100df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_gfit.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import pysp2
import numpy as np


def test_gaussian_fit():
my_sp2b = pysp2.io.read_sp2(pysp2.testing.EXAMPLE_SP2B)
my_ini = pysp2.io.read_config(pysp2.testing.EXAMPLE_INI)
my_binary = pysp2.util.gaussian_fit(my_sp2b, my_ini, parallel=False)
assert my_binary.PkHt_ch1.max() == 62666.6
assert my_binary.PkHt_ch1.max() == 62669.4
np.testing.assert_almost_equal(
np.nanmax(my_binary.PkHt_ch0.values), 98708.92915295, decimal=1)
np.testing.assert_almost_equal(
@@ -21,4 +22,4 @@ def test_psds():
assert np.nanmax(
my_binary['ScatDiaBC50'].values[ScatRejectKey == 0]) < 1000.
my_psds = pysp2.util.process_psds(my_binary, my_hk, my_ini)
np.testing.assert_almost_equal(my_psds['NumConcIncan'].max(), 0.69192748)
np.testing.assert_almost_equal(my_psds['NumConcIncan'].max(), 0.95805343)

0 comments on commit b6100df

Please sign in to comment.