catalight.analysis.tools.calculate_X_and_S
- catalight.analysis.tools.calculate_X_and_S(expt, reactant, target_molecule)
Calculate conversion and selectivity for analyzed GC data.
- Parameters:
expt (Experiment) – Experiment object which has data and has been analyzed (i.e. has avg_conc.csv etc.)
reactant (str) – String identity of reactant molecule to track. Must match what exists in the calibration file exactly.
target_molecule (str) – String identity of the target to use when calculating selectivity. Must match what exists in the calibration file exactly.
- Returns:
DataFrame with column header [‘Conversion’, ‘Selectivity’, ‘Error’] Error is one standard deviation.
- Return type:
Notes
Conversion and error are calculated in fraction assuming a total mole balance of 1. Error calculations are based off the error propagation formula, resulting in the equations below:
\[ \begin{align}\begin{aligned}&X = 1 - \frac{C_{reactant}}{C_{total}}\\&S = \frac{C_{target}}{C_{total}*X}\\&\sigma_{C_{tot}} = \sqrt{\sigma_{Molecule A}^{2} + ... + \sigma_{Molecule N}^{2}}\\&\sigma_{X} = \sqrt{(\frac{\sigma_{C_{reactant}}} {C_{total}})^{2} + (\frac{\sigma_{C_{total}}*C_{reactant}} {C_{total}^{2}})^{2}}\\&\sigma_{S} = \sqrt{(\frac{\sigma_{C_{target}}} {C_{total}*X})^{2} + (\frac{\sigma_{C_{total}}*C_{target}} {C_{total}^{2}*X})^{2} + (\frac{\sigma_{X}*C_{target}} {C_{total}*X^{2}})^{2}}\end{aligned}\end{align} \]