core¶
|
Performs BET analysis on isotherm data for all relative pressure ranges. |
|
Performs single point BET analysis on an isotherm data set for all relative pressure ranges. |
Checks that n(p-po) aka check1 is increasing. |
|
|
Checks that y intercept of the BET plot’s linear regression is positive. |
|
Checks that nm, amount adsorbed in the monolayer, is in the range of data points used in BET analysis. |
|
Checks that relative pressure is consistent. |
|
Checks that relative pressure ranges contain a minium number of data |
|
Calls all check functions and combines their masks into one “rouqerol mask”. |
|
Prints a single specific surface area answer from the valid relative pressure range with either the lowest error or most number of points. |
-
beatmap.core.
bet
(bet_results)[source]¶ Performs BET analysis on isotherm data for all relative pressure ranges.
This function performs BET analysis of any relative pressure range where the starting relative pressure is less than the ending relative pressure.
Results of the analysis are written to arrays, the indexes of the arrays correspond to the starting and ending relative pressure.
eg the specific surface area value with the indicies [3,9] is the specific surface area for the relative pressure range that begins with the 4th data point and ends with the 10th.
Arrays of results are stored in the bet_results named tuple.
- Parameters
bet_results (namedtuple) –
Contains all information required for BET analysis. Results of BET analysis are also stored in this named tuple. Relevant fields for BET anaylsis are:
bet_results.raw_data
(dataframe) : experimental isotherm data.bet_results.a_o
(flaot) : the cross sectional area of the
adsorbate molecule, in square angstrom.
- Returns
bet_results – Contains the results of BET analysis. Relevant fields are:
bet_results.ssa
(array) : 2D array of specific surface area
values, in m^2/g, indicies correspond to first and last datapoint used in the analysis.
bet_results.c
(array) : 2D array of BET constants values,
indicies correspond to first and last datapoint used in the analysis.
bet_results.nm
(array) : 2D array of monolayer adsorbed
amounts, in mol/g, indicies correspond to first and last datapoint used in the analysis.
bet_results.err
(array) : 2D array of average error between
a datapoint and the theoretical BET isotherm. Indicies correspond to first and last datapoint used in the analysis.
bet_results.slope
(array) : 2D array of slope values for the
BET plot trendline. Indicies correspond to first and last datapoint used in the analysis.
bet_results.intercept
(array) : 2D array of intercept values
for the BET plot trendline. Indicies correspond to first and last datapoint used in the analysis.
bet_results.r
(array) : 2D array of r values for the BET plot
trendline. Indicies correspond to first and last datapoint used in the analysis.
- Return type
namedtuple
-
beatmap.core.
single_point_bet
(df, a_o)[source]¶ Performs single point BET analysis on an isotherm data set for all relative pressure ranges. Can be used to check for agreement between BET and single point BET.
- Parameters
bet_results (namedtuple) –
Contains all information required for BET analysis. Results of BET analysis are also stored in this named tuple. Relevant fields for single point BET anaylsis are:
bet_results.raw_data
(dataframe) : experimental isotherm data.bet_results.a_o
(flaot) : the cross sectional area of the
adsorbate molecule, in square angstrom.
- Returns
singlept_results –
Contains the results of single point BET analysis. Relevant fields are:
singlept_results.ssa
(array) : 2D array of specific surface
area values, in m^2/g, indicies correspond to first and last datapoint used in the analysis.
singlept_results.nm
(array) : 2D array of monolayer adsorbed
amounts, in mol/g, indicies correspond to first and last datapoint used in the analysis.
- Return type
namedtuple
-
beatmap.core.
check_1
(df)[source]¶ Checks that n(p-po) aka check1 is increasing.
This is a necessary condition for linearity of the BET dataset.
- Parameters
df (dataframe) – dataframe of imported experimental isothermal adsorption data.
- Returns
check1 – array of 1s and 0s where 0 corresponds to relative pressure ranges where n(p-po) isn’t consistently increasing with relative pressure, ie ranges that fail this check.
- Return type
array
-
beatmap.core.
check_2
(intercept)[source]¶ Checks that y intercept of the BET plot’s linear regression is positive.
- Parameters
intercept (array) – 2D array of y-intercept values.
- Returns
check2 – array of 1s and 0s where 0 corresponds to relative pressure ranges where the y-intercept is negative or zero, ie ranges that fail this check.
- Return type
array
-
beatmap.core.
check_3
(df, nm)[source]¶ Checks that nm, amount adsorbed in the monolayer, is in the range of data points used in BET analysis.
- Parameters
df (dataframe) – dataframe of imported experimental isothermal adsorption data
nm (array) – 2D array of BET specific amount of adsorbate in the monolayer, the coordinates of the array corresponding to relative pressures, units [moles / gram].
- Returns
check3 – array of 1s and 0s where 0 corresponds to relative pressure ranges nm is not included in the range of experimental n values, ie ranges that fail this check.
- Return type
array
-
beatmap.core.
check_4
(df, nm, slope, intercept)[source]¶ Checks that relative pressure is consistent.
The relative pressure corresponding to nm is found from linear interpolation of the experiemental data.
A second relative pressure is found by setting n to nm in the BET equation and solving for relative pressure.
The two relative pressures are compared and must agree within 10% to pass this check.
- Parameters
df (dataframe) – dataframe of imported experimental isothermal adsorption data
nm (array) – 2D array of BET specific amount of adsorbate in the monolayer, the coordinates of the array corresponding to relative pressures, units [moles / gram]
slope (array) – 2D array of slope values resulting from linear regression applied to relevant experimental data
intercept (array) – 2D array of y-intercept values resulting from linear regression applied to relevant experimental data
- Returns
check4 – array of 1s and 0s where 0 corresponds to relative pressure values that do not agree within 10%, ie ranges that fail this check
- Return type
array
-
beatmap.core.
check_5
(df, points=5)[source]¶ - Checks that relative pressure ranges contain a minium number of data
points.
- Parameters
df (dataframe) – dataframe of imported experimental isothermal adsorption data
points (int) – minimum number of data points required for BET analysis to be considered valid default value is 5
- Returns
check5 – array of 1s and 0s where 0 corresponds to ranges of experimental data that contain less than the minimum number of points
- Return type
array
-
beatmap.core.
rouq_mask
(bet_results, check1=True, check2=True, check3=True, check4=True, check5=True, points=5)[source]¶ Calls all check functions and combines their masks into one “rouqerol mask”.
- Parameters
bet_results (namedtuple) – Contains all the necessary arrays to be passed to check 1-5.
check1 (boolean) – True means the will be evalued, False means the check will not be evaluated.
check2 (boolean) – True means the will be evalued, False means the check will not be evaluated.
check3 (boolean) – True means the will be evalued, False means the check will not be evaluated.
check4 (boolean) – True means the will be evalued, False means the check will not be evaluated.
check5 (boolean) – True means the will be evalued, False means the check will not be evaluated.
points (int) – The minimum number of experimental data points for a relative pressure interval to be considered valid.
- Returns
rouq_mask – Contains arrays for the result of each check and a masked array that is the result of all selected checks. Fields of the named tuple are:
-
rouq_mask.mask
(MaskedArray) : object where invalid BET results are masked.-``rouq_mask.check1 (array) : array of 1s and 0s where 0 corresponds failing check1 -``rouq_mask.check2 (array) : array of 1s and 0s where 0 corresponds failing check2 -``rouq_mask.check3 (array) : array of 1s and 0s where 0 corresponds failing check3 -``rouq_mask.check4 (array) : array of 1s and 0s where 0 corresponds failing check4 -``rouq_mask.check5 (array) : array of 1s and 0s where 0 corresponds failing check5
- Return type
namedtuple
-
beatmap.core.
ssa_answer
(bet_results, rouq_mask, criterion='error')[source]¶ Prints a single specific surface area answer from the valid relative pressure range with either the lowest error or most number of points.
- Parameters
bet_results (named tuple) –
bet_results.ssa
contains the array of specific surface values.rouq_mask (named tuple) –
rouq_mask.mask
contains the mask used to remove invaid specific surface area values from consideration.criterion (string) – Used to specify the criterion for a final specific surface area answer, either ‘error’ or ‘points’. Defaults to ‘error’.