API cleanup
This commit is contained in:
parent
30a9eef102
commit
022966608a
4 changed files with 5 additions and 10 deletions
|
@ -58,7 +58,7 @@ def auto(DATA_FOLDER, FILE_NAME, plot=None):
|
||||||
|
|
||||||
if total_extrema <= 4 and total_extrema >= 2: #& 2peak minimum:
|
if total_extrema <= 4 and total_extrema >= 2: #& 2peak minimum:
|
||||||
print('Apply method Scheludko')
|
print('Apply method Scheludko')
|
||||||
thickness = thickness_from_scheludko(lambdas, raw_intensities, smoothed_intensities,
|
thickness = thickness_from_scheludko(lambdas, smoothed_intensities,
|
||||||
peaks_min, peaks_max,
|
peaks_min, peaks_max,
|
||||||
refractive_index=indice,
|
refractive_index=indice,
|
||||||
plot=plot)
|
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 !
|
if total_extrema <= 4 and len(peaks_max) == 1 and len(peaks_min) == 0 : #dans l'ordre zéro !
|
||||||
print('Apply method ordre0')
|
print('Apply method ordre0')
|
||||||
|
|
||||||
thickness = thickness_for_order0(lambdas, raw_intensities, smoothed_intensities,
|
thickness = thickness_for_order0(lambdas, smoothed_intensities,
|
||||||
peaks_min, peaks_max,
|
peaks_min, peaks_max,
|
||||||
refractive_index=indice,
|
refractive_index=indice,
|
||||||
plot=plot)
|
plot=plot)
|
||||||
|
|
|
@ -113,7 +113,6 @@ def Delta_fit(xdata, thickness, interference_order):
|
||||||
|
|
||||||
|
|
||||||
def thickness_from_scheludko(lambdas,
|
def thickness_from_scheludko(lambdas,
|
||||||
raw_intensities,
|
|
||||||
smoothed_intensities,
|
smoothed_intensities,
|
||||||
peaks_min,
|
peaks_min,
|
||||||
peaks_max,
|
peaks_max,
|
||||||
|
@ -161,7 +160,6 @@ def thickness_from_scheludko(lambdas,
|
||||||
lambdas_masked = lambdas[mask]
|
lambdas_masked = lambdas[mask]
|
||||||
r_index_masked = r_index[mask]
|
r_index_masked = r_index[mask]
|
||||||
intensities_masked = smoothed_intensities[mask]
|
intensities_masked = smoothed_intensities[mask]
|
||||||
intensities_raw_masked = raw_intensities[mask]
|
|
||||||
min_ecart = np.inf
|
min_ecart = np.inf
|
||||||
best_m = None
|
best_m = None
|
||||||
meilleure_h = None
|
meilleure_h = None
|
||||||
|
@ -214,7 +212,6 @@ def thickness_from_scheludko(lambdas,
|
||||||
|
|
||||||
|
|
||||||
def thickness_for_order0(lambdas,
|
def thickness_for_order0(lambdas,
|
||||||
raw_intensities,
|
|
||||||
smoothed_intensities,
|
smoothed_intensities,
|
||||||
peaks_min,
|
peaks_min,
|
||||||
peaks_max,
|
peaks_max,
|
||||||
|
@ -236,7 +233,6 @@ def thickness_for_order0(lambdas,
|
||||||
lambdas_masked = lambdas[mask]
|
lambdas_masked = lambdas[mask]
|
||||||
r_index_masked = r_index[mask]
|
r_index_masked = r_index[mask]
|
||||||
intensities_masked = smoothed_intensities[mask]
|
intensities_masked = smoothed_intensities[mask]
|
||||||
intensities_raw_masked = raw_intensities[mask]
|
|
||||||
intensities_I_min_masked =intensities_I_min[mask]
|
intensities_I_min_masked =intensities_I_min[mask]
|
||||||
|
|
||||||
min_ecart = np.inf
|
min_ecart = np.inf
|
||||||
|
|
|
@ -34,7 +34,6 @@ def test_minmax(spectrum, expected):
|
||||||
min_peak_prominence=prominence)
|
min_peak_prominence=prominence)
|
||||||
|
|
||||||
thickness_scheludko = thickness_from_scheludko(lambdas,
|
thickness_scheludko = thickness_from_scheludko(lambdas,
|
||||||
raw_intensities,
|
|
||||||
smoothed_intensities,
|
smoothed_intensities,
|
||||||
peaks_min,
|
peaks_min,
|
||||||
peaks_max,
|
peaks_max,
|
||||||
|
|
|
@ -74,7 +74,7 @@ def test_scheludko_4peaks():
|
||||||
min_peak_prominence=prominence)
|
min_peak_prominence=prominence)
|
||||||
|
|
||||||
|
|
||||||
result = thickness_from_scheludko(lambdas, raw_intensities, smoothed_intensities,
|
result = thickness_from_scheludko(lambdas, smoothed_intensities,
|
||||||
peaks_min, peaks_max,
|
peaks_min, peaks_max,
|
||||||
refractive_index=indice,
|
refractive_index=indice,
|
||||||
plot=False)
|
plot=False)
|
||||||
|
@ -99,7 +99,7 @@ def test_scheludko_2peaks():
|
||||||
min_peak_prominence=prominence)
|
min_peak_prominence=prominence)
|
||||||
|
|
||||||
|
|
||||||
result = thickness_from_scheludko(lambdas, raw_intensities, smoothed_intensities,
|
result = thickness_from_scheludko(lambdas, smoothed_intensities,
|
||||||
peaks_min, peaks_max,
|
peaks_min, peaks_max,
|
||||||
refractive_index=indice,
|
refractive_index=indice,
|
||||||
plot=False)
|
plot=False)
|
||||||
|
@ -126,7 +126,7 @@ def test_order0():
|
||||||
min_peak_prominence=prominence)
|
min_peak_prominence=prominence)
|
||||||
|
|
||||||
|
|
||||||
result = thickness_for_order0(lambdas, raw_intensities, smoothed_intensities,
|
result = thickness_for_order0(lambdas, smoothed_intensities,
|
||||||
peaks_min, peaks_max,
|
peaks_min, peaks_max,
|
||||||
refractive_index=indice,
|
refractive_index=indice,
|
||||||
plot=False)
|
plot=False)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue