upd API
This commit is contained in:
parent
12922f0f79
commit
a9df27b7c7
13 changed files with 43 additions and 40 deletions
|
@ -23,7 +23,7 @@ def load():
|
|||
|
||||
@pytest.mark.parametrize("spectrum_path, expected", load())
|
||||
def test_minmax(spectrum_path, expected):
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
|
||||
assert_equal(len(lambdas), len(smoothed_intensities))
|
||||
|
|
|
@ -24,11 +24,11 @@ def load(filename):
|
|||
#@pytest.mark.skip('...')
|
||||
@pytest.mark.parametrize("spectrum_path, expected", load('known_value.yaml'))
|
||||
def test_SV2o0_small_tol(spectrum_path, expected):
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
|
||||
File_I_min = 'tests/spectre_trou/000043641.xy'
|
||||
_, intensities_void = load_spectrum(File_I_min, lambda_min=450)
|
||||
|
||||
_, intensities_void = load_spectrum(File_I_min, wavelength_min=450)
|
||||
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
@ -54,11 +54,11 @@ def test_SV2o0_small_tol(spectrum_path, expected):
|
|||
|
||||
@pytest.mark.parametrize("spectrum_path, expected", load('known_value_large_tol.yaml'))
|
||||
def test_SV2o0_large_tol(spectrum_path, expected):
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
|
||||
File_I_min = 'tests/spectre_trou/000043641.xy'
|
||||
_, intensities_void = load_spectrum(File_I_min, lambda_min=450)
|
||||
|
||||
_, intensities_void = load_spectrum(File_I_min, wavelength_min=450)
|
||||
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
|
|
@ -24,7 +24,7 @@ def load():
|
|||
#@pytest.mark.skip('...')
|
||||
@pytest.mark.parametrize("spectrum_path, expected", load())
|
||||
def test_SV2o1(spectrum_path, expected):
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
|
|
@ -23,7 +23,7 @@ def load():
|
|||
|
||||
@pytest.mark.parametrize("spectrum_path, expected", load())
|
||||
def test_SV2o2(spectrum_path, expected):
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
|
|
@ -23,7 +23,7 @@ def load():
|
|||
|
||||
@pytest.mark.parametrize("spectrum_path, expected", load())
|
||||
def test_SV2o3(spectrum_path, expected):
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
|
|
@ -23,7 +23,7 @@ def load():
|
|||
|
||||
@pytest.mark.parametrize("spectrum_path, expected", load())
|
||||
def test_SV2o4(spectrum_path, expected):
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
|
|
@ -23,7 +23,7 @@ def load():
|
|||
|
||||
@pytest.mark.parametrize("spectrum_path, expected", load())
|
||||
def test_SV2o5(spectrum_path, expected):
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
|
|
@ -14,7 +14,7 @@ def test_FFT():
|
|||
expected = 3524.51
|
||||
|
||||
spectrum_path = os.path.join(FOLDER, FILE_NAME)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ def test_minmax_ransac():
|
|||
expected = 1338.35
|
||||
|
||||
spectrum_path = os.path.join(FOLDER, FILE_NAME)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
||||
|
@ -36,7 +36,7 @@ def test_minmax_linreg():
|
|||
expected = 1338.35
|
||||
|
||||
spectrum_path = os.path.join(FOLDER, FILE_NAME)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ def dataset1():
|
|||
expected = 777.07
|
||||
|
||||
spectrum_path = os.path.join(FOLDER, FILE_NAME)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
||||
|
@ -97,7 +97,7 @@ def test_scheludko_2peaks():
|
|||
expected = 495.69
|
||||
|
||||
spectrum_path = os.path.join(FOLDER, FILE_NAME)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
|
||||
|
@ -127,14 +127,14 @@ def test_order0():
|
|||
expected = 115.33
|
||||
|
||||
spectrum_path = os.path.join(FOLDER, FILE_NAME)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, lambda_min=450)
|
||||
lambdas, raw_intensities = load_spectrum(spectrum_path, wavelength_min=450)
|
||||
smoothed_intensities = smooth_intensities(raw_intensities)
|
||||
r_index = 1.324188 + 3102.060378 / (lambdas**2)
|
||||
prominence = 0.03
|
||||
|
||||
|
||||
|
||||
|
||||
File_I_min = 'tests/spectre_trou/000043641.xy'
|
||||
_, intensities_void = load_spectrum(File_I_min, lambda_min=450)
|
||||
_, intensities_void = load_spectrum(File_I_min, wavelength_min=450)
|
||||
|
||||
|
||||
w_start, w_stop = None, None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue