def test_restrict(self): s = ex.carbon_black() P,Q = util.restrict_isotherm( s.Prel, s.Qads, 0.05, 0.3 ) self.assertTrue( Q.shape == P.shape ) Qads = np.array([4.67017, 4.79068, 4.9767, 5.14414, 5.31144, 5.47106, 5.63297, 5.80559, 5.96663, 6.13574, 6.31214, 6.49764, 6.67154]) Prel = np.array([0.0672921, 0.0796994, 0.0999331, 0.119912, 0.140374, 0.159884, 0.179697, 0.200356, 0.219646, 0.239691, 0.259671, 0.280475, 0.299907]) self.assertTrue( (Qads == Q).all() ) self.assertTrue( (Prel == P).all() )
def test_restrict(self): s = ex.carbon_black() P, Q = util.restrict_isotherm(s.Prel, s.Qads, 0.05, 0.3) self.assertTrue(Q.shape == P.shape) Qads = np.array([ 4.67017, 4.79068, 4.9767, 5.14414, 5.31144, 5.47106, 5.63297, 5.80559, 5.96663, 6.13574, 6.31214, 6.49764, 6.67154 ]) Prel = np.array([ 0.0672921, 0.0796994, 0.0999331, 0.119912, 0.140374, 0.159884, 0.179697, 0.200356, 0.219646, 0.239691, 0.259671, 0.280475, 0.299907 ]) self.assertTrue((Qads == Q).all()) self.assertTrue((Prel == P).all())
from micromeritics import bet, util, plots from micromeritics import isotherm_examples as ex # Setup the raw data for the calculation. # using example isotherm data from Carbon Black analyzed with N2. s = ex.carbon_black() # Do the BET calculation. Then # - show the transform plot # - show the isotherm plot # - print the BET area, C constant, and monolayer quantity adsorbed BET_calc = bet.bet(s.Prel, s.Qads, Pmin = 0.05, Pmax = 0.3, csa = 0.162) plots.plotBETTransform(BET_calc) plots.plotBETIsotherm(BET_calc) plots.addRangeBars(0.05, 0.3) plots.show() print("BET surface area: %.4f cm^3/g STP" % BET_calc.sa) print("BET C: %.4f" % BET_calc.C) print("BET Qm: %.4f cm^3/g STP" % BET_calc.q_m)
from micromeritics import bet, util, plots from micromeritics import isotherm_examples as ex # Setup the raw data for the calculation. # using example isotherm data from Carbon Black analyzed with N2. s = ex.carbon_black() # Do the BET calculation. Then # - show the transform plot # - show the isotherm plot # - print the BET area, C constant, and monolayer quantity adsorbed BET_calc = bet.bet(s.Prel, s.Qads, Pmin=0.05, Pmax=0.3, csa=0.162) plots.plotBETTransform(BET_calc) plots.plotBETIsotherm(BET_calc) plots.addRangeBars(0.05, 0.3) plots.show() print("BET surface area: %.4f cm^3/g STP" % BET_calc.sa) print("BET C: %.4f" % BET_calc.C) print("BET Qm: %.4f cm^3/g STP" % BET_calc.q_m)