Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahshi committed Feb 26, 2024
1 parent 6df6a4e commit 21d2466
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions docs/examples/transmission_ftir/PyIRoGlass_Transmission.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
"source": [
"# Concentrations\n",
"\n",
"We now want to convert all those peak heights (with uncertainties) to concentrations (with uncertainties), by applying the Beer-Lambert Law. We do so by using the Concentration_Output function, which takes in these parameters and samples over N samples for a secondary MCMC: \n",
"We now want to convert all those peak heights (with uncertainties) to concentrations (with uncertainties), by applying the Beer-Lambert Law. We do so by using the calculate_concentrations function, which takes in these parameters and samples over N samples for a secondary MCMC: \n",
"\n",
"- DF_OUTPUT: Output from Run_All_Spectra\n",
"- N: Number of samples for this MCMC\n",
Expand All @@ -440,10 +440,9 @@
"P_ROOM = 1 # Bar\n",
"\n",
"N = 500000 # MCMC samples\n",
"DENSITY_EPSILON, MEGA_SPREADSHEET = pig.calculate_concentrations(DF_OUTPUT, N, CHEMISTRY, THICKNESS, T_ROOM, P_ROOM)\n",
"concentrations_df = pig.calculate_concentrations(DF_OUTPUT, N, CHEMISTRY, THICKNESS, T_ROOM, P_ROOM)\n",
"\n",
"DENSITY_EPSILON.to_csv('DensityEpsilon.csv')\n",
"MEGA_SPREADSHEET.to_csv('H2OCO2.csv')"
"concentrations_df.to_csv('H2OCO2.csv')"
]
},
{
Expand All @@ -461,14 +460,14 @@
},
"outputs": [],
"source": [
"MEGA_SPREADSHEET"
"concentrations_df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There are a few things to note. Each column with the suffix _MEAN represents the mean value, _BP represents the best-parameter from MCMC, and _STD represents the standard deviation. We recommend the use of the 'H2OT_MEAN', 'H2OT_STD', 'CO2_MEAN', and 'CO2_STD' columns. The columns with the suffix _S2N show the signal-to-noise ratio of the NIR peaks, and the columns with the prefix ERR_ just process this information, returning a '-' if the peaks are meaningful and a '*' if the signal is too low. \n",
"There are a few things to note. Each column with the suffix _MEAN represents the mean value, _BP represents the best-parameter from MCMC, and _STD represents the standard deviation. We recommend the use of the 'H2OT_MEAN', 'H2OT_STD', 'CO2_MEAN', and 'CO2_STD' columns. The columns with the suffix _STN show the signal-to-noise ratio of the NIR peaks, and the columns with the prefix ERR_ just process this information, returning a '-' if the peaks are meaningful and a '*' if the signal is too low. \n",
"\n",
"Concentrations of $\\mathrm{H_2O}$ depend on whether your sample is saturated or not. If your sample is unsaturated (marked by H2OT_3550_SAT == '-'), the column 'H2OT_MEAN'=='H2OT_3550_M'. If your sample is saturated (marked by H2OT_3550_SAT == '*'), the column of 'H2OT_MEAN'=='H2Om_1635_BP'+'OH_4500_M'. The $\\mathrm{H_2O_{t, 3550}}$ peak cannot be used, given potential nonlinearity in the Beer-Lambert Law. See the discussion of this handling of speciation in the paper. \n"
]
Expand All @@ -477,22 +476,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Here is also all the other relevant information for calculating these concentrations. All the density and molar absorptivity information is stored in this dataframe. \n",
"\n",
"The column 'Density' contains the densities used for the final concentration. The values between 'Density' and 'Density_Sat' will be different if the sample is saturated, showing the difference in densities when using variable concentrations of $\\mathrm{H_2O_m}$. \n",
"\n",
"'Tau' and 'Na/Na+Ca' calculate the compositional parameters required for determining molar absorptivity. All calculated molar absorptivities and their uncertainties (sigma_ prefix) from the inversion are provided in the dataframe. \n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"DENSITY_EPSILON"
"'Tau' and 'Eta' calculate the compositional parameters required for determining molar absorptivity. All calculated molar absorptivities and their uncertainties (sigma_ prefix) from the inversion are provided in the dataframe. \n"
]
},
{
Expand Down

0 comments on commit 21d2466

Please sign in to comment.