DiadFit 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- DiadFit/CO2_EOS.py +20 -4
- DiadFit/CO2_in_bubble_error.py +1 -1
- DiadFit/H2O_fitting.py +11 -11
- DiadFit/_version.py +1 -1
- DiadFit/densimeters.py +10 -1
- DiadFit/diads.py +127 -15
- DiadFit/error_propagation.py +12 -4
- {DiadFit-1.0.0.dist-info → DiadFit-1.0.2.dist-info}/METADATA +3 -3
- {DiadFit-1.0.0.dist-info → DiadFit-1.0.2.dist-info}/RECORD +11 -11
- {DiadFit-1.0.0.dist-info → DiadFit-1.0.2.dist-info}/WHEEL +0 -0
- {DiadFit-1.0.0.dist-info → DiadFit-1.0.2.dist-info}/top_level.txt +0 -0
DiadFit/CO2_EOS.py
CHANGED
@@ -1028,7 +1028,7 @@ def ensure_series(a, b, c):
|
|
1028
1028
|
else:
|
1029
1029
|
c = pd.Series(c)
|
1030
1030
|
|
1031
|
-
return a, b, c
|
1031
|
+
return a.reset_index(drop=True), b.reset_index(drop=True), c.reset_index(drop=True)
|
1032
1032
|
|
1033
1033
|
|
1034
1034
|
def ensure_series_4(a, b, c, d):
|
@@ -1061,7 +1061,7 @@ def ensure_series_4(a, b, c, d):
|
|
1061
1061
|
else:
|
1062
1062
|
d = pd.Series(d)
|
1063
1063
|
|
1064
|
-
return a, b, c, d
|
1064
|
+
return a.reset_index(drop=True), b.reset_index(drop=True), c.reset_index(drop=True), d.reset_index(drop=True)
|
1065
1065
|
|
1066
1066
|
|
1067
1067
|
|
@@ -2064,9 +2064,13 @@ def calculate_entrapment_P_XH2O(*, XH2O, CO2_dens_gcm3, T_K, T_K_ambient=37+273.
|
|
2064
2064
|
|
2065
2065
|
|
2066
2066
|
"""
|
2067
|
+
|
2067
2068
|
XH2O, rho_meas, T_K=ensure_series(a=XH2O, b=CO2_dens_gcm3, c=T_K)
|
2068
2069
|
alpha=XH2O/(1-XH2O)
|
2069
2070
|
|
2071
|
+
# All inputs 194 up to here
|
2072
|
+
|
2073
|
+
|
2070
2074
|
# IF water is lost
|
2071
2075
|
rho_orig_H_loss=rho_meas*(1+alpha*(18/44))
|
2072
2076
|
# IF water isnt lost
|
@@ -2083,11 +2087,23 @@ def calculate_entrapment_P_XH2O(*, XH2O, CO2_dens_gcm3, T_K, T_K_ambient=37+273.
|
|
2083
2087
|
|
2084
2088
|
# calculate density of H2O using EOS
|
2085
2089
|
H2O_dens=calculate_rho_for_P_T_H2O(P_kbar=P_H2O,T_K=T_K_ambient)
|
2090
|
+
H2O_dens=H2O_dens.reset_index(drop=True)
|
2086
2091
|
|
2087
2092
|
# Calculate the bulk density by re-arranging the two volume equations
|
2088
2093
|
nan_mask = H2O_dens==0
|
2089
|
-
|
2090
|
-
|
2094
|
+
|
2095
|
+
# Debugging
|
2096
|
+
|
2097
|
+
|
2098
|
+
|
2099
|
+
|
2100
|
+
rho_orig_no_H_loss=(rho_meas*H2O_dens)/((1-XH2O_mass)*H2O_dens+XH2O_mass*rho_meas)
|
2101
|
+
|
2102
|
+
|
2103
|
+
|
2104
|
+
|
2105
|
+
rho_orig_no_H_loss = np.where(nan_mask, rho_meas, rho_orig_no_H_loss)
|
2106
|
+
|
2091
2107
|
|
2092
2108
|
|
2093
2109
|
|
DiadFit/CO2_in_bubble_error.py
CHANGED
@@ -159,7 +159,7 @@ plot_figure=True, fig_i=0, neg_values=True):
|
|
159
159
|
|
160
160
|
# This is the function doing the work to actually make the simulations for each variable.
|
161
161
|
if error_vol_perc_bub is not None:
|
162
|
-
|
162
|
+
|
163
163
|
|
164
164
|
df_synthetic=propagate_CO2_in_bubble_ind(
|
165
165
|
N_dup=N_dup,
|
DiadFit/H2O_fitting.py
CHANGED
@@ -10,7 +10,7 @@ from dataclasses import dataclass
|
|
10
10
|
from typing import Tuple, Optional
|
11
11
|
from DiadFit.importing_data_files import *
|
12
12
|
from numpy import trapz
|
13
|
-
from scipy.integrate import
|
13
|
+
from scipy.integrate import simpson
|
14
14
|
##
|
15
15
|
def extract_xstal_MI_name(*, files, char_xstal, pos_xstal, char_MI, pos_MI,
|
16
16
|
prefix=True, str_prefix=" ", file_ext='.txt'):
|
@@ -872,30 +872,30 @@ fit_sil='poly', dpi=200):
|
|
872
872
|
ydat_sil=y_corr_sil
|
873
873
|
|
874
874
|
xspace_sil=xdat_sil[1]-xdat_sil[0]
|
875
|
-
area_trap =
|
876
|
-
area_simps =
|
875
|
+
area_trap = trapezoid(y_corr_sil, dx=xspace_sil)
|
876
|
+
area_simps = simpson(y_corr_sil, dx=xspace_sil)
|
877
877
|
# Just the LW area
|
878
878
|
xsil_LW=xdat_sil[(xdat_sil>LW[0]) & (xdat_sil<LW[1])]
|
879
879
|
y_corr_sil_LW=y_corr_sil[(xdat_sil>LW[0]) & (xdat_sil<LW[1])]
|
880
880
|
xspace_sil_LW=xsil_LW[1]-xsil_LW[0]
|
881
|
-
area_trap_LW=
|
882
|
-
area_simp_LW=
|
881
|
+
area_trap_LW=trapezoid(y_corr_sil_LW, dx=xspace_sil_LW)
|
882
|
+
area_simp_LW=simpson(y_corr_sil_LW, dx=xspace_sil_LW)
|
883
883
|
|
884
884
|
|
885
885
|
# Just the HW area
|
886
886
|
xsil_HW=xdat_sil[(xdat_sil>HW[0]) & (xdat_sil<HW[1])]
|
887
887
|
y_corr_sil_HW=y_corr_sil[(xdat_sil>HW[0]) & (xdat_sil<HW[1])]
|
888
888
|
xspace_sil_HW=xsil_HW[1]-xsil_HW[0]
|
889
|
-
area_trap_HW=
|
890
|
-
area_simp_HW=
|
889
|
+
area_trap_HW=trapezoid(y_corr_sil_HW, dx=xspace_sil_HW)
|
890
|
+
area_simp_HW=simpson(y_corr_sil_HW, dx=xspace_sil_HW)
|
891
891
|
|
892
892
|
# MW
|
893
893
|
if MW is not None:
|
894
894
|
xsil_MW=xdat_sil[(xdat_sil>MW[0]) & (xdat_sil<MW[1])]
|
895
895
|
y_corr_sil_MW=y_corr_sil[(xdat_sil>MW[0]) & (xdat_sil<MW[1])]
|
896
896
|
xspace_sil_MW=xsil_MW[1]-xsil_MW[0]
|
897
|
-
area_trap_MW=
|
898
|
-
area_simp_MW=
|
897
|
+
area_trap_MW=trapezoid(y_corr_sil_MW, dx=xspace_sil_MW)
|
898
|
+
area_simp_MW=simpson(y_corr_sil_MW, dx=xspace_sil_MW)
|
899
899
|
|
900
900
|
|
901
901
|
# Plotting what its doing
|
@@ -1155,8 +1155,8 @@ def fit_area_for_water_region(*, path, filename, Spectra=None, config1: water_bc
|
|
1155
1155
|
|
1156
1156
|
|
1157
1157
|
xspace_water=xdat_water[1]-xdat_water[0]
|
1158
|
-
area_trap =
|
1159
|
-
area_simps =
|
1158
|
+
area_trap = trapezoid(y_corr_water, dx=xspace_water)
|
1159
|
+
area_simps = simpson(y_corr_water, dx=xspace_water)
|
1160
1160
|
|
1161
1161
|
|
1162
1162
|
# Plotting what its doing
|
DiadFit/_version.py
CHANGED
DiadFit/densimeters.py
CHANGED
@@ -944,20 +944,29 @@ def merge_fit_files(path):
|
|
944
944
|
|
945
945
|
if os.path.exists(os.path.join(path, 'Weak_Diads.xlsx')):
|
946
946
|
grp1 = pd.read_excel(os.path.join(path, 'Weak_Diads.xlsx'))
|
947
|
+
grp1['Standard']='No'
|
947
948
|
else:
|
948
949
|
grp1 = None
|
949
950
|
|
950
951
|
if os.path.exists(os.path.join(path, 'Medium_Diads.xlsx')):
|
951
952
|
grp2 = pd.read_excel(os.path.join(path, 'Medium_Diads.xlsx'))
|
953
|
+
grp2['Standard']='No'
|
952
954
|
else:
|
953
955
|
grp2 = None
|
954
956
|
|
955
957
|
if os.path.exists(os.path.join(path, 'Strong_Diads.xlsx')):
|
956
958
|
grp3 = pd.read_excel(os.path.join(path, 'Strong_Diads.xlsx'))
|
959
|
+
grp3['Standard']='No'
|
957
960
|
else:
|
958
961
|
grp3 = None
|
962
|
+
|
963
|
+
if os.path.exists(os.path.join(path, 'Std_Diads.xlsx')):
|
964
|
+
grp4 = pd.read_excel(os.path.join(path, 'Std_Diads.xlsx'))
|
965
|
+
grp4['Standard']='Yes'
|
966
|
+
else:
|
967
|
+
grp4 = None
|
959
968
|
|
960
|
-
df2 = pd.concat([grp1, grp2, grp3], axis=0).reset_index(drop=True)
|
969
|
+
df2 = pd.concat([grp1, grp2, grp3, grp4], axis=0).reset_index(drop=True)
|
961
970
|
|
962
971
|
if discard is not None:
|
963
972
|
discard_cols=discard[discard.columns.intersection(df2.columns)]
|
DiadFit/diads.py
CHANGED
@@ -17,8 +17,8 @@ from dataclasses import dataclass
|
|
17
17
|
import matplotlib.patches as patches
|
18
18
|
import warnings as w
|
19
19
|
from tqdm import tqdm
|
20
|
-
from
|
21
|
-
from scipy.integrate import
|
20
|
+
from scipy.integrate import trapezoid
|
21
|
+
from scipy.integrate import simpson
|
22
22
|
from scipy.interpolate import interp1d
|
23
23
|
|
24
24
|
# Allowed models
|
@@ -725,7 +725,7 @@ def plot_peak_params(fit_params,
|
|
725
725
|
def filter_splitting_prominence(*, fit_params, data_y_all,
|
726
726
|
x_cord,
|
727
727
|
splitting_limits=[100, 107],
|
728
|
-
lower_diad1_prom=10, exclude_str):
|
728
|
+
lower_diad1_prom=10, exclude_str=None, str_filt=None):
|
729
729
|
""" Filters Spectra based on approximate splitting, draws a plot showing spectra to discard and those to keep
|
730
730
|
|
731
731
|
Parameters
|
@@ -746,6 +746,12 @@ def filter_splitting_prominence(*, fit_params, data_y_all,
|
|
746
746
|
Only keeps spectra that meet the splitting parameter, and have an absolute
|
747
747
|
diad1 prominence greater than this value (helps filter out other weird spectra)
|
748
748
|
|
749
|
+
exclude_str: str
|
750
|
+
Excludes files with this string.
|
751
|
+
|
752
|
+
str_filt: str
|
753
|
+
Filters just based on string in filename
|
754
|
+
|
749
755
|
Returns
|
750
756
|
--------------
|
751
757
|
fit_params_filt: pd.DataFrame
|
@@ -759,21 +765,30 @@ def filter_splitting_prominence(*, fit_params, data_y_all,
|
|
759
765
|
|
760
766
|
|
761
767
|
"""
|
768
|
+
if str_filt is not None:
|
769
|
+
filt=fit_params['filename'].str.contains(str_filt)
|
762
770
|
|
763
|
-
reas_split=(fit_params['approx_split'].between(splitting_limits[0], splitting_limits[1]))
|
764
|
-
reas_heigh=fit_params['Diad1_abs_prom']>lower_diad1_prom
|
765
|
-
if exclude_str is not None:
|
766
|
-
name_in_file=~fit_params['filename'].str.contains(exclude_str)
|
767
771
|
else:
|
768
|
-
name_in_file=reas_heigh
|
769
772
|
|
770
|
-
|
771
|
-
|
773
|
+
reas_split=(fit_params['approx_split'].between(splitting_limits[0], splitting_limits[1]))
|
774
|
+
reas_heigh=fit_params['Diad1_abs_prom']>lower_diad1_prom
|
775
|
+
|
776
|
+
if exclude_str is not None:
|
777
|
+
name_in_file=~fit_params['filename'].str.contains(exclude_str)
|
778
|
+
else:
|
779
|
+
name_in_file=reas_heigh
|
780
|
+
|
781
|
+
filt=reas_split&reas_heigh&name_in_file
|
782
|
+
|
783
|
+
fit_params_filt=fit_params.loc[filt].reset_index(drop=True)
|
784
|
+
fit_params_disc=fit_params.loc[~(filt)].reset_index(drop=True)
|
772
785
|
|
773
786
|
print('Keeping N='+str(len(fit_params_filt)))
|
774
787
|
print('Discarding N='+str(len(fit_params_disc)))
|
775
788
|
|
776
|
-
|
789
|
+
|
790
|
+
|
791
|
+
# Then apply to get data
|
777
792
|
data_y_filt=data_y_all[:, (filt)]
|
778
793
|
data_y_disc=data_y_all[:, ~(filt)]
|
779
794
|
|
@@ -804,17 +819,111 @@ def filter_splitting_prominence(*, fit_params, data_y_all,
|
|
804
819
|
Diff=np.nanmax(data_y_filt[:, i])-np.nanmin(data_y_filt[:, i])
|
805
820
|
av_prom_Keep=fit_params_filt['Diad1_abs_prom'].iloc[i]
|
806
821
|
prom_filt=prom_filt+av_prom_Keep
|
822
|
+
file=fit_params_filt['filename'].iloc[i]
|
823
|
+
ax2.plot(x_cord+i*5, (data_y_filt[:, i]-np.nanmin(data_y_filt[:, i]))/Diff+i/3, '-b', lw=0.5)
|
824
|
+
yplot=np.quantile((data_y_filt[:, i]-np.nanmin(data_y_filt[:, i]))/Diff+i/3, 0.65)
|
825
|
+
ax2.annotate(str(file), xy=(1450+i*5, yplot),
|
826
|
+
xycoords="data", fontsize=8, bbox=dict(facecolor='white', edgecolor='none', pad=2))
|
827
|
+
|
828
|
+
|
829
|
+
ax2.set_xlim([1250, 1450+i*5])
|
830
|
+
ax2.set_xticks([])
|
831
|
+
ax2.set_yticks([])
|
832
|
+
|
833
|
+
return fit_params_filt.reset_index(drop=True), data_y_filt, fit_params_disc.reset_index(drop=True), data_y_disc
|
834
|
+
|
835
|
+
def filter_by_string(*, fit_params, data_y_all,
|
836
|
+
x_cord,
|
837
|
+
str_filt=None):
|
838
|
+
""" Filters Spectra based on approximate splitting, draws a plot showing spectra to discard and those to keep
|
839
|
+
|
840
|
+
Parameters
|
841
|
+
--------------
|
842
|
+
fit_params: pd.dataframe
|
843
|
+
dataframe of fit parameters from loop_approx_diad_fits
|
844
|
+
|
845
|
+
data_y_all: np.array
|
846
|
+
y coordinates of each spectra from loop_approx_diad_fits, used for plotting visualizatoins
|
847
|
+
|
848
|
+
x_cord: np.array
|
849
|
+
x coordinates of 1 spectra. Assumes all x coordinates the same length
|
850
|
+
|
851
|
+
|
852
|
+
|
853
|
+
str_filt: str
|
854
|
+
Filters just based on string in filename. Keeps files with string in, discards those without.
|
855
|
+
|
856
|
+
Returns
|
857
|
+
--------------
|
858
|
+
fit_params_filt: pd.DataFrame
|
859
|
+
dataframe of fit parameters for spectra to keep
|
860
|
+
data_y_filt: np.array
|
861
|
+
y coordinates of spectra to keep
|
862
|
+
fit_params_disc: pd.DataFrame
|
863
|
+
dataframe of fit parameters for spectra to discard
|
864
|
+
data_y_disc: np.array
|
865
|
+
y coordinates of spectra to discard
|
866
|
+
|
867
|
+
|
868
|
+
"""
|
869
|
+
|
870
|
+
filt=fit_params['filename'].str.contains(str_filt)
|
871
|
+
|
872
|
+
|
873
|
+
fit_params_filt=fit_params.loc[filt].reset_index(drop=True)
|
874
|
+
fit_params_disc=fit_params.loc[~(filt)].reset_index(drop=True)
|
875
|
+
|
876
|
+
print('Keeping N='+str(len(fit_params_filt)))
|
877
|
+
print('Discarding N='+str(len(fit_params_disc)))
|
878
|
+
|
879
|
+
|
880
|
+
|
881
|
+
# Then apply to get data
|
882
|
+
data_y_filt=data_y_all[:, (filt)]
|
883
|
+
data_y_disc=data_y_all[:, ~(filt)]
|
884
|
+
|
885
|
+
intc=800
|
886
|
+
prom_filt=0
|
887
|
+
prom_disc=0
|
888
|
+
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12,5))
|
889
|
+
ax1.set_title('Samples')
|
890
|
+
ax2.set_title('Standards')
|
891
|
+
if sum(~filt)>0:
|
892
|
+
for i in range(0, np.shape(data_y_disc)[1]):
|
893
|
+
av_prom_disc=np.abs(np.nanmedian(fit_params_disc['Diad1_abs_prom'])/intc)
|
894
|
+
Diff=np.nanmax(data_y_disc[:, i])-np.nanmin(data_y_disc[:, i])
|
895
|
+
av_prom_Keep=fit_params_disc['Diad1_abs_prom'].iloc[i]
|
896
|
+
prom_disc=prom_disc+av_prom_disc
|
897
|
+
ax1.plot(x_cord+i*5, (data_y_disc[:, i]-np.nanmin(data_y_disc[:, i]))/Diff+i/3, '-r', lw=0.5)
|
898
|
+
yplot=np.quantile((data_y_disc[:, i]-np.nanmin(data_y_disc[:, i]))/Diff+i/3, 0.65)
|
899
|
+
file=fit_params_disc['filename'].iloc[i]
|
900
|
+
file = file.replace("_CRR_DiadFit", "")
|
901
|
+
ax1.annotate(str(file), xy=(1450+i*5, yplot),
|
902
|
+
xycoords="data", fontsize=8, bbox=dict(facecolor='white', edgecolor='none', pad=2))
|
903
|
+
|
904
|
+
ax1.set_xlim([1250, 1500+i*5])
|
905
|
+
ax1.set_xticks([])
|
906
|
+
ax1.set_yticks([])
|
907
|
+
if sum(filt)>0:
|
908
|
+
for i in range(0, np.shape(data_y_filt)[1]):
|
909
|
+
Diff=np.nanmax(data_y_filt[:, i])-np.nanmin(data_y_filt[:, i])
|
910
|
+
av_prom_Keep=fit_params_filt['Diad1_abs_prom'].iloc[i]
|
911
|
+
prom_filt=prom_filt+av_prom_Keep
|
912
|
+
file=fit_params_filt['filename'].iloc[i]
|
807
913
|
ax2.plot(x_cord+i*5, (data_y_filt[:, i]-np.nanmin(data_y_filt[:, i]))/Diff+i/3, '-b', lw=0.5)
|
914
|
+
yplot=np.quantile((data_y_filt[:, i]-np.nanmin(data_y_filt[:, i]))/Diff+i/3, 0.65)
|
915
|
+
ax2.annotate(str(file), xy=(1450+i*5, yplot),
|
916
|
+
xycoords="data", fontsize=8, bbox=dict(facecolor='white', edgecolor='none', pad=2))
|
808
917
|
|
809
918
|
|
810
919
|
ax2.set_xlim([1250, 1450+i*5])
|
811
920
|
ax2.set_xticks([])
|
812
921
|
ax2.set_yticks([])
|
813
922
|
|
814
|
-
return fit_params_filt, data_y_filt, fit_params_disc, data_y_disc
|
923
|
+
return fit_params_filt.reset_index(drop=True), data_y_filt, fit_params_disc.reset_index(drop=True), data_y_disc
|
815
924
|
|
816
925
|
|
817
|
-
def identify_diad_group(*, fit_params, data_y, x_cord, filter_bool,y_fig_scale=0.1, grp_filter='Weak'):
|
926
|
+
def identify_diad_group(*, fit_params, data_y, x_cord, filter_bool,y_fig_scale=0.1, grp_filter='Weak', str_filt=None):
|
818
927
|
|
819
928
|
"""Sorts diads into two groups. Those meeting the 'filter_bool' criteria, and those not
|
820
929
|
meeting this criteria. Ones meeting the criteria are shown on the left hand plot,
|
@@ -853,6 +962,9 @@ def identify_diad_group(*, fit_params, data_y, x_cord, filter_bool,y_fig_scale=
|
|
853
962
|
|
854
963
|
|
855
964
|
"""
|
965
|
+
if str_filt is not None:
|
966
|
+
filt_name=~fit_params['filename'].str.contains(str_filt)
|
967
|
+
filt_bool=filt_name&filt_bool
|
856
968
|
|
857
969
|
if np.shape(data_y)[1]==0:
|
858
970
|
Group1_df=pd.DataFrame().reindex_like(fit_params)
|
@@ -3835,8 +3947,8 @@ path=None, filename=None, filetype=None,
|
|
3835
3947
|
|
3836
3948
|
|
3837
3949
|
xspace_sil=x_new[1]-x_new[0]
|
3838
|
-
area_trap =
|
3839
|
-
area_simps =
|
3950
|
+
area_trap = trapezoid(Baseline_ysub_sil, dx=xspace_sil)
|
3951
|
+
area_simps = simpson(Baseline_ysub_sil, dx=xspace_sil)
|
3840
3952
|
|
3841
3953
|
|
3842
3954
|
|
DiadFit/error_propagation.py
CHANGED
@@ -331,6 +331,8 @@ error_CO2_dens=0, error_type_CO2_dens='Abs', error_dist_CO2_dens='normal',
|
|
331
331
|
|
332
332
|
# Check for panda Series
|
333
333
|
|
334
|
+
|
335
|
+
|
334
336
|
def convert_inputs_to_series(T_K, error_T_K, CO2_dens_gcm3, error_CO2_dens_gcm3, XH2O, error_XH2O):
|
335
337
|
# Create a list of all inputs
|
336
338
|
inputs = [T_K, error_T_K, CO2_dens_gcm3, error_CO2_dens_gcm3, XH2O, error_XH2O]
|
@@ -341,11 +343,17 @@ def convert_inputs_to_series(T_K, error_T_K, CO2_dens_gcm3, error_CO2_dens_gcm3,
|
|
341
343
|
# Unpack the converted inputs back to their respective variables
|
342
344
|
T_K, error_T_K, CO2_dens_gcm3, error_CO2_dens_gcm3, XH2O, error_XH2O = converted_inputs
|
343
345
|
|
344
|
-
#
|
345
|
-
|
346
|
-
|
347
|
-
|
346
|
+
# Reset index only if the input is a pandas Series
|
347
|
+
T_K = T_K.reset_index(drop=True) if isinstance(T_K, pd.Series) else T_K
|
348
|
+
error_T_K = error_T_K.reset_index(drop=True) if isinstance(error_T_K, pd.Series) else error_T_K
|
349
|
+
CO2_dens_gcm3 = CO2_dens_gcm3.reset_index(drop=True) if isinstance(CO2_dens_gcm3, pd.Series) else CO2_dens_gcm3
|
350
|
+
error_CO2_dens_gcm3 = error_CO2_dens_gcm3.reset_index(drop=True) if isinstance(error_CO2_dens_gcm3, pd.Series) else error_CO2_dens_gcm3
|
351
|
+
XH2O = XH2O.reset_index(drop=True) if isinstance(XH2O, pd.Series) else XH2O
|
352
|
+
error_XH2O = error_XH2O.reset_index(drop=True) if isinstance(error_XH2O, pd.Series) else error_XH2O
|
348
353
|
|
354
|
+
# Return the possibly converted inputs
|
355
|
+
return T_K, error_T_K, CO2_dens_gcm3, error_CO2_dens_gcm3, XH2O, error_XH2O
|
356
|
+
|
349
357
|
|
350
358
|
|
351
359
|
def propagate_FI_uncertainty(sample_ID, CO2_dens_gcm3, T_K, multiprocess='default', cores='default',
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: DiadFit
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.2
|
4
4
|
Summary: DiadFit
|
5
5
|
Home-page: https://github.com/PennyWieser/DiadFit
|
6
6
|
Author: Penny Wieser
|
@@ -9,13 +9,13 @@ License: UNKNOWN
|
|
9
9
|
Platform: UNKNOWN
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
11
|
Classifier: Operating System :: OS Independent
|
12
|
-
Requires-Python: >=3.
|
12
|
+
Requires-Python: >=3.8
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
Requires-Dist: pandas
|
15
15
|
Requires-Dist: numpy <2
|
16
16
|
Requires-Dist: matplotlib
|
17
17
|
Requires-Dist: scikit-learn
|
18
|
-
Requires-Dist: scipy
|
18
|
+
Requires-Dist: scipy >1.6
|
19
19
|
Requires-Dist: lmfit >=1.1.0
|
20
20
|
Requires-Dist: tqdm
|
21
21
|
Requires-Dist: python-docx
|
@@ -1,6 +1,6 @@
|
|
1
|
-
DiadFit/CO2_EOS.py,sha256=
|
2
|
-
DiadFit/CO2_in_bubble_error.py,sha256=
|
3
|
-
DiadFit/H2O_fitting.py,sha256=
|
1
|
+
DiadFit/CO2_EOS.py,sha256=H2_th8DP5m9oJ-IZCg9XncuOogQy_AE8ihiT-4zlIOo,74170
|
2
|
+
DiadFit/CO2_in_bubble_error.py,sha256=Nq5YEf2oa2rWRreEPXl2lEA86NXOGvll0Gca2AOu_RE,21224
|
3
|
+
DiadFit/H2O_fitting.py,sha256=ZOLWL8j7HQYKlx1-ISm1twvH34jhrGFwukU8ElRj0Dw,43920
|
4
4
|
DiadFit/Highrho_polyfit_data.pkl,sha256=7t6uXxI-HdfsvreAWORzMa9dXxUsnXqKBSo1O3EgiBw,1213
|
5
5
|
DiadFit/Highrho_polyfit_dataUCB_1117_1400.pkl,sha256=oBOarETLyfq2DJhYGQrJofgHjvRMLamE6G2b7EE5m-Y,1213
|
6
6
|
DiadFit/Highrho_polyfit_dataUCB_1117_1447.pkl,sha256=OG1qip_xU1hl3xp3HC8e9_2497-KYEV3Xz3mx0gdJ4Y,1213
|
@@ -29,21 +29,21 @@ DiadFit/Mediumrho_polyfit_data_CCMR.pkl,sha256=U6ODSdurqS0-lynm1MG1zktg8NuhYRbrY
|
|
29
29
|
DiadFit/Mediumrho_polyfit_data_CMASS.pkl,sha256=SBy1pIdqCAF9UtB9FLNTuD0-tFyD7swwJppdE2U_FsY,1557
|
30
30
|
DiadFit/Psensor.py,sha256=C2xSlgxhUJIKIBDvUp02QaYRs5QsIqjGGRMP25ZLRZ0,10435
|
31
31
|
DiadFit/__init__.py,sha256=F-HjhCYKL_U8PfiH8tZ9DUCkxPvo6lAslJS4fyvxkbY,1148
|
32
|
-
DiadFit/_version.py,sha256=
|
32
|
+
DiadFit/_version.py,sha256=X0PLLhZnpIdwlS5nJADl6Y4cVKJ40aHv2hvu4kkgAGQ,295
|
33
33
|
DiadFit/argon_lines.py,sha256=vtzsuDdEgrAmEF9xwpejpFqKV9hKPS1JUYhIl4AfXZ0,7675
|
34
34
|
DiadFit/cosmicray_filter.py,sha256=a45x2_nmpi9Qcjc_L39UA9JOd1NMorIjtTRGnCdG3MU,23634
|
35
35
|
DiadFit/densimeter_fitting.py,sha256=zEyCwq1zDV3z6-MIu-eZqgp3YQPUGqwZiKczN3-22LQ,8247
|
36
|
-
DiadFit/densimeters.py,sha256=
|
36
|
+
DiadFit/densimeters.py,sha256=p3jY9709vKegCfWZIwoU4Rt5jFfwJJQobLb71AXUxAY,55250
|
37
37
|
DiadFit/density_depth_crustal_profiles.py,sha256=b072IJaoGDydKpqWWKoJHeXKIkcIXxKf82whpvLAPpw,17761
|
38
|
-
DiadFit/diads.py,sha256=
|
39
|
-
DiadFit/error_propagation.py,sha256=
|
38
|
+
DiadFit/diads.py,sha256=RWFesTt_W52u_-N9Cr2VtHuKrR038XKf3-dDLx5CNYY,180888
|
39
|
+
DiadFit/error_propagation.py,sha256=ipYI-Nwjv4f0sBdUiGeYV4wLcLGUXzKRrquNnc72d3c,50620
|
40
40
|
DiadFit/importing_data_files.py,sha256=0Cx_CKJZR8efssMzQit0aPRh_rsjQFGXgLtI285FW_k,41961
|
41
41
|
DiadFit/lookup_table.csv,sha256=Hs1tmSQ9ArTUDv3ymEXbvnLlPBxYUP0P51dz7xAKk-Q,2946857
|
42
42
|
DiadFit/lookup_table_noneg.csv,sha256=HelvewKbBy4cqT2GAqsMo-1ps1lBYqZ-8hCJZWPGfhI,3330249
|
43
43
|
DiadFit/molar_gas_proportions.py,sha256=_oEZn_vndHGDaXAjZ6UU8ycujBx_qB2KGCGqZSzotQU,3389
|
44
44
|
DiadFit/ne_lines.py,sha256=6z9oo4lgh0iYv1mkSscgzCt_Pe4gQTnquG99pR6cJS8,63811
|
45
45
|
DiadFit/relaxifi.py,sha256=hHzRsJPQIVohYi3liy9IQJpaomgsa2zbLQmhqkpdfrI,31549
|
46
|
-
DiadFit-1.0.
|
47
|
-
DiadFit-1.0.
|
48
|
-
DiadFit-1.0.
|
49
|
-
DiadFit-1.0.
|
46
|
+
DiadFit-1.0.2.dist-info/METADATA,sha256=EjFCY1urZhZ_wc2Wxb8f0NC8gNgV-JaFY1ShqDBpnoQ,1174
|
47
|
+
DiadFit-1.0.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
48
|
+
DiadFit-1.0.2.dist-info/top_level.txt,sha256=yZC6OFLVznaFA5kcPlFPkvhKotcVd-YO4bKxZZw3LQE,8
|
49
|
+
DiadFit-1.0.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|