diff --git a/optifik/auto.py b/optifik/auto.py index 6aa6d5f..e07dc0a 100644 --- a/optifik/auto.py +++ b/optifik/auto.py @@ -58,7 +58,7 @@ def auto(DATA_FOLDER, FILE_NAME, plot=None): if total_extrema <= 4 and total_extrema >= 2: #& 2peak minimum: print('Apply method Scheludko') - thickness = thickness_from_scheludko(lambdas, raw_intensities, smoothed_intensities, + thickness = thickness_from_scheludko(lambdas, smoothed_intensities, peaks_min, peaks_max, refractive_index=indice, plot=plot) @@ -67,7 +67,7 @@ def auto(DATA_FOLDER, FILE_NAME, plot=None): if total_extrema <= 4 and len(peaks_max) == 1 and len(peaks_min) == 0 : #dans l'ordre zéro ! print('Apply method ordre0') - thickness = thickness_for_order0(lambdas, raw_intensities, smoothed_intensities, + thickness = thickness_for_order0(lambdas, smoothed_intensities, peaks_min, peaks_max, refractive_index=indice, plot=plot) diff --git a/optifik/scheludko.py b/optifik/scheludko.py index d5277be..d0933b2 100644 --- a/optifik/scheludko.py +++ b/optifik/scheludko.py @@ -113,7 +113,6 @@ def Delta_fit(xdata, thickness, interference_order): def thickness_from_scheludko(lambdas, - raw_intensities, smoothed_intensities, peaks_min, peaks_max, @@ -161,7 +160,6 @@ def thickness_from_scheludko(lambdas, lambdas_masked = lambdas[mask] r_index_masked = r_index[mask] intensities_masked = smoothed_intensities[mask] - intensities_raw_masked = raw_intensities[mask] min_ecart = np.inf best_m = None meilleure_h = None @@ -214,7 +212,6 @@ def thickness_from_scheludko(lambdas, def thickness_for_order0(lambdas, - raw_intensities, smoothed_intensities, peaks_min, peaks_max, @@ -236,7 +233,6 @@ def thickness_for_order0(lambdas, lambdas_masked = lambdas[mask] r_index_masked = r_index[mask] intensities_masked = smoothed_intensities[mask] - intensities_raw_masked = raw_intensities[mask] intensities_I_min_masked =intensities_I_min[mask] min_ecart = np.inf diff --git a/tests/test_SV2o5.py b/tests/test_SV2o5.py index e66c548..299d071 100644 --- a/tests/test_SV2o5.py +++ b/tests/test_SV2o5.py @@ -34,7 +34,6 @@ def test_minmax(spectrum, expected): min_peak_prominence=prominence) thickness_scheludko = thickness_from_scheludko(lambdas, - raw_intensities, smoothed_intensities, peaks_min, peaks_max, diff --git a/tests/test_basic.py b/tests/test_basic.py index df49452..f04c5a7 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -74,7 +74,7 @@ def test_scheludko_4peaks(): min_peak_prominence=prominence) - result = thickness_from_scheludko(lambdas, raw_intensities, smoothed_intensities, + result = thickness_from_scheludko(lambdas, smoothed_intensities, peaks_min, peaks_max, refractive_index=indice, plot=False) @@ -99,7 +99,7 @@ def test_scheludko_2peaks(): min_peak_prominence=prominence) - result = thickness_from_scheludko(lambdas, raw_intensities, smoothed_intensities, + result = thickness_from_scheludko(lambdas, smoothed_intensities, peaks_min, peaks_max, refractive_index=indice, plot=False) @@ -126,7 +126,7 @@ def test_order0(): min_peak_prominence=prominence) - result = thickness_for_order0(lambdas, raw_intensities, smoothed_intensities, + result = thickness_for_order0(lambdas, smoothed_intensities, peaks_min, peaks_max, refractive_index=indice, plot=False)