pygaps Release 1.2.0

Size: px
Start display at page:

Download "pygaps Release 1.2.0"

Transcription

1 pygaps Release Feb 19, 2018

2

3 Contents 1 Contents Overview Installation Quickstart Manual Examples Reference Contributing Authors Changelog Indices and tables Python Module Index 179 i

4 ii

5 Welcome to the documentation for the pygaps framework. Contents 1

6 2 Contents

7 CHAPTER 1 Contents 1.1 Overview pygaps (Python General Adsorption Processing Suite) is a framework for adsorption data analysis written in python 3. status docs license tests package Features Advanced adsorption data import and manipulation Routine analysis such as BET surface area, t-plot, alpha-s method 3

8 Pore size distribution calculations for mesopores (BJH, Dollimore-Heal) Pore size distribution calculations for micropores (Horvath-Kawazoe) Pore size distribution calculations using DFT kernels Isotherm modelling (Henry, Langmuir, DS/TS Langmuir, etc..) IAST calculations for binary and multicomponent adsorption Isosteric heat of adsorption calculations Parsing to and from multiple formats such as Excel, CSV and JSON An sqlite database backend for storing and retrieving data Simple methods for isotherm graphing and comparison Documentation For more info, as well as a complete manual and reference visit: Most of the examples in the documentation are actually in the form of Jupyter Notebooks which are turned into webpages with nbsphinx. You can find them for download in: Installation The easiest way to install pygaps is from the command line. Make sure that you have numpy, scipy, pandas and matplotlib already installed. pip install pygaps On Windows, Anaconda/Conda is your best bet since it manages environments for you. First create a new environment and use conda to install the dependencies (or start with one that already has a full instalation). Then use pip inside your environment. conda create -n py36 python=3.6 numpy scipy pandas matplotlib activate py36 pip install pygaps Alternatively, to install the development branch, clone the repository from Github. Then install the package with setuptools, either in regular or developer mode git clone # then install setup.py install # or developer mode setup.py develop 4 Chapter 1. Contents

9 1.1.4 Development If you have all the python environments needed to run the entire test suite, use tox. To run the all tests run: tox Note, to combine the coverage data from all the tox environments run: Windows Other set PYTEST_ADDOPTS=--cov-append tox PYTEST_ADDOPTS=--cov-append tox For testing only with the environment you are currently on, run pytest instead: py.test --cov Alternatively, you can depend on travisci for the testing, which will be slower overall but should have all the environments required Questions? I m more than happy to answer any questions. Shoot me an at paul.iacomi@univ-amu or find me on some social media. For any bugs found, please open an issue or, If you feel like you can do the fix yourself, submit a pull request. It ll make my life easier This also applies to any features which you think might benefit the project. 1.2 Installation Command line The installation process should take care of the dependencies for you. If using pip all you need to do is at the command line: pip install pygaps If on windows, we recommend using the Anaconda/Conda environment, as it preinstalls most required dependencies as well as making managing environments a breeze. Alternatively, to install the development branch, clone the repository from Github. Then install the package with setuptools, either in regular or developer mode git clone // then install setup.py install 1.2. Installation 5

10 // or developer mode setup.py develop Dependencies The main packages that pygaps depends on are The common data science packages numpy, scipy, pandas and matplotlib The CoolProp backend for physical properties calculation (can also be connected to REFPROP if locally available) The xlwings package for parsing to and from Excel files The pyiast package used to be a required dependency, but has since been integrated in the pygaps framework. More info about pyiast can be found at C. Simon, B. Smit, M. Haranczyk. pyiast: Ideal Adsorbed Solution Theory (IAST) Python Package. Computer Physics Communications. (2015) 1.3 Quickstart Creating an isotherm First, to use pygaps in a python or jupyter project, import it. In [1]: import pygaps Selected 0 samples Selected 23 adsorbates The backbone of the framework is the PointIsotherm class. This class stores the isotherm data, isotherm properties such as material and adsorbate with which it was measured, as well as providing easy interaction with the framework calculations. There are several ways to create a PointIsotherm object: direct method a json string or file parsing excel files parsing csv files from an sqlite database If using a direct method, the data must first be in the form of a pandas.dataframe. The DataFrame should have at least two columns: the pressures at which each point was recorded, and the loadings for each point. Other data columns, such as calorimetry data, magnetic field strengths, or other simultaneous measurements are also supported. In [2]: import pandas isotherm_data = pandas.dataframe({ 'pressure': [0.1, 0.2, 0.3, 0.4, 0.5, 0.45, 0.35, 0.25, 0.15, 0.05], 'loading': [0.1, 0.2, 0.3, 0.4, 0.5, 0.5, 0.4, 0.3, 0.15, 0.05] }) The isotherm must can also have other properties which are passed in at creation. There are four required parameters: the sample name, the sample batch, the adsorbent used and the temperature (in K) at which the data was recorded. 6 Chapter 1. Contents

11 In [3]: isotherm = pygaps.pointisotherm( isotherm_data, loading_key='loading', pressure_key='pressure', ) sample_name= 'Carbon', sample_batch = 'X1', adsorbate = 'N2', t_exp = 77, The loading_key and pressure_key parameters specify which column in the DataFrame contain which data of the isotherm. By default, the loading is read in mmmol/g and the pressure is read in bar, although these settings can be changed. For easier Isotherm retrieval, pygaps also comes with a variety of parsers. Here we can use the JSON parser to get an isotherm previously saved on disk: In [4]: with open(r'data/carbon_x1_n2.json') as f: isotherm = pygaps.pointisotherm.from_json(f.read()) To see a summary of the isotherm as well as a graph, use the included function: In [5]: isotherm.print_info() Experimental isotherm Material: Takeda 5A Batch: Test Adsorbate used: N2 Isotherm temperature: K Isotherm type: Isotherme Machine: Triflex User: PI Activation temperature: C Units: Unit for loading: mmol/g Unit for pressure: bar Other properties: 1.3. Quickstart 7

12 Now that the PointIsotherm is created, we are ready to do some analysis Isotherm analysis with pygaps The framework has several isotherm analysis tools which are commonly used to characterise porous materials such as: BET surface area the t-plot method the alpha s method mesoporous PSD (pore size distribution) calculations 8 Chapter 1. Contents

13 microporous PSD calculations DFT kernel fitting PSD methods isosteric heat of adsorption calculation From a PointIsotherm object, it s easy to start a characterisation. For example, to get a dictionary with all the parameters of the tplot analysis, use: In [6]: result_dict = pygaps.t_plot(isotherm) import pprint pprint.pprint(result_dict) {'results': [{'adsorbed_volume': , 'area': , 'corr_coef': , 'intercept': , 'section': [84, 85, 86, 87, 88, 89, 90], 'slope': }], 't_curve': array([ , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ])} If in an interactive environment, such as ipython or Jupyter, it is useful to see the details of the calculation directly. To do this, increase the verbosity of the method and use matplotlib to display the automatically generated graph: In [7]: import matplotlib.pyplot as plt result_dict = pygaps.area_bet(isotherm, verbose=true) plt.show() The slope of the BET line: s = The intercept of the BET line: i = C = 368 Amount for a monolayer: n = mol/unit Minimum pressure point chosen is 0.01 and maximum is BET surface area: a = 1111 m²/unit 1.3. Quickstart 9

14 Depending on the method, different parameters can be passed to change the way the calculations are performed. For example, if a mesoporous size distribution is desired using the Dollimore-Heal method on the adsorption branch of the isotherm, assuming the pores are cylindrical, one side open and that adsorbate thickness can be described by a Halsey-type thickness curve, the code will look like: In [8]: result_dict = pygaps.mesopore_size_distribution( isotherm, 10 Chapter 1. Contents

15 psd_model='dh', branch='adsorption', pore_geometry='cylinder', thickness_model='halsey', verbose=true, ) plt.show() For more information on how to use each method, check the detailed manual Isotherm modelling with pygaps The framework comes with functionality to model point isotherm data with common isotherm models such as: Henry Langmuir Double/Triple site Langmuir Temkin Wilson - Vacancy Solution Theory The modelling is done through the ModelIsotherm class. The class is similar to the PointIsotherm class, and shares the same ability to store parameters. However, instead of data, it stores model coefficients for the model it s describing. To create a ModelIsotherm, the same parameters dictionary / pandas DataFrame procedure can be used. But, assuming we ve already created a PointIsotherm object, we can use it to instantiate the ModelIsotherm instead. To do this we use the class method: In [9]: model_iso = pygaps.modelisotherm.from_pointisotherm(isotherm, model='henry') A minimisation procedure will then attempt to fit the model s parameters to the isotherm points. If successful, the ModelIsotherm is returned. In case the model which best fits the data is desired, the class method can also be passed a bool which allows the ModelIsotherm to select the best fitting model. This means that all models available will be calculated and the best one will be returned and will of course take more processing power. In [10]: model_iso = pygaps.modelisotherm.from_pointisotherm(isotherm, guess_model=true, verbose=true 1.3. Quickstart 11

16 Attempting to model using Henry Model Henry success, rmse is Attempting to model using Langmuir Model Langmuir success, rmse is Attempting to model using DSLangmuir Model DSLangmuir success, rmse is Attempting to model using TSLangmuir Modelling using TSLangmuir failed Attempting to model using Quadratic Model Quadratic success, rmse is Attempting to model using BET Modelling using BET failed Attempting to model using TemkinApprox Model TemkinApprox success, rmse is Attempting to model using Toth Modelling using Toth failed Attempting to model using Jensen-Seaton Modelling using Jensen-Seaton failed Best model fit is Quadratic c:\users\pauli\onedrive\documents\phd documents\python\pygaps\src\pygaps\calculations\models_isotherm )**self.params['c'])**(1 / self.params['c']) More advanced settings can also be specified, such as the optimisation model to be used in the optimisation routine or the initial parameter guess. To print the model parameters use the internal print function. The calculation of loading made with the model can be accessed by using the loading function. In [11]: # Prints isotherm parameters and model info model_iso.print_info() Simulated isotherm Material: Takeda 5A Batch: Test Adsorbate used: N2 Isotherm temperature: K Isotherm type: Isotherme Machine: Triflex User: PI Activation temperature: C Units: Unit for loading: mmol/g Unit for pressure: bar Other properties: Quadratic identified model parameters: M = Ka = Kb = RMSE = Chapter 1. Contents

17 In [12]: # Returns the loading at 1 bar calculated with the model model_iso.loading_at(1.0) Out[12]: In [13]: # Returns the loading in the range 0-1 bar calculated with the model pressure = [0.1,0.5,1] model_iso.loading_at(pressure) Out[13]: array([ , , ]) Graphing pygaps makes graphing both PointIsotherm and ModelIsotherm objects easy to facilitate visual observations, inclusion in publications and consistency. Plotting an isotherm is as simple as: 1.3. Quickstart 13

18 In [14]: import matplotlib.pyplot as plt pygaps.plot_iso([isotherm, model_iso], branch=['ads']) plt.show() Many settings can be specified to change the look and feel of the graphs. More settings can be found in the manual. 14 Chapter 1. Contents

19 1.4 Manual The Isotherm classes Overview In pygaps, an isotherm can be represented in two ways: as a PointIsotherm() object or as a ModelIsotherm() object. These two classes have many common methods and attributes, but they differ in the way they hold the relationship between pressure and loading: The PointIsotherm class is a collection of discrete points, stored in a pandas.dataframe object. It can contain both an adsorption and desorption branch, which are determined automatically at instantiation or specified by the user. The ModelIsotherm class is a collection of parameters which are used to describe a model of adsorption behaviour. It can only model a single branch of the data, either adsorption or desorption. Both classes are derived from the Isotherm() class. This class holds all descriptions of the experiment, such as the adsorbate used, the material name and the temperature at which the isotherm was taken. These parameters are inherited in the two child isotherm objects, therefore, the user should not have to use this class directly. To work with pygaps isotherms check out the following topics: Creating an isotherm Accessing isotherm data Isotherm units, modes and basis Ensuring isotherm uniqueness Exporting an isotherm A detailed explanation of each isotherm method is written in the docstrings and can be accessed in the reference. Only a general overview will be given here. Creating an isotherm Creating a PointIsotherm There are several ways to create a PointIsotherm object: Raw construction, from a dictionary with parameters and a pandas.dataframe. This is the most extensible way to create a PointIsotherm, as parameters can be manually specified. A json string or file. This can be done either using the isotherm_from_json() function, or with the from_json() class method, which is just a wrapper around the other for convenience. Parsing an excel file of a standard format. See parsing from excel. Parsing a csv file of a standard format. See parsing from csv. From an sqlite database: pygaps contains functionality to store and retrieve constructed isotherms in a sqlite database. See database. This section will explain how to create an isotherm from raw data. First, a pandas.dataframe should be created to hold the data. The DataFrame should have at least two columns: the pressures at which each point was recorded, and the loadings for each point. Other data columns, such as calorimetry data, magnetic field strengths, or other simultaneous measurements are also supported Manual 15

20 isotherm_data = pandas.dataframe({ 'pressure' : [1, 2, 3, 4, 5, 3, 2], 'loading' : [1, 2, 3, 4, 5, 3, 2], 'enthalpy' : [15, 15, 15, 15, 15, 15, 15], 'xrd_peak_1' : [0, 0, 1, 2, 2, 1, 0], }) The code does its best to attempt to guess whether the data passed is part of an adsorption branch, desorption branch or has both. It does this by looking at whether pressure is increasing or decreasing between two consecutive points. It then marks the particular branch internally. If the data isn t well conditioned, this functionality will likely not produce good results. In this case, the user can specify whether the data passed in is an adsorption or desorption branch by using the branch argument. What s more, the user can specify where the branches are located by passing an iterable as the branch parameter. See more in the reference. Caution: The data in the columns is assumed to be free of errors and anomalies. Negative pressures or loadings, noisy signals or erroneous points may give undefined behaviour. The other information that needs to be passed to the constructor is related to the parameters of the isotherm. This is information about the material the isotherm was measured on, the adsorbate which was used, as well as data about the temperature, units used and so on. The isotherm parameters must include: The loading_key and pressure_key are required parameters specifying which column in the DataFrame contain which data of the isotherm. If other columns are to be stored in the isotherm object, put their names in a list and pass it as the other_keys parameter The sample name (sample_name) The sample batch (sample_batch) The adsorbate used (adsorbate) The temperature, in K at which the data was recorded (t_exp) The isotherm units can also be specified here. If not specified, the framework will assume default values: absolute pressure in bar and the amount adsorbed in terms of mmol per g (molar basis loading per adsorbent mass basis). Options are: The pressure_mode parameter specifies if the pressure is relative or absolute. If not passed, the pressure is assumed to be absolute. The loading_basis parameter specifies if the amount adsorbed is defined in terms of moles, volume or mass. If not passed, it is assumed to be molar. The adsorbent_basis parameter specifies if the quantity of adsorbent is defined in terms of moles, volume or mass. If not passed, it is assumed to be on a mass basis. The pressure_unit specifies the unit the pressure is measured in, if applicable. It can be bar, Pa, kpa, etc. and it defaults to bar. The loading_unit specifies the unit the amount adsorbed is in. Depending on the basis it can be a mass, volume or molar unit. By default, the loading is read in mmol. The adsorbent_unit specifies the unit the adsorbent itself is in. Depending on the basis it can be a mass, volume or molar unit. By default, the adsorbent is is read in g. 16 Chapter 1. Contents

21 Other user parameters can be passed as well, and will be stored in the isotherm object. Some are named, and can be accessed directly, such as sample activation temperature (t_act), the person who measured the isotherm (user) and the machine on which the isotherm was recorded (machine). Unknown parameters which are passed are also stored, in an internal dictionary called isotherm_parameters. For a complete list of named internal parameters, see Isotherm reference, the PointIsotherm reference and the ModelIsotherm reference. Will these components, an isotherm can now be created. An example instantiation is below, with explanations. point_isotherm = pygaps.pointisotherm( # First the pandas.dataframe with the points # and the keys to what the columns represent. isotherm_data, loading_key='loading', pressure_key='pressure', other_keys=['enthalpy', 'xrd_peak_1'], # The loading column # The pressure column # The columns containing the other data # Some of the unit parameters can be specified # if desired. pressure_mode='absolute', pressure_unit='bar', adsorbent_basis='mass', adsorbent_unit='kg', loading_basis='mass', loading_unit='g', # Working in absolute pressure # with units of bar # Working on an adsorbent mass basis # with units of kg # Working on a loading mass basis # with units of g # Finally the isotherm description parameters # must be passed. ) 'sample_name' : 'carbon', # Required 'sample_batch' : 'X1', # Required 'adsorbate' : 'nitrogen', # Required 't_exp' : 77, # Required 't_act' : 150, # Recognised / named 'user' : 'John', # Recognised / named 'DOI' : '10.000/mydoi', # Unknown / user specific 'something' : 'something', # Unknown / user specific Creating a ModelIsotherm To create a ModelIsotherm, one can use either raw data, in a process similar to the PointIsotherm creation above or, if a PointIsotherm is already created, it can be used to generate a model. ModelIsotherm creation from raw data is almost identical to the PointIsotherm creation. The same data and parameters can be used, but with a few other options: The model parameter specifies which model to use to attempt to fit the data. The branch parameter will specify which isotherm branch (adsorption or desorption) will be represented by the model, as both cannot be used at the same time. It defaults to the adsorption branch. The param_guess specifies the initial model parameter guesses where optimisation should start. It is optional, and will be automatically filled unless the user specifies it Manual 17

22 The optimization_method parameter tells scipy.optimise which optimisation method to use. If blank, will default to "Nelder-Mead" Finally, the verbose parameter can be used to increase the amount of information printed during the model fitting procedure. Useful for debugging. Note: The ModelIsotherm cannot be used to model tertiary data. Therefore, only loading and pressure can be used internally. Any other columns in the DataFrame will be ignored. The code to generate a ModelIsotherm is then: point_isotherm = pygaps.pointisotherm( # First the pandas.dataframe with the points # and the keys to what the columns represent. isotherm_data, loading_key='loading', pressure_key='pressure', # The loading column # The pressure column # Now the model details can be specified model='henry', branch='ads', param_guess={"kh" : 2} verbose='true', # Want to fit using the Henry model # on the adsorption branch # from an initial guess of 2 for the constant # and want increased verbosity. # Some of the unit parameters can be specified # if desired. pressure_mode='absolute', pressure_unit='bar', adsorbent_basis='mass', adsorbent_unit='kg', loading_basis='mass', loading_unit='g', # Working in absolute pressure # with units of bar # Working on an adsorbent mass basis # with units of kg # Working on a loading mass basis # with units of g # Finally the isotherm description parameters # must be passed. ) 'sample_name' : 'carbon', # Required 'sample_batch' : 'X1', # Required 'adsorbate' : 'nitrogen', # Required 't_exp' : 77, # Required 't_act' : 150, # Recognised / named 'user' : 'John', # Recognised / named 'DOI' : '10.000/mydoi', # Unknown / user specific 'something' : 'something', # Unknown / user specific ModelIsotherms can also be constructed from PointIsotherms and vice-versa. The model can also be guessed automatically. For more info on isotherm modelling read the section of the manual. 18 Chapter 1. Contents

23 Accessing isotherm data Once an isotherm is created, it is useful to see is a visual representation of the isotherm. The isotherm classes contain a print_info function which will display the isotherm parameters, as well as a graph of the data. PointIsotherm print_info() ModelIsotherm print_info() To access the isotherm data, one of several functions can be used. There are individual methods for each data type: pressure, loading and other_data. The first two are applicable to both PointIsotherms and ModelIsotherms. While PointIsotherm methods return the actual discrete data, ModelIsotherms use their internal model to generate data with the characteristics required. For loading: PointIsotherm loading() and ModelIsotherm loading() For pressure: PointIsotherm pressure() and ModelIsotherm pressure() For tertiary data columns: PointIsotherm other_data() All data-specific functions can return either a pandas.series object, or a numpy array, depending on the parameters passed to it. Other optional parameters can specify the unit, the mode/basis, the branch the data is returned in as well as a particular range the data should be selected in. For example: # Will return the loading points of the adsorption part of the # isotherm in the range if cm3 STP isotherm.loading( branch='ads', loading_unit='cm3 STP', min_range = 0.5, max_range = 0.9, ) The other_data function is built for accessing user-specific data stored in the isotherm object. Its use is similar to the loading and pressure functions, but the column of the DataFrame where the data is held should be specified in the function call as the key parameter. It is only applicable to the PointIsotherm object. # Will return the enthalpy points of the desorption part of the # isotherm in the range if cm3 STP as an indexed # pandas.series isotherm.other_data( 'enthalpy', branch = 'des', min_range = 0.5, max_range = 0.9, indexed = True, ) For the PointIsotherm, a special data() function returns all or a branch of the internal pandas.dataframe. This is not as useful for processing, and also non-applicable to the ModelIsotherm object, but can be used to inspect the data directly or obtain the initial DataFrame that was used to construct it. # Will return the pandas.dataframe in the PointIsotherm # containing the adsorption branch isotherm.data(branch = 'ads') 1.4. Manual 19

24 Besides functions which give access to the internal datapoints, the isotherm object can also return the value of pressure and loading at any point specified by the user. To differentiate them from the functions returning internal data, the functions have _at in their name. In the ModelIsotherm class, the internal model is used to calculate the data required. In the PointIsotherm class, the functions rely on an internal interpolator, which uses the scipy.interpolate module. To optimize performance working with isotherms, the interpolator is constructed only on the units the isotherm is in. If the user requests the return values in a different unit or basis than the interpolator, they will be converted in the requested unit or basis after interpolation. Conversion is slower than direct interpolator access, therefore, if a large number of requests are to be made in a different unit or basis, it is better to first convert the entire isotherm data in the required mode using the conversion functions. The point methods are: For loading: PointIsotherm loading_at() and ModelIsotherm loading_at() For pressure: PointIsotherm pressure_at() and ModelIsotherm pressure_at() The methods take parameters that describe the unit/mode of both the input parameters and the output parameters. isotherm.loading_at( 1, pressure_unit = 'atm', branch='des', loading_unit='mol', adsorbent_mode='mass', adsorbent_unit='g', ) # the pressure is passed in atmospheres (= 1 atm) # use the desorption branch of the isotherm # return the loading in mol # return the adsorbent in mass basis # with a unit of g Caution: Interpolation can be dangerous. pygaps does not implicitly allow interpolation outside the bounds of the data, although the user can force it to by passing an interp_fill parameter to the interpolating functions, usually if the isotherm is known to have reached the maximum adsorption plateau. Otherwise, the user is responsible for making sure the data is fit for purpose. Converting isotherm units, modes and basis The PointIsotherm class also includes methods which can be used to convert the internal data permanently to a new state. This is useful in certain cases, like when you want to export the isotherm in a converted excel or json form. To understand how units work in pygaps, see this section. If what is desired is instead a slice of data in a particular format, it is easier to get it directly via the data access functions above. The conversion functions are: convert_loading() will permanently convert the unit or basis loading of the isotherm, for example from molar in mmol to mass in g convert_pressure() will permanently convert the unit or mode of pressure, for example from bar to atm convert_adsorbent() will permanently convert the adsorbent units or basis, for example from a mass basis in g to a mass basis in kg These conversion functions also recreate the internal interpolator to the particular unit and basis set requested. An example of how to convert the pressure from an relative mode into an absolute mode, with units of atm: isotherm.convert_pressure( mode_to='absolute', unit_to='atm' ) 20 Chapter 1. Contents

25 Note: The ModelIsotherm model parameters cannot be converted permanently to new states (although the data can still be obtained in that state by using the data functions). For fast calculations, it is better to first convert the data in the format required in a PointIsotherm, then generate the ModelIsotherm. In order for pygaps to correctly convert between some modes and basis, the user might have to take some extra steps to provide the required information for these conversions. Converting to relative pressures To convert an absolute pressure in a relative pressure, the critical pressure of the gas at the experiment temperature must be known. Of course this conversion only works when the isotherm is measured in a subcritical regime. To calculate the critical pressure, pygaps relies on the CoolProp library. Therefore, the name of the gas in a format CoolProp understands must be passed to the CoolProp API. pygaps does this by having an internal list of adsorbates, which is loaded from the database at the moment of import. The logical steps follows are: User requests conversion from absolute to relative pressure for an isotherm object The adsorbate name is taken from the isotherm parameter and matched against the name of an adsorbate in the internal list If the adsorbate is found, the CoolProp name of the adsorbate is retrieved CoolProp calculates the critical point pressure for the adsorbate The relative pressure is calculated by dividing by the critical point pressure If using common gasses, the user should not be worried about this process, as the list of adsorbates is stored in the internal database. However, if a new adsorbate is to be used, the user should add it to the master list themselves. For more info on this see the Adsorbate class manual Converting loading basis For loading basis conversions, the relationship between the two bases must be known. Between a mass and a volume basis, density of the adsorbent is needed and between mass and molar basis, the specific molar mass of the adsorbent is required. For each specific adsorbate, these properties are also calculated using CoolProp. The molar mass is independent of any variables, while the density is a function of temperature. Here, it is assumed that the density is that of the gas density, and therefore converting an isotherm to a volumetric loading basis gives you the volume that the gas adsorbed would occupy at ambient temperature. Converting adsorbent basis For adsorbent basis, the same properties (density and molar mass) are required, depending on the conversion requested. Here, these properties are specific to each material and cannot be calculated. Therefore, they have to be specified by the user. Similar to the list of adsorbates described above, pygaps includes a list of samples, stored as Sample objects. This is populated at import-time from the database. It is this list from where the required properties are retrieved. To specify the properties, the user must create a Sample instance, populate it with the density value and the molar mass, and then upload it either to the internal list or the internal database. For more info on this see the Sample class manual 1.4. Manual 21

26 Ensuring isotherm uniqueness After its construction, each PointIsotherm generates an id. This id is supposed to be a fingerprint of the isotherm and should be unique to each object. The id string is actually an md5 hash of the isotherm parameters and data. The id can then be used, both internally for database storage or for identification purposes. Internal logic is as follows: After isotherm instantiation, the isotherm object calls the json converter and obtains a string of itself in json format The hashlib.md5 function is used to obtain a hash of the json string The hash is saved in the internal id parameter and the instantiation is complete Any internal change in the isotherm, such as changing the sample activation temperature, adding a new member in the data dictionary or converting/deleting the isotherm datapoints will lead to the id to be regenerated from the new data. This should be taken into account if writing a function that would modify a large number of isotherms or if repeatedly modifying each isotherm. It can be read directly from the isotherm using the following code but should never be directly modified. point_isotherm.id Note: The ModelIsotherm class does not currently contain an ID. Therefore it cannot be checked for uniqueness. Exporting an isotherm To export an isotherm, pygaps provides several choices to the user: Converting the isotherm in a JSON format, using the isotherm_to_json() function Converting the isotherm to a CSV file, using the isotherm_to_csv() function Converting the isotherm to an Excel file, using the isotherm_to_xl() function (of course only valid if Excel is installed on the system) Uploading the isotherm to a sqlite database, either using the internal database or a user-specified external one. For more info on interacting with the sqlite database see the respective section of the manual. More info can be found on the respective parsing pages of the manual The Adsorbate class Overview In order for many of the calculations included in pygaps to be performed, properties of the adsorbate used to measure isotherm must be known. To make the process as simple and as painless as possible, the Adsorbate class is provided. Each isotherm must contain a required property (string) called adsorbate. The adsorbate class also contains a property called name. If the two are identical, this connects the isotherm object and the particular adsorbate class associated to it. Each time an adsorbate property is needed, pygaps looks in the main adsorbate list (pygaps.adsorbate_list) for an object which corresponds to the isotherm.adsorbate property. This list is populated as import-time with the adsorbates stored in the internal database. The user can also add their own adsorbate to the list, or upload it to the database for permanent storage. 22 Chapter 1. Contents

27 For a complete list of methods and individual descriptions look at the Adsorbate reference. Creating an Adsorbate The creation process of an adsorbate is similar to that of other pygaps classes, done by directly passing the parameters. Some parameters are strictly required for instantiation, while others are recognised and can then be accessed by class members. All other parameters passed are saved as well in an internal dictionary called properties. An example of how to create an adsorbate: my_adsorbate = pygaps.adsorbate( name = 'butane', formula = 'C4H10', common_name = 'butane', saturation_pressure = 3, carbon_number = 4, ) # Required # Required # Recognised, Required for CoolProp interaction # Recognised # Unknown / user specific To view a summary of the sample properties, the standard python print function can be used. print(my_adsorbate) Adsorbate class methods The Adsorbate class has methods which allow the properties of the adsorbate to be either calculated using the CoolProp or REFPROP backend or retrieved as a string from the internal dictionary. The properties which can be calculated are: Molar Mass Saturation Pressure Surface Tension Liquid Density Gas Density For example, for the Adsorbate created above, to get the vapour pressure at 25 degrees in bar. my_adsorbate.saturation_pressure(298, unit='bar') 2.8 Caution: The properties calculated are only valid if the backend equation of state is accurate enough. Be aware of the limitations of CoolProp and REFPROP. The calculate boolean can also be set to False, to return the value that is present in the properties dictionary. Here the value is static and the temperature and unit must be known by the user. my_adsorbate.saturation_pressure(298, calculate=false) 3 For all the adsorbate methods, see the Adsorbate reference 1.4. Manual 23

28 Adsorbate management A selection of the most common adsorbates used in experiments is already stored in the internal database. At importtime, they are automatically loaded into memory and stored in pygaps.adsorbate_list. This should be enough for most uses of the framework. To retrieve an adsorbate from the list, use the adsorbate class method with the name as the parameter: my_adsorbate2 = pygaps.adsorbate.from_list('co2') The user can also generate their own adsorbates, or modify the ones that are in memory. # To store in the main list pygaps.adsorbate_list.append(my_adsorbate) To permanently store a custom adsorbate for later use, the user can upload it to the database. For info on how to do this, check out the sqlite section of the manual The Sample class Overview While the isotherm classes only contain the name and batch of the sample they are measured on, the user might want to store a list of samples in the database, as well as to add other information. This can range from the date of synthesis, the material density, the machine used to make the measurement, etc. For this case, pygaps provides the Sample class. The isotherm required properties of sample_name and sample_batch are used to connect an Isotherm instance to a specific Sample. The adsorbate class also contains two properties called name and batch which should be identical for a successful match. Each time an adsorbate property is needed, pygaps looks in the main sample list (pygaps.sample_list) for an object which corresponds to the criteria above. This list is populated as import-time with the samples stored in the internal database. The user can also add their own sample to the list, or upload it to the database for permanent storage. For a complete list of methods and individual descriptions look at the Sample reference. Creating a Sample To create an instance of the Sample class, the sample parameters are passed directly. The parameters must contain a value for name and batch, with the rest of the parameters being optional. An example of how to create a sample: my_sample = pygaps.sample( name='carbon', batch='x1', owner='test User', type='powder', density=1, treatment='acid etching' ) # Required # Required # Recognised # Recognised # Recognised # Unknown / User specific To view a summary of the sample properties, the standard python print function can be used. print(my_sample) 24 Chapter 1. Contents

29 Sample management In pygaps, the samples can be stored in the internal sqlite database. At import-time, the list of all samples is automatically loaded into memory and stored in pygaps.sample_list. The easiest way to retrieve a sample from the list is to use the from_list() class method. It takes the sample name and sample batch as parameters. my_sample2 = pygaps.sample.from_list('carbon', 'X1') At first use the database will be empty. To populate the database with samples, the user should create the samples first and then upload them to the list for temporary storage, or to database for permanent storage. # To store in the main list pygaps.sample_list.append(my_sample) For more info, check out the sqlite section of the manual Data import and export Overview Besides the raw method of creating an isotherm which is explained in detail in this section of the manual, there are other options on how to import or export isotherms. A json string or file. Parsing an excel file of a standard format. Parsing a csv file of a standard format. From an sqlite database: pygaps contains functionality to store and retrieve constructed isotherms in a sqlite database. Sqlite parsing Since pygaps includes an internal sqlite database, isotherms which are imported can be saved for later use, as well as samples, adsorbates, contacts etc. The sqlite functionality is an extensive part of the framework, and it has its own section of the manual. JSON parsing Importing and exporting isotherms in a JSON format is a great alternative to a CSV or XML file and is the recommended pygaps way of sharing isotherms. The JSON format has several advantages of the others, such as being a standard for REST APIs, ease of reading and near-universal parsing capabilities, not to mention the ease of extensibility afforded by the structure. Caution: The JSON format is, by definition, unsorted. Therefore, even though pygaps sorts the keys alphabetically before returning the string, one should not rely on their order. The framework provides two functions for JSON strings: Import an isotherm from JSON: isotherm_from_json() Export an isotherm to JSON: isotherm_to_json() 1.4. Manual 25

30 Assuming we have an isotherm which was previously created, use the following code to convert it to a JSON string. An example JSON isotherm can be found here. json_string = pygaps.isotherm_to_json(my_isotherm) To convert the json back into an isotherm, use the from function. my_isotherm = pygaps.isotherm_from_json(json_string) Or alternatively with the class method: my_isotherm = pygaps.pointisotherm.from_json(json_string) For more info about JSON parsing, check out the jsoninterface reference. Excel parsing The isotherms can also be imported or exported in an Excel format, if required. This is done with the help of the xlwings python package and is, of course, only available on the systems where Excel is already installed. An example excel isotherm can be found here. The framework provides two functions for Excel files: Import an isotherm from Excel: isotherm_from_xl() Export an isotherm to Excel: isotherm_to_xl() To export an isotherm to an Excel file, pass the isotherm object, as well as the path where the excel file should be created. # create the path filename = 'myisotherm.xlsx' path = 'C:\\' + filename # export the isotherm pygaps.isotherm_to_xl(my_isotherm, path) To convert the excel back into an isotherm, use the from function. my_isotherm = pygaps.isotherm_from_xl(path) For more info about Excel parsing, check out the excelinterface reference. CSV parsing CSV files can also be used as a convenient storage for isotherms. However, the format is not as flexible as the alternatives. The CSV files created will have all the isotherm properties as initial headers, followed by a data section which includes all the data in the isotherm. An example csv isotherm can be found here. To export an isotherm to an CSV file, pass the isotherm object, as well as the path where the file should be created. # create the path filename = 'my_isotherm.csv' path = 'C:\\' + filename 26 Chapter 1. Contents

31 # export the isotherm pygaps.isotherm_to_csv(my_isotherm, path) To convert the file back into an isotherm, use the from function. my_isotherm = pygaps.isotherm_from_csv(path) For more info about CSV parsing, check out the csvinterface reference Adsorbent characterisation Overview The main purpose behind the pygaps framework is to allow standard isotherm characterisation techniques to be carried out in bulk for high throughput testing, as well as to disconnect adsorption data processing from the machine used to record it. The framework currently provides the following functionality for material characterisation: BET surface area area_bet Langmuir surface area area_langmuir The t-plot method tplot The α s method alphas PSD (pore size distribution) calculations Mesoporous PSD calculations function mesopore_size_distribution() with the module containing the individual model references: pygaps.calculations.psd_mesoporous Microporous PSD calculations function micropore_size_distribution() with the module containing the individual model references: psd_microporous DFT kernel fitting PSD function dft_size_distribution() with the module containing the individual model references: psd_dft Isosteric heat of adsorption calculation isosteric_heat Initial Henry constant calculation initial_henry Initial enthalpy of adsorption calculation (from isotherms with enthalpy data) initial_enthalpy More info about each function and its usage can be found on the respective page. Caution: Before using the provided characterisation functions, make sure you are aware of how units work and how the backend calculates adsorbate properties. Characterisation examples Check out the ipython notebooks in the examples section 1.4. Manual 27

32 1.4.6 Isotherm modelling Overview In adsorption, a model is a physical or empirical relationship between adsorbate pressure and its loading. Therefore it can be expressed as a function: n = f(p,...) Many types of models have been developed which attempt to describe the phenomenon of adsorption. While none can accurately describe all situations, different behaviours, interactions and pressure ranges, the data can be fitted reliably if a suitable model is chosen. It is left to the best judgement of the user when to apply a specific model. Modelling in pygaps In pygaps, the ModelIsotherm() is the class which contains all the model parameters. While it is instantiated using discrete data, it does not store it directly. Another principal difference from the PointIsotherm class is that, while the former can contain both the adsorption and desorption branch of the physical isotherm, the latter contains a model for only one branch, determined at initialisation. Currently the models implemented are: Henry: henry Langmuir: langmuir Double Site Langmuir: dslangmuir Triple Site Langmuir: tslangmuir BET: bet Quadratic: quadratic Temkin Approximation: temkinapprox Toth: toth Jensen-Seaton: jensenseaton Wilson VST: wvst Flory-Huggins VST: fhvst For an explanation of each model, visit its respective reference page. Custom models can also be added to the list if you are willing to write them. See the procedure below. Working with models A ModelIsotherm can be created from raw values, as detailed in the isotherms section. However, for most use case scenarios, the user will want to create a ModelIsotherm starting from a previously created PointIsotherm class. To do so, the class includes a specific method, from_pointisotherm(), which allows a PointIsotherm to be used. An example is: 28 Chapter 1. Contents

33 model_isotherm = pygaps.modelisotherm.from_pointisotherm( point_isotherm, branch='ads' model='henry', ) Alternatively, the guess_model parameter allows for the ModelIsotherm to attempt to fit some of the available models and then return the best fitting one. This mode should be used carefully, as there s no guarantee that the the best fitting model is the one with any physical significance. It it also worth noting that, since all available models are first calculated, this option will take significantly more resources than simply specifying the model manually. As a consequence, some models which require a lot of overhead, or whose loading must be calculated numerically, such as the virial model, have been excluded from this option. An example: model_isotherm = pygaps.modelisotherm.from_pointisotherm( point_isotherm, branch='des' guess_model=true, ) Once the a ModelIsotherm is generated, it can be used as a regular PointIsotherm, as it contains the same common methods. Some slight differences exist: ModelIsotherms do not contain the data function, as they contain no data. Instead the user can access the model.params property, to get a dictionary of the calculated model parameters. The loading and pressure functions will return equidistant points over the whole range of the isotherm instead of returning actual datapoints. While loading is calculated directly in most cases, in others it has to be computed using numerical fitting methods. Depending on the model, the minimisation may or may not converge. Comparing models and data The ModelIsotherms created can easily be plotted using the same function as PointIsotherms. For example, to compare graphically a model and an experimental isotherm: pygaps.plot_iso([model_isotherm, point_isotherm]) One may notice that the loading is calculated at different pressure points from the PointIsotherm. This is done to keep the plotting function general. If the user wants the pressure points to be identical, a separate approach is needed. First, a new PointIsotherm must be created from the ModelIsotherm. This essentially uses the internal model of the ModelIsotherm isotherm to calculate loading at the points the user specifies, then save them in a DataFrame. This can be achieved with the from_modelisotherm() method. The class method takes as parameters a ModelIsotherm, as well as a pressure_points keyword. This can be used to specify the array of points where the loading is calculated. If a PointIsotherm is passed instead, the loading is calculated at each of the points of the isotherm. # Create the model isotherm model_isotherm = pygaps.modelisotherm.from_pointisotherm( point_isotherm, guess_model=true, ) # Now create a new PointIsotherm from the model new_point_isotherm = pygaps.pointisotherm.from_modelisotherm( 1.4. Manual 29

34 ) model_isotherm, pressure_points=point_isotherm # Direct comparison is now possible pygaps.plot_iso([new_point_isotherm, point_isotherm]) Modelling examples Check it out in the ipython notebook in the examples section Custom models Custom models can be implemented as well. In the calculations/models_isotherm folder, there is a model template (model.py) which contains the functions which should be inherited by a custom model. The things to be specified are the following: The model name. A dictionary with the model parameters (params). A function that returns a default guess for the model parameters (default_guess()). A fitting function that determines the model parameters starting from the loading and pressure data (fit()). Alternatively, the template fitting function can be used if inherited. Functions that return the loading and pressure calculated from the model parameters (loading(pressure) and pressure(loading)). These can be calculated analytically or numerically. A function which returns the spreading pressure, if the model is to be used for IAST calculations (spreading_pressure(pressure)). This can be found in the mod- Once the model is written, it should be added to the list of usable models. els/isotherm init.py file. Don t forget to write some tests to make sure that the model works as intended. You can find the current parametrised tests in tests/calculations/test_models_isotherm.py Ideal Adsorbed Solution Theory Overview By using the Ideal Adsorbed Solution Theory (IAST), the adsorption behaviour of gas mixtures can be predicted from pure component isotherms. The main IAST code was written by Cory Simon 1, and was then incorporated in pygaps. A very good explanation of the method, complete with use cases and recommendations can still be found on the pyiast documentation With the inclusion of the source code, several changes have been introduced, to improve the usability of the method and to conform it to the rest of the code. A tutorial of IAST within pygaps follows Simon, B. Smit, M. Haranczyk. pyiast: Ideal Adsorbed Solution Theory (IAST) Python Package. Computer Physics Communications. (2015) 30 Chapter 1. Contents

35 IAST calculations in pygaps To use the IAST functionality, a list of pure component isotherms is needed. The isotherms can be either: A ModelIsotherm class, where the model will be used for the calculation of spreading pressure. Some models cannot be used for IAST calculations. A PointIsotherm class, where the spreading pressure calculation will use interpolated data. The original pyiast functions still exist, as iast() and reverse_iast(). They can be used to determine the adsorbed fraction of each adsorbate given their partial pressures, or vice-versa. To use: isotherms = [iso1, iso2, iso3] partial_pressures = [0.1, 2, 0.5] iast_loadings = pygaps.iast(isotherms, partial_pressures) Since IAST is often used for binary mixture adsorption prediction, several new functions have been introduced which make it easier to do common calculations and generate graphs: iast_binary_svp() is a function to calculate the selectivity of a known composition mixture as a function of pressure. For example, this will plot selectivities over a pressure range of 0.01 to 10 of an equimolar mixture of methane and ethane: import matplotlib.pyplot as plt partial_pressures = [0.5, 0.5] pressure_range = numpy.linspace(0.01, 10, 30) result_dict = pygaps.iast_binary_svp([ch4, c2h6], partial_pressures, pressure_range, verbose=true, ) plt.show() iast_binary_vle() is a function to calculate the gas-adsorbed equilibrium at a constant pressure, over the entire range of molar fractions. For example, this will plot the gas-adsorbed equilibrium for all molar fractions at a pressure of 2 of methane in ethane: import matplotlib.pyplot as plt result_dict = pygaps.iast_binary_vle([ch4, c2h6], 2, verbose=true) plt.show() IAST example Check it out in the ipython notebook in the examples section for a demonstration Manual 31

36 1.4.8 Plotting Overview While the user can of course take the isotherm data and generate their own customised plots, pygaps includes a few plotting functions which make it easier for standard plots to be generated. The main plotting tool is in the plot_iso() function which handles the plotting of isotherms. Some common use-case scenarios for the functionality are: Visualising the data after isotherm instantiation. Quickly comparing several isotherms. Checking the overlap of a model isotherm and the point data. Generating graphs for a publication. The function can take many parameters which will modify the graph style, colours etc. The function also accepts keywords to specify the unit, pressure mode and basis of the graphs. A complete list of parameters can be found in the reference. The function also returns the matplotlib figure and ax, to allow for further customisation for the resulting plot. Examples Check it out in the ipython notebook in the examples section Sqlite database Overview The framework provides capabilities to interact with an sqlite database, in order to store objects such as isotherms, samples, adsorbates and so on. The database was initially envisioned as a centralised data storage for the MADIREL Laboratory in Marseilles. To generalize the concept for a this framework, the database has been simplified to what the authors consider a bare bones, but still extensible, functionality. Suggests for further improvements are welcome. Note: For most purposes, the internal database is adequate for storage and retrieval. However, it can be difficult to locate it on the disk, and, depending on the amount of data it stores, it can grow to a considerable size. Consider using a separate database file. Database structure The database is configured to use foreign keys, in order to prevent data redundancy and to enforce some error checking. An example is connecting the isotherm to an adsorbate which already exists in the database. This will make sure that no stored isotherm has an unknown or misspelled adsorbate but it also means that some groundwork is required before uploading the first isotherm. A diagram of the database schema can be seen below: 32 Chapter 1. Contents

37 Database methods All the functions which interact with a database, take the database path as their first argument. If the internal database is to be used, the parameter passed should be the pygaps.database constant. There are a few types of database functions: Adsorbate management functions Sample management functions. PointIsotherm management functions, here called experiment Functions which manage the sources table. This table is supposed to have a list of laboratories, papers or any similar source where the sample is from Functions which manage the contacts table. This table is used for both sample connections (for example who is the sample responsible, the synthesiser, the paper author, etc...) and for experiment connections (who performed the experiment, who is the simulation author, etc...) 1.4. Manual 33

38 Functions which manage the machines table. This table is supposed to store a list of the machines where the experiments could be performed. A complete list of methods can be found in the sqliteinterface reference. Note: For now, ModelIsotherms cannot be stored in the database. Database example Check it out in the ipython notebook in the examples section Blank database creation The internal database is already created and usable when pygaps is installed. If the user decides to have an external database, they can either copy the internal database (located in the /pygaps/database directory) or generate an empty one using the db_create command. import pygaps.utilities.sqlite_db_creator as creator creator.db_create(path_to_database) Units in pygaps Overview When computers work with physical data, units are always a variable that introduces confusion. This page attempts to explain how pygaps handles units and other such real world concepts such as relative pressure and mass or volume basis. Units can be specified for the following properties: Isotherm pressure Adsorbate loading, or the amount of gas adsorbed Adsorbent quantity, or the amount of material on which the adsorption takes place An explanation follows of the concepts follows. Pressure For the isotherm pressure, some of the units which can be specified are: bar, atm, Pa, etc. Another option is having the pressure represented as relative pressure. In adsorption terms, relative pressure is a dimensionless value which is obtained by dividing the absolute pressure by the critical pressure / vapour pressure of the adsorbent at the measurement temperature. Relative pressure only has meaning when the isotherm is recorded in a sub-critical regime. In order to calculate it, a info of the specific adsorbate is required. This info is obtained internally using an equation of state from either CoolProp or REFPROP. Pressure conversions are handled by the c_pressure() function. 34 Chapter 1. Contents

39 Adsorbate loading Adsorbate loading refers to the quantity of gas (adsorbate) which is contained in the material on which the isotherm is measured. Currently pygaps does not differentiate between excess and total amount adsorbed. The adsorbate loading is usually represented in mmol or cm3 STP, both of which are representations of a molar basis. Sometimes it is useful if, instead of a mole basis, the loading is represented in terms of mass or volume. pygaps allows for both unit and basis conversions. For these conversions, properties such as molar mass and density of the adsorbate are required. This info is obtained internally using an equation of state from either CoolProp or REFPROP. Loading conversions are handled by the c_loading() function. Adsorbent quantity Adsorbent quantity refers to the amount of material that the adsorption takes place on. The scientific community regularly refers to a mass basis, while a volumetric basis is more important in industry where adsorbent bed design sizing is required. pygaps allows the basis to be changed to either mass, volume or molar. Depending on the conversion basis, the density or molar mass of the sample is needed and should be provided by the user. To specify this in a sample, check out the Sample manual. Adsorbent conversions are handled by the c_adsorbent() function. Low-level convert The way units are converted under the hood is through the use of dictionaries to store conversion factors between the different unit types. The user can use the functions directly by importing the pygaps.utilities. unit_converter module. An example pressure conversion: from pygaps.utilities.unit_converter import c_pressure c_pressure(1, mode_from='absolute', unit_from='bar', mode_from='absolute', unit_to='pa') An example loading conversion: from pygaps.utilities.unit_converter import c_loading c_loading(1, mode_from='molar', unit_from='mol', mode_from='mass', unit_to='mg') An example pressure conversion: from pygaps.utilities.unit_converter import c_adsorbent c_adsorbent(1, mode_from='mass', unit_from='g', mode_from='volume', unit_to='cm3') 1.4. Manual 35

40 High-level convert In regular usage, the framework handles units for the user, with no need to use the low-level functions. At raw isotherm creation, the units can be specified through the use of keywords. From the creation of the isotherm, it internally keeps the units it was created in. In order to access the data in a different unit than specified at instantiation, most methods can accept the same keywords. The isotherm internal data can also be permanently converted into another unit, pressure mode or basis. This is not normally required, but can be done if the isotherm is to be exported in different units. To do this, check out this section of the manual. How units impact characterisation and modelling Most characterisation methods automatically take the required form of the units without the user having to convert it beforehand. Therefore, if for example the BET area function is called, the conversion will be made automatically in order to return the surface area in square metres. The basis of the adsorbent is unchanged however. Therefore, if the isotherm was in a volume basis with units of cm3 before the calculation above, the returned surface area will be in square meters per cubic centimetre of adsorbent Equations of state In order to calculate adsorbate properties such as molar mass, vapour pressure or surface tension, pygaps makes use of CoolProp. CoolProp has the ability to use either the HEOS or the REFPROP backend. pygaps defaults to using the HEOS backend, but it the user has REFPROP installed and configured on their computer, they can enable it by using the switching function: pygaps.backend_use_refprop() To go back to the standard CoolProp backend, use: pygaps.backend_use_coolprop() Warning: If REFPROP is not previously installed and configured on the user s computer, calculations will fail. 1.5 Examples The examples in this section are actually in the form of Jupyter Notebooks which are turned into webpages with nbsphinx. You can find them for download in the github folder Importing isotherms The first thing to do is to do create some isotherms. Some example data can be found in the /data directory, in the pygaps json format. Let s import all the isotherms. First, we ll do the necessary top-level imports for the session. 36 Chapter 1. Contents

41 In [1]: import os import matplotlib.pyplot as plt import pygaps json_path = os.path.join(os.getcwd(), 'data') Selected 0 samples Selected 23 adsorbates Then we ll import the json files. To do this, we need to find all the files with the.json extension and open them for reading. We can use the pygaps.util_get_file_paths function to get all the file paths in a folder. Then we ll open the files and create the isotherms with the isotherm_from_json function. There are three folders: One containing nitrogen adsorption data at 77 kelvin Another with room-temperature adsorption of CO 2 combined with microcalorimetry Some room-temperature isotherms which we will use for IAST calculations Finally a set of isotherms with C 4 H 10 at different temperature, for isosteric heat calculations In [2]: # Get the nitrogen data at 77 kelvin isotherms_n2_77k_paths = pygaps.util_get_file_paths( os.path.join(json_path, 'characterisation'), '.json') isotherms_n2_77k = [] for filepath in isotherms_n2_77k_paths: with open(filepath, 'r') as text_file: isotherms_n2_77k.append(pygaps.isotherm_from_json(text_file.read())) print('selected', len(isotherms_n2_77k), 'isotherms with nitrogen at 77K') Selected 5 isotherms with nitrogen at 77K In [3]: # Get the combined isotherm-calorimetry data isotherms_calorimetry_paths = pygaps.util_get_file_paths( os.path.join(json_path, 'calorimetry'), '.json') isotherms_calorimetry = [] for filepath in isotherms_calorimetry_paths: with open(filepath, 'r') as text_file: isotherms_calorimetry.append(pygaps.isotherm_from_json(text_file.read())) print('selected', len(isotherms_calorimetry), 'room temperature calorimetry isotherms') Selected 2 room temperature calorimetry isotherms In [4]: # Get the isotherms for IAST calculations isotherms_iast_paths = pygaps.util_get_file_paths( os.path.join(json_path, 'iast'), '.json') isotherms_iast = [] for filepath in isotherms_iast_paths: with open(filepath, 'r') as text_file: isotherms_iast.append(pygaps.isotherm_from_json(text_file.read())) print('selected', len(isotherms_iast), 'isotherms for IAST calculation') Selected 2 isotherms for IAST calculation In [5]: # Get the isotherms for isosteric heat calculations isotherms_isosteric_paths = pygaps.util_get_file_paths( os.path.join(json_path, 'isosteric'), '.json') isotherms_isosteric = [] for filepath in isotherms_isosteric_paths: 1.5. Examples 37

42 with open(filepath, 'r') as text_file: isotherms_isosteric.append(pygaps.isotherm_from_json(text_file.read())) print('selected', len(isotherms_isosteric), 'isotherms for isosteric heat calculation') Selected 3 isotherms for isosteric heat calculation Now we can what we imported in the next notebook Characterisation examples This section will have several examples of the isotherm characterisation work that can be done in pygaps. A complete applicability guide and info on each function parameters can be found in the manual. General isotherm info Before we start the characterisation, let s have a look at what we imported. First, make sure the data is imported by running the previous notebook. In [1]: %run import.ipynb Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation For example, we know that some of the isotherms are measured with nitrogen at 77 kelvin, but don t know what the samples are. Let s print some of the properties. In [2]: [(isotherm.sample_name, isotherm.sample_batch) for isotherm in isotherms_n2_77k] Out[2]: [('MCM-41', 'Test'), ('NaY', 'Test'), ('SiO2', 'Test'), ('Takeda 5A', 'Test'), ('UiO-66(Zr)', 'Test')] So we have a controlled pore glass, a zeolite sample, a silica sample, a carbon sample and a common MOF. The test data covers all the bases. What about the isotherms which we ll use for isosteric calculations? Let s see what samples they are on and what temperatures they are at. We can use the standard print method on an isotherm for some detailed info. In [3]: print(isotherms_isosteric[0]) [isotherm.t_exp for isotherm in isotherms_isosteric] Experimental isotherm Material: TEST Batch: TB Adsorbate used: C4H10 Isotherm temperature: K Isotherm type: isotherm Units: Unit for loading: mmol/g Unit for pressure: bar Other properties: 38 Chapter 1. Contents

43 Out[3]: [298.15, , ] Let s look at the isotherms that were measured in a combination with microcalorimetry. They have, besides the standard loading-pressure relationship, the enthalpy of adsorption measured directly. We can also use the print_info function to have a graph of the isotherm besides the regular info. In [4]: for isotherm in isotherms_calorimetry: isotherm.print_info() Experimental isotherm Material: HKUST-1(Cu) Batch: Test Adsorbate used: CO2 Isotherm temperature: 303.0K Isotherm type: Calorimetrie Isotherm date: :00:00 Machine: CV User: ADW Activation temperature: C Units: Unit for loading: mmol/g Unit for pressure: bar Other properties: 1.5. Examples 39

44 Experimental isotherm Material: Takeda 5A Batch: Test Adsorbate used: CO2 Isotherm temperature: 303.0K Isotherm type: Calorimetrie Machine: CV User: ADW Activation temperature: C Units: Unit for loading: mmol/g Unit for pressure: bar Other properties: 40 Chapter 1. Contents

45 So we have two carbon dioxide isotherms at room temperature, one on a MOF and one on a carbon sample. For the iast isotherms, we d like to plot them on the same graph, with the name of the adsorbate in the legend. In [5]: import matplotlib.pyplot as plt pygaps.plot_iso(isotherms_iast, branch=['ads'], legend_list=['sample_name','adsorbate'], ) plt.show() 1.5. Examples 41

46 Now we ll do a BET area determination in the next notebook. BET surface area calculations Let s do a calculation of the BET surface area for these samples. First, make sure the data is imported by running the previous notebook. In [1]: %run import.ipynb Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation 42 Chapter 1. Contents

47 We use the area_bet function, and we first want to look at how the framework attempts to calculate the good BET region on its own. For this we pass the verbose parameter and then use matplotlib to display the graph. In [2]: print(isotherms_n2_77k[0].sample_name) pygaps.area_bet(isotherms_n2_77k[0], verbose=true) plt.show() MCM-41 The slope of the BET line: s = The intercept of the BET line: i = C = 34 Amount for a monolayer: n = mol/unit Minimum pressure point chosen is and maximum is BET surface area: a = 408 m²/unit c:\users\pauli\onedrive\documents\phd documents\python\pygaps\src\pygaps\calculations\area_bet.py:278 warnings.warn("the correlation is not linear") 1.5. Examples 43

48 It looks that, while the correlation wasn t perfectly straight, it is reasonably good. We got a warning that tells us that it could be better. We can restrict the pressure range manually to see what difference it would make. In [3]: print(isotherms_n2_77k[0].sample_name) pygaps.area_bet(isotherms_n2_77k[0], limits=(0.05, 0.3), verbose=true) plt.show() MCM-41 The slope of the BET line: s = The intercept of the BET line: i = C = 104 Amount for a monolayer: n = mol/unit Minimum pressure point chosen is and maximum is BET surface area: a = 366 m²/unit 44 Chapter 1. Contents

49 We have a better fit, and a diference of about 40 m 2. The initial guess wasn t that bad. Now let s do the analysis on all of the nitrogen samples. Instead of looking at them graphically, we ll assume the framework makes a reasonably accurate choice. The function returns a dictionary with all the calculated parameters, so we ll just select the BET area from there. In [4]: results = [] 1.5. Examples 45

50 for isotherm in isotherms_n2_77k: results.append((isotherm.sample_name, pygaps.area_bet(isotherm))) [(x, y['area']) for (x,y) in results] c:\users\pauli\onedrive\documents\phd documents\python\pygaps\src\pygaps\calculations\area_bet.py:278 warnings.warn("the correlation is not linear") Out[4]: [('MCM-41', ), ('NaY', ), ('SiO2', ), ('Takeda 5A', ), ('UiO-66(Zr)', )] We also have the calorimetry isotherms, which were measured with CO 2 at room temperature. While there s no guarantee that the BET method is still applicable with this adsorbate and temperature, the framework can still attempt to perform the calculations. It just happens that the carbon sample is the same in both isotherms. Let s see how the CO 2 BET surface area looks. In [5]: print(isotherms_calorimetry[1].sample_name) pygaps.area_bet(isotherms_calorimetry[1], verbose=true) plt.show() Takeda 5A The slope of the BET line: s = The intercept of the BET line: i = 5.04 C = 26 Amount for a monolayer: n = mol/unit Minimum pressure point chosen is and maximum is BET surface area: a = 782 m²/unit 46 Chapter 1. Contents

51 The surface area obtained with carbon dioxide is around 780 m 2. Compared to the nitrogen surface area of 1100 m 2, it is much smaller. While the checks implemented did not find anything wrong, this is likely due to interactions between carbon dioxide and the carbon surface leading to the breakdown of the BET theory. While any kind of adsorbate and temperature can be analysed through the framework, result interpretation is left at the discretion of the user. Now we ll compare the BET area with the Langmuir area in the next notebook. Langmuir surface area calculations Another common method of calculating specific surface area relies on fitting the isotherm with a Langmuir model. This model assumes adsorption is confined to a single layer. First, make sure the data is imported by running the previous notebook. In [1]: %run import.ipynb Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation We use the area_langmuir function, and we first want to see the range selected by the standard method. For this we pass the verbose parameter and then use matplotlib to display the graph. In [2]: print(isotherms_n2_77k[0].sample_name) pygaps.area_langmuir(isotherms_n2_77k[0], verbose=true) plt.show() MCM-41 The slope of the Langmuir line: s = The intercept of the Langmuir line: i = Examples 47

52 K = 2 Amount for a monolayer: n = mol/g Minimum pressure point chosen is and maximum is Langmuir surface area: a = 1409 m²/g c:\users\pc-etu1-phil\documents\git\pygaps\src\pygaps\calculations\area_langmuir.py:225: UserWarning: warnings.warn("the correlation is not linear") The correlation is not very good due to the mesopore condensation phenomenon. Due to this, the area calculated is not realistic. We can select the range manually for a better fit. In [3]: print(isotherms_n2_77k[0].sample_name) pygaps.area_langmuir(isotherms_n2_77k[0], limits=(0.05, 0.3), verbose=true) plt.show() MCM-41 The slope of the Langmuir line: s = The intercept of the Langmuir line: i = K = 24 Amount for a monolayer: n = mol/g Minimum pressure point chosen is and maximum is Langmuir surface area: a = 528 m²/g 48 Chapter 1. Contents

53 The fit is now better and the calculated area is also realistic. Comparing it to the BET area obtained previously, we see that it is higher by about 150 m2. Since adsoprtion is happening in multiple layers rather than a monolayer, it is likely that the value for complete coverage overshoots the actual value. In general the Langmuir surface area is not as widely applicable as the BET one. Now let s do the analysis on all of the nitrogen samples and compare the obtained surface areas with the BET ones. In [4]: area_langmuir = [] area_bet = [] for isotherm in isotherms_n2_77k: area_bet.append(pygaps.area_bet(isotherm)['area']) area_langmuir.append(pygaps.area_langmuir(isotherm)['area']) plt.scatter(area_langmuir, area_bet) plt.xlim(xmin=0, xmax=2000) plt.ylim(ymin=0, ymax=2000) plt.xlabel('langmuir surface area') plt.ylabel('bet surface area') plt.show() c:\users\pc-etu1-phil\documents\git\pygaps\src\pygaps\calculations\area_langmuir.py:225: UserWarning: warnings.warn("the correlation is not linear") 1.5. Examples 49

54 We can see that some areas correspond, while others are not as well correlated. Unless the adsorption isotherm respects the Langmuir model, the calculated surface area is not correct. Now we ll do a t-plot in the next notebook. t-plot calculations Another common characterisation method is the t-plot method. First, make sure the data is imported by running the previous notebook. In [1]: %run import.ipynb Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation This method requires, besides the isotherm, a so-called thickness function which describes the thickness of adsorbate on a non-porous surface. It can be specified by the user, or otherwise the "Harkins and Jura" thickness model is used as default. When the function is called without any other parameters, the framework will attempt to find plateaus in the data and automatically fit them with a straight line. Let s look again at the our MCM-41 pore-controlled glass. In [2]: print(isotherms_n2_77k[0].sample_name) pygaps.t_plot(isotherms_n2_77k[0], verbose=true) plt.show() MCM-41 For linear region 0 The slope is 0.01 and the intercept is With a correlation coefficient of 1.0 The adsorbed volume is and the area is For linear region 1 50 Chapter 1. Contents

55 The slope is and the intercept is With a correlation coefficient of The adsorbed volume is and the area is The first line can be atributed to adsorption on the pore surface, while the second one is adsorption on the external surface after pore filling. Two values are calculated for each section detected: the adsorbed volume and the area. In this case, the area of the first linear region corresponds to the pore area. Compare the specific surface area obtained of 350 m 2 with the 360 m 2 obtained through the BET method previously. In the second region, the adsorbed volume corresponds to the total pore volume and the area is the external surface area of the sample. We can get a better result for the surface area by attempting to have the first linear region at a zero intercept. In [3]: print(isotherms_n2_77k[0].sample_name) pygaps.t_plot(isotherms_n2_77k[0], thickness_model='harkins/jura', limits=(0.3,0.44), verbose=true) plt.show() MCM-41 For linear region 0 The slope is and the intercept is 0.0 With a correlation coefficient of The adsorbed volume is and the area is Examples 51

56 A near perfect match with the BET method. Of course, the method is only this accurate in certain cases. Let s do the calculations for all the nitrogen isotherms, using the same assumption that the first linear region is a good indicator of surface area. In [4]: results = [] for isotherm in isotherms_n2_77k: results.append((isotherm.sample_name, pygaps.t_plot(isotherm, 'Harkins/Jura'))) [(x, y['results'][0].get('area')) for (x,y) in results] Out[4]: [('MCM-41', ), ('NaY', ), ('SiO2', ), ('Takeda 5A', ), ('UiO-66(Zr)', )] We can see that, while we get reasonable values for the silica samples, all the rest are quite different. This is due to a number of factors depending on the material, with ultramicroporous condensation and adsorbate-adsorbent interactions having an effect on the thickness of the layer. The t-plot requires careful thought to assign meaning to the calculated values. Since no thickness model can be universal, the framework allows for the thickness model to be substituted with an user-provided function which will be used for the thickness calculation, or even another isotherm, which will be converted into a thickness model. For example, using a carbon black type model: In [5]: def carbon_model(relative_p): return 0.88*(relative_p**2) *relative_p Takeda 5A print(isotherms_n2_77k[3].sample_name) pygaps.t_plot(isotherms_n2_77k[3], thickness_model=carbon_model, verbose=true) plt.show() 52 Chapter 1. Contents

57 For linear region 0 The slope is and the intercept is With a correlation coefficient of The adsorbed volume is and the area is Isotherms which do not use nitrogen can also be used, but one should be careful that the thickness model is well chosen. Now we ll use the α s method in the next notebook. The α s method Very similar to the t-plot method, the α s method compares an isotherm on a porous material with one that was taken on a reference similar material, but non-porous. The reference isotherm should have a wide range of pressures to be able to interpolate the loading values at the required pressures. First, make sure the data is imported by running the previous notebook. In [1]: %run import.ipynb Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation Unfortunately, we don t have a reference isotherm in our data. We are instead going to be creative and assume that the adsorption on the silica (SiO 2 sample) is a good representation of an adsorption on a non-porous version of the MCM-41 sample. Let s try: In [2]: print(isotherms_n2_77k[0].sample_name) print(isotherms_n2_77k[2].sample_name) try: pygaps.alpha_s(isotherms_n2_77k[0], reference_isotherm=isotherms_n2_77k[2], 1.5. Examples 53

58 verbose=true) except Exception as e: print('error!:',e) MCM-41 SiO2 ERROR!: A value in x_new is below the interpolation range. The data in our reference isotherm is on a smaller range than that in the isotherm that we want to calculate! We are going to be creative again and first model the adsorption behaviour using a ModelIsotherm. In [3]: model = pygaps.modelisotherm.from_pointisotherm(isotherms_n2_77k[2], guess_model=true) pygaps.plot_iso([isotherms_n2_77k[2], model], branch=['ads']) plt.show() With our model fitting the data pretty well, we can now try the α s method again. 54 Chapter 1. Contents

59 In [4]: print(isotherms_n2_77k[0].sample_name) print(isotherms_n2_77k[2].sample_name) pygaps.alpha_s(isotherms_n2_77k[0], model, verbose=true) plt.show() MCM-41 SiO2 For linear region 0 The slope is and the intercept is With a correlation coefficient of The adsorbed volume is and the area is For linear region 1 The slope is and the intercept is With a correlation coefficient of The adsorbed volume is and the area is The results don t look that bad, considering all our assumptions and modelling. There are other parameters which can be specified for the α s function such as: The relative pressure to use as the reducing pressure The known area of the reference material. If this is not specified, the BET method is used to calculate the surface area. As in the t-plot function, the limits for the straight line selection. The pore size distribution is to be determined in the next notebook. Pore size distribution Often, pore size distributions are a very important part of adsorbent characterisation. The pygaps framework includes several common classical methods which are applicable to mesoporous or microporous materials. A DFT-fitting 1.5. Examples 55

60 method is also provided together with an internal N2/carbon applicable DFT kernel. The user can also specify their own DFT kernel. A complete aplicability guide and info on each function parameters can be found in the manual. First, make sure the data is imported. In [1]: %run import.ipynb Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation Mesoporous pore size distribution Let s start by analysing the mesoporous size distribution of some of our nitrogen physisorption samples. From our available choices, the MCM-41 sample should have a very well defined, singular pore size. We can use the classical BJH model. In [2]: isotherm = isotherms_n2_77k[0] print(isotherm.sample_name) result_dict = pygaps.mesopore_size_distribution( isotherm, psd_model='bjh', verbose=true) plt.show() MCM-41 The distribution is what we expected, a single narrow peak. Since we asked for extra verbosity, the function has generated a graph which we can display with plt.show(). The graph automaticaly sets a minimum limit of 1.5 angstrom, where the kelvin equation based methods break down. The result dictionary returned contains the x and y points of the graph. Depending on the sample, the distribution can be a well defined or broad, single or multimodal, or, in the case of adsorbents without mesoporoes, not relevant at all. For example, using the Takeda 5A carbon, and the Dollimore-Heal model: 56 Chapter 1. Contents

61 In [3]: isotherm = isotherms_n2_77k[3] print(isotherm.sample_name) result_dict_meso = pygaps.mesopore_size_distribution( isotherm, psd_model='dh', verbose=true) plt.show() Takeda 5A Now let s break down the available settings with the mesoporous PSD function. The classical models are commonly applied on the desorption branch of the isotherm. This is also the default in this code, although the user can force the adsorption branch to be used with the branch parameter. A pore_geometry parameter can be used to specify the known pore geometry of the pore. The Kelvin equation parameters change appropriately. The mesoporous PSD calculation depends on a thickness function as well, this can also be specified in the function using the thickness_model parameter. Either a named model or a user function is accepted. If the user wants to use a custom function for the Kelvin model, they can do so through the kelvin_model parameters. This must be a function with only relative pressure as the input. Below we use the adsorption branch and the Halsey thickness curve to look at the MCM-41 pores. In [4]: isotherm = isotherms_n2_77k[0] print(isotherm.sample_name) result_dict = pygaps.mesopore_size_distribution( isotherm, psd_model='dh', branch='ads', thickness_model='halsey', verbose=true) plt.show() MCM Examples 57

62 Note: If the user wants to customise the standard plots which are displayed through increasing the verbosity of any method, they are available for use in the pygaps.graphing.calcgraph module Microporous pore size distribution For microporous samples, we can use the micropore_size_distribution function. Currently, the only available model is the standard Horvath-Kawazoe one. The HK model uses a list of parameters which describe the interaction between the adsorbate and the adsorbent. These should be selected on a per case basis by using the adsorbate_parameters and adsorbent_parameters keywords. If they are not specified, the function assumes a carbon model for the sample surface and takes the required adsorbate properties (magnetic susceptibility, polarizability, molecular diameter and surface density) from the specific adsorbate in the pygaps.adsorbate_list. The pore geometry is also assumed to be slit-like. Let s look at using the function on the carbon sample: In [5]: isotherm = isotherms_n2_77k[3] print(isotherm.sample_name) result_dict_micro = pygaps.micropore_size_distribution( isotherm, psd_model='hk', verbose=true) plt.show() Takeda 5A 58 Chapter 1. Contents

63 We see that we could have a peak around 0.7 nm, but could use more adsorption data at low pressure for better resolution. It should be noted that the model breaks down with pores bigger than around 3 nm. The framework comes with other models for the surface, like as the Saito-Foley derived oxide-ion model. Below is an attempt to use the HK method with these parameters for the UiO-66 sample and some user-specified parameters for the adsorbate interaction. We should not expect the results to be very accurate, due to the different surface properties and heterogeneity of the MOF. In [6]: adsorbate_params = { 'magnetic_susceptibility': 3.6e-35, 'molecular_diameter': 0.3, 'polarizability': 1.76e-30, 'surface_density': 6.71e+18 } UiO-66(Zr) isotherm = isotherms_n2_77k[4] print(isotherm.sample_name) result_dict = pygaps.micropore_size_distribution( isotherm, psd_model='hk', adsorbent_model='oxideion(sf)', adsorbate_model=adsorbate_params, verbose=true) plt.show() 1.5. Examples 59

64 A bimodal pore size distribution is seen, with peaks at around 7 and 8 angstrom. UiO-66 does indeed have two cages, a tetrahedral cage and an octahedral one, with the sizes of 8 and 11 angstrom respectively. DFT pore size distribution The DFT method is the most powerful method for pore size distribution calculations. It requires a DFT kernel, or a collection of previously simulated adsorption isotherms which cover the entire pore range which we want to investigate. The calculation of the DFT kernel is currently not in the scope of this framework. The user can specify their own kernel, in a CSV format, which will be used for the isotherm fitting on the dft_size_distribution function. Alternatively, a common DFT kernel is included with the framework, which is simulated with nitrogen on a carbon material and slit-like pores in the range of nanometres. Let s run the fitting of this internal kernel on the carbon sample: In [7]: isotherm = isotherms_n2_77k[3] print(isotherm.sample_name) result_dict_dft = pygaps.dft_size_distribution( isotherm, 'internal', verbose=true) plt.show() Takeda 5A Often, we can smooth the graph to make some features clearer. Let s use a Savitzky-Golay filter. In [8]: from scipy.signal import savgol_filter from pygaps.graphing.calcgraph import psd_plot pore_dist_dft = savgol_filter(result_dict_dft['pore_distribution'], 7, 2) ax = psd_plot(result_dict_dft['pore_widths'], pore_dist_dft, method='dft', xmax=8) plt.show() 60 Chapter 1. Contents

65 Comparing all the PSD methods For comparison purposes, we will compare the pore size distributions obtained through all the methods above. The sample on which all methods are applicable is the Takeda carbon. We will first normalize the data, then use the graph returned by the plotting function to plot the remaining dictionaries. In [9]: normalized_dft = pore_dist_dft / max(result_dict_dft['pore_distribution']) normalized_micro = result_dict_micro['pore_distribution'] /max(result_dict_micro['pore_distri normalized_meso = result_dict_meso['pore_distribution'] /max(result_dict_meso['pore_distribut ax = psd_plot(result_dict_micro['pore_widths'], normalized_micro, method='comparison', label= ax.plot(result_dict_dft['pore_widths'], normalized_dft, label='dft') ax.plot(result_dict_meso['pore_widths'], normalized_meso, label='mesoporous') ax.legend(loc='best') plt.show() The isosteric heat calculation comes in the next notebook Examples 61

66 Isosteric heat calculation In order to calculate isosteric heat, at least two isotherms which were taken at slighly different temperatures are required. First, make sure the data is imported. In [1]: %run import.ipynb Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation Let s quickly plot the isotherms to see how they look. We put the temperature of the experiment in the legend by using the legend_list keyword. In [2]: pygaps.plot_iso(isotherms_isosteric, branch=['ads'], legend_list=['adsorbate', 't_exp'], logx = True, fig_title='isotherms at different temperatures') plt.show() 62 Chapter 1. Contents

67 The isotherms look good, except perhaps a bit of measurement error in the low pressure region. The isosteric heat calculation takes the list of the isotherms and returns the results as a dictionary. Using the verbose keyword, we also generate a graph. In [3]: result_dict = pygaps.isosteric_heat(isotherms_isosteric, verbose=true) plt.show() 1.5. Examples 63

68 Henry s constant calculations In this notebook we ll calculate the Henry s constant. First, make sure the data is imported by running the import notebook. In [1]: %run import.ipynb Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation Slope method The slope method of calculating Henry s fits a linear henry model to the isotherm points. If the model does not fit, it goes to progresivelly lower pressures until it finds a good fit. For data that is very non-linear, this fit might be between p=0 and the first isotherm point. It is a fast method but can undershoot depending on the dataset. In [2]: # Slope method h1 = pygaps.initial_henry_slope(isotherms_n2_77k[0], max_adjrms=0.01, verbose=true) h2 = pygaps.initial_henry_slope(isotherms_n2_77k[-1], max_adjrms=0.01, verbose=true) print(h1,h2) Calculated K = Starting points: Chapter 1. Contents

69 Selected points: 2 Final adjusted root mean square difference: e-12 Calculated K = Starting points: 91 Selected points: 7 Final adjusted root mean square difference: Examples 65

70 Virial method The virial method uses a virial model to fit the data and then obtain the Henry constant from the value of the virial function at n=0. It is a slower model as a minimisation algorithm must be used. On the other hand, it should obtain a more accurate value for the constant since the model covers the entire dataset. In [3]: # Virial method h1 = pygaps.initial_henry_virial(isotherms_n2_77k[1], verbose=true) h2 = pygaps.initial_henry_virial(isotherms_n2_77k[-1], verbose=true) 66 Chapter 1. Contents

71 print(h1,h2) Attempting to model using Virial Model Virial success, rmse is [ ] Virial coefficients: [ ] Residuals: [ ] Rank: 4 Singular values: [ ] Conditioning threshold: e Examples 67

72 Attempting to model using Virial Model Virial success, rmse is [ ] Virial coefficients: [ e e e e+01] Residuals: [ ] Rank: 4 Singular values: [ ] Conditioning threshold: e Chapter 1. Contents

73 1.5. Examples 69

74 Initial enthalpy calculations and enthalpy modelling The enthalpy of adsorption represents the energy released as heat during the adsorption process as a function of loading. It can be obtained either indirectly, through the isosteric heat method, or directly, using adsoption microcalorimetry. pygaps contains methods to determine the initial head of adsorption as well as attempt to model the enthalpy curve as a function of different contributions. First, make sure the data is imported by running the import notebook. In [1]: %run import.ipynb Selected 0 samples Selected 23 adsorbates 70 Chapter 1. Contents

75 Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation Initial point method The point method of determining heat of adsorption is the simplest method. It just returns the first measured point in the enthalpy curve. Depending on the data, the first point method may be representative of the actual value. In [2]: import matplotlib.pyplot as plt # Initial point method res = pygaps.initial_enthalpy_point(isotherms_calorimetry[0], 'enthalpy', verbose=true) plt.show() res = pygaps.initial_enthalpy_point(isotherms_calorimetry[1], 'enthalpy', verbose=true) plt.show() The initial enthalpy of adsorption is: E = The initial enthalpy of adsorption is: E = Examples 71

76 Compound model method This method attempts to model the enthalpy curve by the superposition of several contributions. It is slower, as it runs a constrained minimisation algorithm with several initial starting guesses, then selects the optimal one. In [3]: # Modelling method res = pygaps.initial_enthalpy_comp(isotherms_calorimetry[0], 'enthalpy', verbose=true) plt.show() Bounds: res = pygaps.initial_enthalpy_comp(isotherms_calorimetry[1], 'enthalpy', verbose=true) plt.show() const = ( , ) preexp = (0, 150), exp = (0, inf), exploc = (0, 0.5) prepowa = (0, 50), powa = (1, 20) prepowr = (-50, 0), powr = (1, 20) Minimizing routine number 1 Initial guess: const = preexp = 0.0, exp = 0.0, exploc = 0.0 prepowa = 0.0, powa = 1.0 prepowr = 0.0, powr = 1.0 Optimization terminated successfully. (Exit mode 0) Current function value: Iterations: 75 Function evaluations: 753 Gradient evaluations: Chapter 1. Contents

77 Minimizing routine number 2 Initial guess: const = preexp = , exp = 0.0, exploc = 0.1 prepowa = , powa = 1.0 prepowr = , powr = 1.0 Optimization terminated successfully. (Exit mode 0) Current function value: Iterations: 102 Function evaluations: 1028 Gradient evaluations: 102 Minimizing routine number 3 Initial guess: const = preexp = , exp = -10.0, exploc = 0.1 prepowa = 0.01, powa = 3.0 prepowr = 0.0, powr = 1.0 Optimization terminated successfully. (Exit mode 0) Current function value: Iterations: 131 Function evaluations: 1330 Gradient evaluations: 131 Minimizing routine number 4 Initial guess: const = preexp = 0.0, exp = 0.0, exploc = 0.1 prepowa = 0.0, powa = 3.0 prepowr = -0.01, powr = 3.0 Optimization terminated successfully. (Exit mode 0) Current function value: Iterations: 86 Function evaluations: 870 Gradient evaluations: 86 Final best fit The initial enthalpy of adsorption is: E = The constant contribution is The exponential contribution is * exp(1.80e+00 * n) with the limit at 0.29 The guest-guest attractive contribution is 44 * nˆ3.5 The guest-guest repulsive contribution is -50 * nˆ Examples 73

78 Bounds: const = ( , ) preexp = (0, 150), exp = (0, inf), exploc = (0, 0.5) prepowa = (0, 50), powa = (1, 20) prepowr = (-50, 0), powr = (1, 20) Minimizing routine number 1 Initial guess: const = preexp = 0.0, exp = 0.0, exploc = 0.0 prepowa = 0.0, powa = 1.0 prepowr = 0.0, powr = 1.0 Optimization terminated successfully. (Exit mode 0) Current function value: Iterations: 18 Function evaluations: 180 Gradient evaluations: 18 Minimizing routine number 2 Initial guess: const = preexp = , exp = 0.0, exploc = 0.1 prepowa = , powa = 1.0 prepowr = , powr = 1.0 Optimization terminated successfully. (Exit mode 0) Current function value: Iterations: 52 Function evaluations: 521 Gradient evaluations: Chapter 1. Contents

79 Minimizing routine number 3 Initial guess: const = preexp = , exp = -10.0, exploc = 0.1 prepowa = 0.01, powa = 3.0 prepowr = 0.0, powr = 1.0 Optimization terminated successfully. (Exit mode 0) Current function value: Iterations: 68 Function evaluations: 681 Gradient evaluations: 68 Minimizing routine number 4 Initial guess: const = preexp = 0.0, exp = 0.0, exploc = 0.1 prepowa = 0.0, powa = 3.0 prepowr = -0.01, powr = 3.0 Optimization terminated successfully. (Exit mode 0) Current function value: Iterations: 62 Function evaluations: 621 Gradient evaluations: 62 Final best fit The initial enthalpy of adsorption is: E = The constant contribution is The exponential contribution is * exp(1.23e+01 * n) with the limit at 0.00 The guest-guest attractive contribution is 50 * nˆ1.8e+01 The guest-guest repulsive contribution is -46 * nˆ1.8e Examples 75

80 1.5.3 Isotherm modelling In this notebook we ll attempt to model isotherms using the included models. First, make sure the data is imported by running the import notebook. In [1]: %run import.ipynb import matplotlib.pyplot as plt Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation Selecting models Instead of using the raw creation method for models, we ll use the already available PointIsotherms, together with the from_pointisotherm class method. Let s select one of the isotherms and attempt to model it with the Double Site Langmuir model. It is worth noting that, if the branch is not selected, the model will automatically select the adsorption branch. In [2]: isotherm = isotherms_n2_77k[4] model = pygaps.modelisotherm.from_pointisotherm(isotherm, model='dslangmuir', verbose=true) pygaps.plot_iso([isotherm, model], logx=true, branch=['ads']) plt.show() 76 Chapter 1. Contents

81 Attempting to model using DSLangmuir Model DSLangmuir success, rmse is The fit seems good from the rms value, but the graph looks like it has a step at low pressure. This is just how the plotting method is designed. If we want to see the isotherm overlap at each point, we ll need to first create another PointIsotherm from the ModelIsotherm we have. In the class method we pass the original isotherm as a source for pressures where to calculate the loading. In [3]: model_atpoints = pygaps.pointisotherm.from_modelisotherm(model, pressure_points=isotherm) pygaps.plot_iso([isotherm, model_atpoints], logx=true, branch=['ads']) plt.show() 1.5. Examples 77

82 The original model is therefore reasonably good! It s important to note that the ModelIsotherm has almost all the methods that the PointIsotherm has. For example: In [4]: model.print_info(logarithmic=false) Simulated isotherm Material: UiO-66(Zr) Batch: Test Adsorbate used: N2 Isotherm temperature: K Isotherm type: Isotherme Machine: Triflex User: PI Activation temperature: C Units: Unit for loading: mmol/g 78 Chapter 1. Contents

83 Unit for pressure: bar Other properties: DSLangmuir identified model parameters: M1 = K1 = M2 = K2 = RMSE = Let s now apply the same model to another isotherm. In [5]: isotherm = isotherms_n2_77k[2] try: model = pygaps.modelisotherm.from_pointisotherm(isotherm, model='dslangmuir', 1.5. Examples 79

84 except Exception as e: print(e) Attempting to model using DSLangmuir verbose=true) Minimization of RSS for DSLangmuir isotherm fitting failed with error: Maximum number of function evaluations has been exceeded. Try a different starting point in the nonlinear optimization by passing a dictionary of parameter guesses, param_guess, to the constructor. Default starting guess for parameters: {'M1': , 'K1': , 'M2': , 'K2': Sometimes the model chosen will not fit the data, no matter how much we attempt to minimise the function. Guessing models We also have the option of guessing a model instead. This option will calculate all available model fits and select the one with the smallest root mean square. Let s try this on the previous isotherm. In [6]: isotherm = isotherms_n2_77k[2] model = pygaps.modelisotherm.from_pointisotherm(isotherm, guess_model=true, verbose=true) pygaps.plot_iso([isotherm, model], branch=['ads']) plt.show() Attempting to model using Henry Model Henry success, rmse is Attempting to model using Langmuir Modelling using Langmuir failed Attempting to model using DSLangmuir Modelling using DSLangmuir failed Attempting to model using TSLangmuir Modelling using TSLangmuir failed Attempting to model using Quadratic Modelling using Quadratic failed Attempting to model using BET Model BET success, rmse is Attempting to model using TemkinApprox Modelling using TemkinApprox failed Attempting to model using Toth Modelling using Toth failed Attempting to model using Jensen-Seaton Modelling using Jensen-Seaton failed Best model fit is BET 80 Chapter 1. Contents

85 We can see that most models failed, but the BET model has been correctly identified as the best fitting one. Other options We can also attempt to model the desorption branch of an isotherm. In [7]: isotherm = isotherms_n2_77k[3] model = pygaps.modelisotherm.from_pointisotherm(isotherm, guess_model=true, branch='des') pygaps.plot_iso([isotherm, model], branch=['des']) plt.show() 1.5. Examples 81

86 c:\users\pauli\onedrive\documents\phd documents\python\pygaps\src\pygaps\calculations\models_isotherm )**self.params['c'])**(1 / self.params['c']) Just because a the minimisation has successfully produced a model that does NOT mean that the model is accurate. For example, trying to model the MCM-41 sample with a Langmuir model does not throw any errors but it is obvious that the model is not representative of the condensation in the pores. In [8]: isotherm = isotherms_n2_77k[0] model = pygaps.modelisotherm.from_pointisotherm(isotherm, model="dslangmuir") pygaps.plot_iso([isotherm, model], branch=['ads']) plt.show() 82 Chapter 1. Contents

87 1.5.4 IAST examples In this notebook we ll attempt to model isotherms using the included models. First, make sure the data is imported by running the import notebook. In [1]: %run import.ipynb import matplotlib.pyplot as plt import numpy Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation 1.5. Examples 83

88 Using models The usual way of using the IAST calculation is by fitting a model to the isotherm, then running the calculations on the obtained model. Let s first fit the Langmuir model to both isotherms. In [2]: isotherms_iast_models = [] print('sample of isotherm:', isotherms_iast[0].sample_name) for isotherm in isotherms_iast: model = pygaps.modelisotherm.from_pointisotherm(isotherm, model='langmuir') isotherms_iast_models.append(model) Sample of isotherm: MOF-5(Zn) Now we can do the IAST calculation. In [3]: pygaps.iast([isotherms_iast_models[0], isotherms_iast_models[1]], partial_pressures=[10, 5], verbose=true) 2 components. Partial pressure component 0 = Partial pressure component 1 = Component 0 p = 10 pˆ0 = Loading: x = Spreading pressure = Component 1 p = 5 pˆ0 = Loading: x = Spreading pressure = Out[3]: array([ , ]) Alternatively, if we are interested in binary adorption behaviour, we can use the extension functions iast_binary_svp and iast_binary_vle to obtain how the selectivity changes based on pressure in a constant composition or, respectively, how the gas phase-adsorbed phase changes with gas composition, at constant pressure. These functions perform the IAST calculation at every point in the range passed and can plot the results. In [4]: partial_pressures = [0.5, 0.5] pressure_range = numpy.linspace(0.01, 20, 30) result_dict = pygaps.iast_binary_svp([isotherms_iast_models[0], isotherms_iast_models[1]], partial_pressures, pressure_range, verbose=true, ) plt.show() 84 Chapter 1. Contents

89 And for the adsorbed phase - gas phase equilibrium: In [5]: result_dict = pygaps.iast_binary_vle([isotherms_iast_models[0], isotherms_iast_models[1]], 2, verbose=true) plt.show() 1.5. Examples 85

90 Using isotherms directly - interpolation The isotherms themselves can be used directly. However, instead of spreading pressure being calculated from the model, it will be approximated through interpolation. In [6]: pygaps.iast([isotherms_iast[0], isotherms_iast[1]], partial_pressures=[10, 5], verbose=true) 2 components. Partial pressure component 0 = Partial pressure component 1 = Component 0 p = 10 pˆ0 = Chapter 1. Contents

91 Loading: x = Spreading pressure = Component 1 p = 5 pˆ0 = Loading: x = Spreading pressure = Out[6]: array([ , ]) The binary functions can also accept PointIsotherm objects. In [7]: partial_pressures = [0.5, 0.5] pressure_range = numpy.linspace(0.01, 20, 30) result_dict = pygaps.iast_binary_svp([isotherms_iast[0], isotherms_iast[1]], partial_pressures, pressure_range, verbose=true, ) plt.show() 1.5. Examples 87

92 In [8]: result_dict = pygaps.iast_binary_vle([isotherms_iast[0], isotherms_iast[1]], 2, verbose=true) plt.show() 88 Chapter 1. Contents

93 1.5.5 Parsing examples Some examples on parsing to and from supported formats. Declare paths First, let s do all the necessary imports and generate the paths that we ll use for file import and export. We ll then use the util_get_file_paths function to get the file paths in those directories. In [1]: import os import pygaps # Get directory paths 1.5. Examples 89

94 xl_path = os.path.join(os.getcwd(), 'data', 'parsing', 'excel') json_path = os.path.join(os.getcwd(), 'data', 'parsing', 'json') csv_path = os.path.join(os.getcwd(), 'data', 'parsing', 'csv') # Find files json_file_paths = pygaps.util_get_file_paths(json_path, '.json') xl_file_paths = pygaps.util_get_file_paths(xl_path, '.xlsx') csv_file_paths = pygaps.util_get_file_paths(csv_path, '.csv') Selected 0 samples Selected 23 adsorbates JSON Parsing JSON Import In [2]: # Import them isotherms = [] for filepath in json_file_paths: with open(filepath, 'r') as text_file: isotherms.append(pygaps.isotherm_from_json(text_file.read())) # See the files for isotherm in isotherms: print(isotherm) Experimental isotherm Material: HKUST-1(Cu) Batch: Test Isotherm type: Calorimetrie Adsorbate used: CO2 Isotherm date: :00:00 Machine: CV User: ADW Activation temperature: C Isotherm temperature: 303.0K Experimental isotherm Material: MCM-41 Batch: Test Isotherm type: Isotherme Adsorbate used: N2 Machine: Triflex User: PI Activation temperature: C Isotherm temperature: 77.0K JSON Export In [3]: for isotherm in isotherms: filename = os.path.join(json_path, ' '.join([isotherm.sample_name, isotherm.adsorbate, str(isotherm.t_exp)]) + '.json') with open(filename, mode='w') as f: f.write(pygaps.isotherm_to_json(isotherm)) 90 Chapter 1. Contents

95 Excel Parsing Excel must be installed on the system in use. Excel Import In [4]: # Import them isotherms = [pygaps.isotherm_from_xl(path) for path in xl_file_paths] # See the files for isotherm in isotherms: print(isotherm) Experimental isotherm Material: HKUST-1(Cu) Batch: Test Isotherm type: Calorimetrie Adsorbate used: CO2 Isotherm date: :00:00 Machine: CV User: ADW Activation temperature: C Isotherm temperature: 303.0K Experimental isotherm Material: MCM-41 Batch: Test Isotherm type: Isotherme Adsorbate used: N2 Machine: Triflex User: PI Activation temperature: C Isotherm temperature: 77.0K Excel Export In [5]: # Export each isotherm in turn for isotherm in isotherms: filename = ' '.join([isotherm.sample_name, isotherm.adsorbate, str(isotherm.t_exp)]) + '. pygaps.isotherm_to_xl(isotherm, os.path.join(xl_path, filename)) CSV Parsing CSV Import In [6]: # Import them isotherms = [pygaps.isotherm_from_csv(path) for path in csv_file_paths] # See the files for isotherm in isotherms: print(isotherm) Experimental isotherm Material: HKUST-1(Cu) 1.5. Examples 91

96 Batch: Test Isotherm type: Calorimetrie Adsorbate used: CO2 Isotherm date: :00:00 Machine: CV User: ADW Activation temperature: C Isotherm temperature: 303.0K Experimental isotherm Material: MCM-41 Batch: Test Isotherm type: Isotherme Adsorbate used: N2 Machine: Triflex User: PI Activation temperature: C Isotherm temperature: 77.0K CSV Export In [7]: # Export each isotherm in turn for isotherm in isotherms: filename = ' '.join([isotherm.sample_name, isotherm.adsorbate, str(isotherm.t_exp)]) + '. pygaps.isotherm_to_csv(isotherm, os.path.join(csv_path, filename)) Database examples Premise Let s assume we want to upload a newly created isotherm in the internal database. This isotherm is measured on the novel adsorbent Carbon X1, with nitrogen at 77 K. The sample itself is synthesised locally, by Dr. Alice and has then undergone a chemical activation process. The experiment is performed on a homemade apparatus by Dr. Bob. Imports First we need to do the required imports In [1]: import pygaps Selected 0 samples Selected 23 adsorbates Adsorbate The internal database already contains nitrogen as an adsorbate therefore, there s no need to worry about the adsorbate for now. Sample Since no samples are present in the internal database, we must first upload the sample object. We create a Sample class with the required values and try to upload it. 92 Chapter 1. Contents

97 In [2]: novel_sample = pygaps.sample( name = 'Carbon', batch = 'X1', contact = 'Alice', source = 'local', type = 'novel', treatment = 'chemical' ) try: pygaps.db_upload_sample(pygaps.database, novel_sample) except Exception as e: print(e) Error on sample: Carbon X1 FOREIGN KEY constraint failed We get a foreign key error, since the constraints do not exist in the database yet. Before we can upload the sample, we need to have the values of the foreign keys in place: the contact, as Alice the source, as local the type of adsorbent, as novel the sample property we have added We can do this by passing to the respective functions dictionaries with the required values. In [3]: pygaps.db_upload_contact(pygaps.database, { 'nick' : 'Alice', 'name' : 'Dr. Alice' }) Contact uploaded Alice In [4]: pygaps.db_upload_source(pygaps.database, { 'nick' : 'local', 'name' : 'our own lab' }) Source uploaded local In [5]: pygaps.db_upload_sample_type(pygaps.database, { 'type' : 'novel', 'name' : 'a novel sample which was developed in our lab' }) Sample type uploaded {'type': 'novel', 'name': 'a novel sample which was developed in our lab'} In [6]: pygaps.db_upload_sample_property_type(pygaps.database, { 'type' : 'treatment', }) Property type uploaded {'type': 'treatment'} 1.5. Examples 93

98 Now that all of the constraints are in place let s try the sample upload again. In [7]: pygaps.db_upload_sample(pygaps.database, novel_sample) Sample uploaded Carbon X1 Isotherm Now it s time to upload the isotherm itself. We happen to have the isotherm conveniently stored as a json file, so we load it into memory and we attempt to upload it. In [8]: import os json_path = os.path.join(os.getcwd(), 'data', 'database', 'Carbon X1.json') with open(json_path) as text_file: isotherm = pygaps.isotherm_from_json(text_file.read()) try: pygaps.db_upload_experiment(pygaps.database, isotherm) except Exception as e: print(e) Error on isotherm: physisorption Carbon X1 Bob N2 homemade FOREIGN KEY constraint failed As before, we need to first make sure that the constraints are satisfied before the isotherm can be uploaded. On the isotherm side, we have the following constraints: the adsorbate which was used in the experiment, which is already in the database the machine which was used to measure the data the user who measured it the experiment type, in this case physisorption the experiment data types, which in this case are just the columns in the dataframe: pressure and loading. Again, we pass to the respective functions dictionaries with the required values. In [9]: pygaps.db_upload_machine(pygaps.database, { 'nick' : 'homemade1', 'name' : 'our own apparatus' }) Machine uploaded homemade1 In [10]: pygaps.db_upload_contact(pygaps.database, { 'nick' : 'Bob', 'name' : 'Dr. Bob' }) Contact uploaded Bob In [11]: pygaps.db_upload_experiment_type(pygaps.database, { 'type' : 'physisorption', 'name' : 'physisorption at 77 k' }) Experiment type uploaded physisorption In [12]: pygaps.db_upload_experiment_data_type(pygaps.database, { 'type' : isotherm.loading_key, 'name' : 'mmol/g' 94 Chapter 1. Contents

99 }) pygaps.db_upload_experiment_data_type(pygaps.database, { 'type' : isotherm.pressure_key, 'unit' : 'bar' }) Data type uploaded {'type': 'loading', 'name': 'mmol/g'} Data type uploaded {'type': 'pressure', 'unit': 'bar'} Now we can try the upload again. In [13]: pygaps.db_upload_experiment(pygaps.database, isotherm) Success: Experimental isotherm Material: Carbon Batch: X1 Adsorbate used: N2 Isotherm temperature: 303.0K Isotherm type: physisorption Machine: homemade1 User: Bob Activation temperature: C Units: Unit for loading: mmol/g Unit for pressure: bar Other properties: Conclusion While the instantiation process is initially lengthy, after the constraints are added to the database, the infrastructure is in place for easy upload of isotherms. Clean-up If you run this ipython notebook with your own installation, run the following code to remove any residual values from the database. In [14]: pygaps.db_delete_experiment(pygaps.database, isotherm) pygaps.db_delete_sample(pygaps.database, novel_sample) pygaps.db_delete_source(pygaps.database, 'local') pygaps.db_delete_contact(pygaps.database, 'Alice') pygaps.db_delete_contact(pygaps.database, 'Bob') pygaps.db_delete_machine(pygaps.database, 'homemade1') pygaps.db_delete_sample_type(pygaps.database, 'novel') pygaps.db_delete_sample_property_type(pygaps.database, 'treatment') pygaps.db_delete_experiment_type(pygaps.database, 'physisorption') pygaps.db_delete_experiment_data_type(pygaps.database, isotherm.loading_key) pygaps.db_delete_experiment_data_type(pygaps.database, isotherm.pressure_key) Success: Experimental isotherm Material: Carbon Batch: X1 Adsorbate used: N2 Isotherm temperature: 303.0K Isotherm type: physisorption Machine: homemade1 User: Bob Activation temperature: C 1.5. Examples 95

100 Units: Unit for loading: mmol/g Unit for pressure: bar Other properties: Success Carbon X1 Success local Success Alice Success Bob Success homemade1 Success novel Success treatment Success physisorption Success loading Success pressure Graphing examples Import isotherms First import the example data by running the import notebook In [1]: %run import.ipynb import matplotlib.pyplot as plt Selected 0 samples Selected 23 adsorbates Selected 5 isotherms with nitrogen at 77K Selected 2 room temperature calorimetry isotherms Selected 2 isotherms for IAST calculation Selected 3 isotherms for isosteric heat calculation Isotherm display Example of using the Isotherm plotting function. In [2]: isotherm = isotherms_n2_77k[0] isotherm.print_info() Experimental isotherm Material: MCM-41 Batch: Test Adsorbate used: N2 Isotherm temperature: K Isotherm type: Isotherme Machine: Triflex User: PI Activation temperature: C Units: Unit for loading: mmol/g Unit for pressure: bar Other properties: 96 Chapter 1. Contents

101 Isotherm plotting and comparison Several examples will now follow A logarithmic isotherm graph comparing the adsorption branch of two isotherms up to 1 bar. The isotherms are measured on the same material and batch, but at different temperatures, so we want this information to be visible in the legend. We also want the loading to be displayed in cm3 STP. In [3]: pygaps.plot_iso( [isotherms_isosteric[0], isotherms_isosteric[1]], branch = ['ads'], logx = True, x_range=(none,1), legend_list=['t_exp'], 1.5. Examples 97

102 ) plt.show() unit_loading='cm3 STP' A black and white full scale graph of both adsorption and desorption branches of an isotherm, saving it to the local directory for a publication. The result file is found here. In [4]: import os path = os.path.join(os.getcwd(), 'novel') pygaps.plot_iso( [isotherms_n2_77k[0]], branch = ['ads', 'des'], color=false, save=true, 98 Chapter 1. Contents

103 ) fig_title='novel Behaviour', path=path, plt.show() A graph which plots the both the loading and enthalpy as a function of loading, for a calorimetry experiment. We want the legend to appear at the bottom of the graph and, due to error cumulation, to limit the maximum enthalpy displayed at 40 kj. In [5]: pygaps.plot_iso( [isotherms_calorimetry[1]], plot_type='combined', secondary_key='enthalpy', legend_bottom=true, y2_range=(0,40), 1.5. Examples 99

104 ) plt.show() A comparison graph of all the nitrogen isotherms, with both branches shown. In [6]: pygaps.plot_iso(isotherms_n2_77k, plot_type='isotherm', branch=['ads', 'des'], fig_title="regular isotherms colour", legend_list=['sample_name']) plt.show() 100 Chapter 1. Contents

105 A black and white version of the same graph, but with the pressure being in relative mode In [7]: pygaps.plot_iso(isotherms_n2_77k, plot_type='isotherm', branch=['ads', 'des'], color=false, fig_title="black and white", legend_list=['sample_name'], mode_pressure='relative') plt.show() 1.5. Examples 101

106 Only some ranges selected for display from all the isotherms In [8]: x_range = (0.2, 0.6) y1_range = (3, 10) pygaps.plot_iso(isotherms_n2_77k, plot_type='isotherm', branch=['ads', 'des'], x_range=x_range, y1_range=y1_range, fig_title="ranges selected", legend_list=['sample_name']) plt.show() 102 Chapter 1. Contents

107 The isosteric pressure isotherms, in relative pressure mode and displayed in cm3 STP In [9]: fig_title = "Different pressure mode or units" mode_pressure = 'relative' unit_loading = 'cm3 STP' pygaps.plot_iso(isotherms_isosteric, plot_type='isotherm', branch=['ads'], mode_pressure=mode_pressure, unit_loading=unit_loading, fig_title=fig_title, legend_list=['adsorbate', 't_exp']) plt.show() 1.5. Examples 103

IAST Documentation. Release Cory M. Simon

IAST Documentation. Release Cory M. Simon IAST Documentation Release 0.0.0 Cory M. Simon November 02, 2015 Contents 1 Installation 3 2 New to Python? 5 3 pyiast tutorial 7 3.1 Import the pure-component isotherm data................................

More information

pyiast Documentation Release Cory M. Simon

pyiast Documentation Release Cory M. Simon pyiast Documentation Release 0.0.0 Cory M. Simon Apr 15, 2018 Contents 1 Installation 5 2 New to Python? 7 3 pyiast tutorial 9 3.1 Import the pure-component isotherm data................................

More information

epistasis Documentation

epistasis Documentation epistasis Documentation Release 0.1 Zach Sailer May 19, 2017 Contents 1 Table of Contents 3 1.1 Setup................................................... 3 1.2 Basic Usage...............................................

More information

Algorithms for Uncertainty Quantification

Algorithms for Uncertainty Quantification Technische Universität München SS 2017 Lehrstuhl für Informatik V Dr. Tobias Neckel M. Sc. Ionuț Farcaș April 26, 2017 Algorithms for Uncertainty Quantification Tutorial 1: Python overview In this worksheet,

More information

Lab 1: Empirical Energy Methods Due: 2/14/18

Lab 1: Empirical Energy Methods Due: 2/14/18 Lab 1: Empirical Energy Methods Due: 2/14/18 General remarks on scientific scripting Scientific scripting for managing the input and output data is an important component of modern materials computations,

More information

DATA SCIENCE SIMPLIFIED USING ARCGIS API FOR PYTHON

DATA SCIENCE SIMPLIFIED USING ARCGIS API FOR PYTHON DATA SCIENCE SIMPLIFIED USING ARCGIS API FOR PYTHON LEAD CONSULTANT, INFOSYS LIMITED SEZ Survey No. 41 (pt) 50 (pt), Singapore Township PO, Ghatkesar Mandal, Hyderabad, Telengana 500088 Word Limit of the

More information

Scripting Languages Fast development, extensible programs

Scripting Languages Fast development, extensible programs Scripting Languages Fast development, extensible programs Devert Alexandre School of Software Engineering of USTC November 30, 2012 Slide 1/60 Table of Contents 1 Introduction 2 Dynamic languages A Python

More information

SOPHISTICATED DESIGN, INTUITIVE OPERATION, RESEARCH-GRADE RESULTS

SOPHISTICATED DESIGN, INTUITIVE OPERATION, RESEARCH-GRADE RESULTS SOPHISTICATED DESIGN, INTUITIVE OPERATION, RESEARCH-GRADE RESULTS ASAP 2020 Plus: Accelerated Surface Area and Porosimetry System The Micromeritics ASAP 2020 Plus integrates a variety of automated gas

More information

Python. Tutorial. Jan Pöschko. March 22, Graz University of Technology

Python. Tutorial. Jan Pöschko. March 22, Graz University of Technology Tutorial Graz University of Technology March 22, 2010 Why? is: very readable easy to learn interpreted & interactive like a UNIX shell, only better object-oriented but not religious about it slower than

More information

High-Pressure Volumetric Analyzer

High-Pressure Volumetric Analyzer High-Pressure Volumetric Analyzer High-Pressure Volumetric Analysis HPVA II Benefits Dual free-space measurement for accurate isotherm data Free space can be measured or entered Correction for non-ideality

More information

ST-Links. SpatialKit. Version 3.0.x. For ArcMap. ArcMap Extension for Directly Connecting to Spatial Databases. ST-Links Corporation.

ST-Links. SpatialKit. Version 3.0.x. For ArcMap. ArcMap Extension for Directly Connecting to Spatial Databases. ST-Links Corporation. ST-Links SpatialKit For ArcMap Version 3.0.x ArcMap Extension for Directly Connecting to Spatial Databases ST-Links Corporation www.st-links.com 2012 Contents Introduction... 3 Installation... 3 Database

More information

I. Numerical Computing

I. Numerical Computing I. Numerical Computing A. Lectures 1-3: Foundations of Numerical Computing Lecture 1 Intro to numerical computing Understand difference and pros/cons of analytical versus numerical solutions Lecture 2

More information

Contributing to Astropy: A community Python library for astronomers

Contributing to Astropy: A community Python library for astronomers Macalester Journal of Physics and Astronomy Volume 4 Issue 1 Spring 2016 Article 6 May 2016 Contributing to Astropy: A community Python library for astronomers Asra Nizami Macalester College, anizami@macalester.edu

More information

ADSORPTION IN MICROPOROUS MATERIALS: ANALYTICAL EQUATIONS FOR TYPE I ISOTHERMS AT HIGH PRESSURE

ADSORPTION IN MICROPOROUS MATERIALS: ANALYTICAL EQUATIONS FOR TYPE I ISOTHERMS AT HIGH PRESSURE ADSORPTION IN MICROPOROUS MATERIALS: ANALYTICAL EQUATIONS FOR TYPE I ISOTHERMS AT HIGH PRESSURE A. L. MYERS Department of Chemical and Biomolecular Engineering University of Pennsylvania, Philadelphia

More information

Satellite project, AST 1100

Satellite project, AST 1100 Satellite project, AST 1100 Introduction and useful information 0.1 Project overview In this project you are going to send a satellite from your home planet, in your own personal star system, to visit

More information

CSCE 155N Fall Homework Assignment 2: Stress-Strain Curve. Assigned: September 11, 2012 Due: October 02, 2012

CSCE 155N Fall Homework Assignment 2: Stress-Strain Curve. Assigned: September 11, 2012 Due: October 02, 2012 CSCE 155N Fall 2012 Homework Assignment 2: Stress-Strain Curve Assigned: September 11, 2012 Due: October 02, 2012 Note: This assignment is to be completed individually - collaboration is strictly prohibited.

More information

WindNinja Tutorial 3: Point Initialization

WindNinja Tutorial 3: Point Initialization WindNinja Tutorial 3: Point Initialization 6/27/2018 Introduction Welcome to WindNinja Tutorial 3: Point Initialization. This tutorial will step you through the process of downloading weather station data

More information

Tutorial for reading and manipulating catalogs in Python 1

Tutorial for reading and manipulating catalogs in Python 1 Tutorial for reading and manipulating catalogs in Python 1 First, download the data The catalogs that you will need for this exercise can be downloaded here: https://www.dropbox.com/sh/le0d8971tmufcqx/aaaxivdo2p_pg63orhkdudr7a?dl=0

More information

Advanced Forecast. For MAX TM. Users Manual

Advanced Forecast. For MAX TM. Users Manual Advanced Forecast For MAX TM Users Manual www.maxtoolkit.com Revised: June 24, 2014 Contents Purpose:... 3 Installation... 3 Requirements:... 3 Installer:... 3 Setup: spreadsheet... 4 Setup: External Forecast

More information

Apex Python library. Release 1.0.1

Apex Python library. Release 1.0.1 Apex Python library Release 1.0.1 Feb 28, 2018 Contents 1 Overview 1 1.1 Quick start................................................ 1 1.2 Documentation.............................................. 2

More information

Deep-dive into PyMISP MISP - Malware Information Sharing Platform & Threat Sharing

Deep-dive into PyMISP MISP - Malware Information Sharing Platform & Threat Sharing Deep-dive into PyMISP MISP - Malware Information Sharing Platform & Threat Sharing Team CIRCL http://www.misp-project.org/ Twitter: @MISPProject MISP Training @ Helsinki 20180423 Context MISP is complex

More information

BET Surface Area Analysis of Nanoparticles *

BET Surface Area Analysis of Nanoparticles * OpenStax-CNX module: m38278 1 BET Surface Area Analysis of Nanoparticles * Nina Hwang Andrew R. Barron This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License

More information

Pure Component Equations

Pure Component Equations Pure Component Equations Fitting of Pure Component Equations DDBSP - Dortmund Data Bank Software Package DDBST Software & Separation Technology GmbH Marie-Curie-Straße 10 D-26129 Oldenburg Tel.: +49 (0)

More information

Micromeritics Instrument Corporation

Micromeritics Instrument Corporation Gemini VII 2390 V1.02 (V1.02 t) Unit 1 Serial #: 188 Page 1 Summary Report Surface Area Single point surface area at p/p = 0.299645471: 64.7896 m²/g BET Surface Area: 65.9733 m²/g t-plot Micropore Area:

More information

Tutorial Three: Loops and Conditionals

Tutorial Three: Loops and Conditionals Tutorial Three: Loops and Conditionals Imad Pasha Chris Agostino February 18, 2015 1 Introduction In lecture Monday we learned that combinations of conditionals and loops could make our code much more

More information

ON SITE SYSTEMS Chemical Safety Assistant

ON SITE SYSTEMS Chemical Safety Assistant ON SITE SYSTEMS Chemical Safety Assistant CS ASSISTANT WEB USERS MANUAL On Site Systems 23 N. Gore Ave. Suite 200 St. Louis, MO 63119 Phone 314-963-9934 Fax 314-963-9281 Table of Contents INTRODUCTION

More information

Department of Chemical Engineering University of California, Santa Barbara Spring Exercise 2. Due: Thursday, 4/19/09

Department of Chemical Engineering University of California, Santa Barbara Spring Exercise 2. Due: Thursday, 4/19/09 Department of Chemical Engineering ChE 210D University of California, Santa Barbara Spring 2012 Exercise 2 Due: Thursday, 4/19/09 Objective: To learn how to compile Fortran libraries for Python, and to

More information

Lecture 5. September 4, 2018 Math/CS 471: Introduction to Scientific Computing University of New Mexico

Lecture 5. September 4, 2018 Math/CS 471: Introduction to Scientific Computing University of New Mexico Lecture 5 September 4, 2018 Math/CS 471: Introduction to Scientific Computing University of New Mexico 1 Review: Office hours at regularly scheduled times this week Tuesday: 9:30am-11am Wed: 2:30pm-4:00pm

More information

ITC Expert User s Manual

ITC Expert User s Manual ITC Expert User s Manual 1 Section 1: ITC Expert Background... 3 Minimal Heats and Injections... 3 C Parameter... 3 C Limitations... 4 High C... 4 Low C... 6 Concentrations Ratio... 6 Section 2: ITC Expert

More information

Reaxys Pipeline Pilot Components Installation and User Guide

Reaxys Pipeline Pilot Components Installation and User Guide 1 1 Reaxys Pipeline Pilot components for Pipeline Pilot 9.5 Reaxys Pipeline Pilot Components Installation and User Guide Version 1.0 2 Introduction The Reaxys and Reaxys Medicinal Chemistry Application

More information

Administering your Enterprise Geodatabase using Python. Jill Penney

Administering your Enterprise Geodatabase using Python. Jill Penney Administering your Enterprise Geodatabase using Python Jill Penney Assumptions Basic knowledge of python Basic knowledge enterprise geodatabases and workflows You want code Please turn off or silence cell

More information

Appendix 4 Weather. Weather Providers

Appendix 4 Weather. Weather Providers Appendix 4 Weather Using weather data in your automation solution can have many benefits. Without weather data, your home automation happens regardless of environmental conditions. Some things you can

More information

Investigation of Mixed Gas Sorption in Lab-Scale. Dr. Andreas Möller

Investigation of Mixed Gas Sorption in Lab-Scale. Dr. Andreas Möller Investigation of Mixed Gas Sorption in Lab-Scale Dr. Andreas Möller 1 Technical Necessity: Application of porous Materials as Adsorbents Fine cleaning of Gases (i.e. purification of H 2, natural gas, bio

More information

WeatherHawk Weather Station Protocol

WeatherHawk Weather Station Protocol WeatherHawk Weather Station Protocol Purpose To log atmosphere data using a WeatherHawk TM weather station Overview A weather station is setup to measure and record atmospheric measurements at 15 minute

More information

The OptiSage module. Use the OptiSage module for the assessment of Gibbs energy data. Table of contents

The OptiSage module. Use the OptiSage module for the assessment of Gibbs energy data. Table of contents The module Use the module for the assessment of Gibbs energy data. Various types of experimental data can be utilized in order to generate optimized parameters for the Gibbs energies of stoichiometric

More information

Simulating Future Climate Change Using A Global Climate Model

Simulating Future Climate Change Using A Global Climate Model Simulating Future Climate Change Using A Global Climate Model Introduction: (EzGCM: Web-based Version) The objective of this abridged EzGCM exercise is for you to become familiar with the steps involved

More information

Chem Page IX - 1 LAB MANUAL Differential Scanning Calorimetry 09_dsc131.docx EXPERIMENT IX

Chem Page IX - 1 LAB MANUAL Differential Scanning Calorimetry 09_dsc131.docx EXPERIMENT IX Chem 366-3 Page IX - 1 LAB MANUAL Differential Scanning Calorimetry 09_dsc131.docx EXPERIMENT IX KINETICS OF DECOMPOSITION OF SODIUM BICARBONATE; A DIFFERENTIAL SCANNING CALORIMETRY EXPERIMENT 1. Purpose

More information

PyMISP - (ab)using MISP API with PyMISP MISP - Malware Information Sharing Platform & Threat Sharing

PyMISP - (ab)using MISP API with PyMISP MISP - Malware Information Sharing Platform & Threat Sharing PyMISP - (ab)using MISP API with PyMISP MISP - Malware Information Sharing Platform & Threat Sharing Alexandre Dulaunoy Andras Iklody Raphaël Vinot TLP:WHITE http://www.misp-project.org/ Twitter: @MISPProject

More information

Pysolar Documentation

Pysolar Documentation Pysolar Documentation Release 0.7 Brandon Stafford Mar 30, 2018 Contents 1 Difference from PyEphem 3 2 Difference from Sunpy 5 3 Prerequisites for use 7 4 Examples 9 4.1 Location calculation...........................................

More information

Creative Data Mining

Creative Data Mining Creative Data Mining Using ML algorithms in python Artem Chirkin Dr. Daniel Zünd Danielle Griego Lecture 7 0.04.207 /7 What we will cover today Outline Getting started Explore dataset content Inspect visually

More information

Chapter 2: The Physical Properties of Pure Compounds

Chapter 2: The Physical Properties of Pure Compounds Chapter 2: The Physical Properties of Pure Compounds 2-10. The boiler is an important unit operation in the Rankine cycle. This problem further explores the phenomenon of boiling. A. When you are heating

More information

ISO 9277 INTERNATIONAL STANDARD. Determination of the specific surface area of solids by gas adsorption BET method

ISO 9277 INTERNATIONAL STANDARD. Determination of the specific surface area of solids by gas adsorption BET method INTERNATIONAL STANDARD ISO 9277 Second edition 2010-09-01 Determination of the specific surface area of solids by gas adsorption BET method Détermination de l'aire massique (surface spécifique) des solides

More information

This tutorial is intended to familiarize you with the Geomatica Toolbar and describe the basics of viewing data using Geomatica Focus.

This tutorial is intended to familiarize you with the Geomatica Toolbar and describe the basics of viewing data using Geomatica Focus. PCI GEOMATICS GEOMATICA QUICKSTART 1. Introduction This tutorial is intended to familiarize you with the Geomatica Toolbar and describe the basics of viewing data using Geomatica Focus. All data used in

More information

Storage of Hydrogen, Methane and Carbon Dioxide in Highly Porous Covalent Organic Frameworks for Clean Energy Applications

Storage of Hydrogen, Methane and Carbon Dioxide in Highly Porous Covalent Organic Frameworks for Clean Energy Applications Storage of Hydrogen, Methane and Carbon Dioxide in Highly Porous Covalent Organic Frameworks for Clean Energy Applications (Supporting Information: 33 pages) Hiroyasu Furukawa and Omar M. Yaghi Center

More information

Week 2: Defining Computation

Week 2: Defining Computation Computational Complexity Theory Summer HSSP 2018 Week 2: Defining Computation Dylan Hendrickson MIT Educational Studies Program 2.1 Turing Machines Turing machines provide a simple, clearly defined way

More information

Data Structures & Database Queries in GIS

Data Structures & Database Queries in GIS Data Structures & Database Queries in GIS Objective In this lab we will show you how to use ArcGIS for analysis of digital elevation models (DEM s), in relationship to Rocky Mountain bighorn sheep (Ovis

More information

Monte Python. the way back from cosmology to Fundamental Physics. Miguel Zumalacárregui. Nordic Institute for Theoretical Physics and UC Berkeley

Monte Python. the way back from cosmology to Fundamental Physics. Miguel Zumalacárregui. Nordic Institute for Theoretical Physics and UC Berkeley the way back from cosmology to Fundamental Physics Nordic Institute for Theoretical Physics and UC Berkeley IFT School on Cosmology Tools March 2017 Related Tools Version control and Python interfacing

More information

WindNinja Tutorial 3: Point Initialization

WindNinja Tutorial 3: Point Initialization WindNinja Tutorial 3: Point Initialization 07/20/2017 Introduction Welcome to. This tutorial will step you through the process of running a WindNinja simulation that is initialized by location specific

More information

Yes, the Library will be accessible via the new PULSE and the existing desktop version of PULSE.

Yes, the Library will be accessible via the new PULSE and the existing desktop version of PULSE. F R E Q U E N T L Y A S K E D Q U E S T I O N S THE LIBRARY GENERAL W H A T I S T H E L I B R A R Y? The Library is the new, shorter, simpler name for the Business Development (Biz Dev) Library. It s your

More information

mylab: Chemical Safety Module Last Updated: January 19, 2018

mylab: Chemical Safety Module Last Updated: January 19, 2018 : Chemical Safety Module Contents Introduction... 1 Getting started... 1 Login... 1 Receiving Items from MMP Order... 3 Inventory... 4 Show me Chemicals where... 4 Items Received on... 5 All Items... 5

More information

OECD QSAR Toolbox v.3.0

OECD QSAR Toolbox v.3.0 OECD QSAR Toolbox v.3.0 Step-by-step example of how to categorize an inventory by mechanistic behaviour of the chemicals which it consists Background Objectives Specific Aims Trend analysis The exercise

More information

ESPRIT Feature. Innovation with Integrity. Particle detection and chemical classification EDS

ESPRIT Feature. Innovation with Integrity. Particle detection and chemical classification EDS ESPRIT Feature Particle detection and chemical classification Innovation with Integrity EDS Fast and Comprehensive Feature Analysis Based on the speed and accuracy of the QUANTAX EDS system with its powerful

More information

OECD QSAR Toolbox v.3.3. Step-by-step example of how to categorize an inventory by mechanistic behaviour of the chemicals which it consists

OECD QSAR Toolbox v.3.3. Step-by-step example of how to categorize an inventory by mechanistic behaviour of the chemicals which it consists OECD QSAR Toolbox v.3.3 Step-by-step example of how to categorize an inventory by mechanistic behaviour of the chemicals which it consists Background Objectives Specific Aims Trend analysis The exercise

More information

VPython Class 2: Functions, Fields, and the dreaded ˆr

VPython Class 2: Functions, Fields, and the dreaded ˆr Physics 212E Classical and Modern Physics Spring 2016 1. Introduction VPython Class 2: Functions, Fields, and the dreaded ˆr In our study of electric fields, we start with a single point charge source

More information

Getting started with BatchReactor Example : Simulation of the Chlorotoluene chlorination

Getting started with BatchReactor Example : Simulation of the Chlorotoluene chlorination Getting started with BatchReactor Example : Simulation of the Chlorotoluene chlorination 2011 ProSim S.A. All rights reserved. Introduction This document presents the different steps to follow in order

More information

Software Testing Lecture 7 Property Based Testing. Justin Pearson

Software Testing Lecture 7 Property Based Testing. Justin Pearson Software Testing Lecture 7 Property Based Testing Justin Pearson 2017 1 / 13 When are there enough unit tests? Lets look at a really simple example. import u n i t t e s t def add ( x, y ) : return x+y

More information

An ESRI Technical Paper June 2007 An Overview of Distributing Data with Geodatabases

An ESRI Technical Paper June 2007 An Overview of Distributing Data with Geodatabases An ESRI Technical Paper June 2007 An Overview of Distributing Data with Geodatabases ESRI 380 New York St., Redlands, CA 92373-8100 USA TEL 909-793-2853 FAX 909-793-5953 E-MAIL info@esri.com WEB www.esri.com

More information

Determination of Density 1

Determination of Density 1 Introduction Determination of Density 1 Authors: B. D. Lamp, D. L. McCurdy, V. M. Pultz and J. M. McCormick* Last Update: February 1, 2013 Not so long ago a statistical data analysis of any data set larger

More information

Bloomsburg University Weather Viewer Quick Start Guide. Software Version 1.2 Date 4/7/2014

Bloomsburg University Weather Viewer Quick Start Guide. Software Version 1.2 Date 4/7/2014 Bloomsburg University Weather Viewer Quick Start Guide Software Version 1.2 Date 4/7/2014 Program Background / Objectives: The Bloomsburg Weather Viewer is a weather visualization program that is designed

More information

Graphical User Interfaces for Emittance and Correlation Plot. Henrik Loos

Graphical User Interfaces for Emittance and Correlation Plot. Henrik Loos Graphical User Interfaces for Emittance and Correlation Plot Common GUI Features Overview Files Configs Measure Data Point Export Common GUI Features Save Saves the present data. Auto-generated file name

More information

Conjugate-Gradient. Learn about the Conjugate-Gradient Algorithm and its Uses. Descent Algorithms and the Conjugate-Gradient Method. Qx = b.

Conjugate-Gradient. Learn about the Conjugate-Gradient Algorithm and its Uses. Descent Algorithms and the Conjugate-Gradient Method. Qx = b. Lab 1 Conjugate-Gradient Lab Objective: Learn about the Conjugate-Gradient Algorithm and its Uses Descent Algorithms and the Conjugate-Gradient Method There are many possibilities for solving a linear

More information

Cosmic Ray Detector Software

Cosmic Ray Detector Software Cosmic Ray Detector Software Studying cosmic rays has never been easier Matthew Jones Purdue University 2012 QuarkNet Summer Workshop 1 Brief History First cosmic ray detector built at Purdue in about

More information

Fog Monitor 100 (FM 100) Extinction Module. Operator Manual

Fog Monitor 100 (FM 100) Extinction Module. Operator Manual Particle Analysis and Display System (PADS): Fog Monitor 100 (FM 100) Extinction Module Operator Manual DOC-0217 Rev A-1 PADS 2.7.3, FM 100 Extinction Module 2.7.0 5710 Flatiron Parkway, Unit B Boulder,

More information

VersaWin DA DR DH HK QSDFT SF. Gas Sorption Software

VersaWin DA DR DH HK QSDFT SF. Gas Sorption Software BET BJH DA DR DH HK QSDFT SF NLDFT STSA Gas Sorption Software VersaWin is a new stand-alone data reduction package that can open existing Quantachrome physisorption file types and import physisorption

More information

Experimental Methods and Analysis

Experimental Methods and Analysis Chapter 3 28 Experimental Methods and Analysis 1. Equipment The fundamental basis of quantitative adsorption analysis is the measurement of excess adsorption isotherms. Each isotherm comprises a series

More information

Planning Softproviding Meat User Documentation

Planning Softproviding Meat User Documentation Great ideas are always simple Softproviding simply makes them happen. Planning Softproviding Meat User Documentation Version: 1.00 Date: 24 August 2017 Release: v5.50 Softproviding AG Riehenring 175 CH-4058

More information

bw2-regional Documentation

bw2-regional Documentation bw2-regional Documentation Release 0.2 Chris Mutel July 05, 2015 Contents 1 Spatial scales (geocollections) 3 2 Intersections 5 3 Import regionalized characterization factors 7 3.1 Data and data formats..........................................

More information

Ideal and powerful solution

Ideal and powerful solution Thermo Scientific Indiko Plus Clinical and specialty chemistry system Ideal and powerful solution for operational excellence Enzymes Substrates Electrolytes Specific Proteins Drugs of Abuse Analysis Therapeutic

More information

Practical Information

Practical Information MA2501 Numerical Methods Spring 2018 Norwegian University of Science and Technology Department of Mathematical Sciences Semester Project Practical Information This project counts for 30 % of the final

More information

Alpha spectrometry systems. A users perspective. George Ham. 26 th May Date Month Year

Alpha spectrometry systems. A users perspective. George Ham. 26 th May Date Month Year Alpha spectrometry systems A users perspective George Ham Date Month Year 26 th May 2005 Centre for Radiation, Chemical and Environmental Hazards Radiation Protection Division formerly the National Radiological

More information

pygmm Documentation Release Albert Kottke

pygmm Documentation Release Albert Kottke pygmm Documentation Release 0.3.0 Albert Kottke March 16, 2016 Contents 1 pygmm 3 1.1 Features.................................................. 3 1.2 Credits..................................................

More information

A powerful site for all chemists CHOICE CRC Handbook of Chemistry and Physics

A powerful site for all chemists CHOICE CRC Handbook of Chemistry and Physics Chemical Databases Online A powerful site for all chemists CHOICE CRC Handbook of Chemistry and Physics Combined Chemical Dictionary Dictionary of Natural Products Dictionary of Organic Dictionary of Drugs

More information

A Brief Introduction To. GRTensor. On MAPLE Platform. A write-up for the presentation delivered on the same topic as a part of the course PHYS 601

A Brief Introduction To. GRTensor. On MAPLE Platform. A write-up for the presentation delivered on the same topic as a part of the course PHYS 601 A Brief Introduction To GRTensor On MAPLE Platform A write-up for the presentation delivered on the same topic as a part of the course PHYS 601 March 2012 BY: ARSHDEEP SINGH BHATIA arshdeepsb@gmail.com

More information

Full GAED Characterization with Aqueous-phase comparisons for Sample EE-541 February 22, 2015

Full GAED Characterization with Aqueous-phase comparisons for Sample EE-541 February 22, 2015 1 Full GAED Characterization with Aqueous- comparisons for Sample February 22, 2015 Executive Summary One sample of granular activated carbon (GAC) was fully characterized for aqueous comparison using

More information

Performing Map Cartography. using Esri Production Mapping

Performing Map Cartography. using Esri Production Mapping AGENDA Performing Map Cartography Presentation Title using Esri Production Mapping Name of Speaker Company Name Kannan Jayaraman Agenda Introduction What s New in ArcGIS 10.1 ESRI Production Mapping Mapping

More information

STEAMEST: A Software Tool for Estimation of Physical Properties of Water and Steam

STEAMEST: A Software Tool for Estimation of Physical Properties of Water and Steam 226 JOURNAL OF SOFTWARE, VOL. 4, NO. 3, MAY 2009 STEAMEST: A Software Tool for Estimation of Physical Properties of Water and Steam Muhammad Faheem Department of Chemical Engineering, University of Engineering

More information

Silver-Decorated Hafnium Metal-Organic Framework for. Ethylene/Ethane Separation

Silver-Decorated Hafnium Metal-Organic Framework for. Ethylene/Ethane Separation Supporting Information Silver-Decorated Hafnium Metal-Organic Framework for Ethylene/Ethane Separation Yuxiang Wang, Zhigang Hu, Youdong Cheng, and Dan Zhao * Department of Chemical & Biomolecular Engineering,

More information

Geodatabase Programming with Python

Geodatabase Programming with Python DevSummit DC February 11, 2015 Washington, DC Geodatabase Programming with Python Craig Gillgrass Assumptions Basic knowledge of python Basic knowledge enterprise geodatabases and workflows Please turn

More information

Analyzing the Earth Using Remote Sensing

Analyzing the Earth Using Remote Sensing Analyzing the Earth Using Remote Sensing Instructors: Dr. Brian Vant- Hull: Steinman 185, 212-650- 8514 brianvh@ce.ccny.cuny.edu Ms. Hannah Aizenman: NAC 7/311, 212-650- 6295 haizenman@ccny.cuny.edu Dr.

More information

Mass Asset Additions. Overview. Effective mm/dd/yy Page 1 of 47 Rev 1. Copyright Oracle, All rights reserved.

Mass Asset Additions.  Overview. Effective mm/dd/yy Page 1 of 47 Rev 1. Copyright Oracle, All rights reserved. Overview Effective mm/dd/yy Page 1 of 47 Rev 1 System References None Distribution Oracle Assets Job Title * Ownership The Job Title [list@yourcompany.com?subject=eduxxxxx] is responsible for ensuring

More information

Assignment 4: Object creation

Assignment 4: Object creation Assignment 4: Object creation ETH Zurich Hand-out: 13 November 2006 Due: 21 November 2006 Copyright FarWorks, Inc. Gary Larson 1 Summary Today you are going to create a stand-alone program. How to create

More information

spiderman Documentation

spiderman Documentation spiderman Documentation Release 0.2.2 Tom Louden Oct 18, 2018 Contents 1 Installation 3 1.1 pip.................................................... 3 1.2 From source...............................................

More information

Gradient Descent Methods

Gradient Descent Methods Lab 18 Gradient Descent Methods Lab Objective: Many optimization methods fall under the umbrella of descent algorithms. The idea is to choose an initial guess, identify a direction from this point along

More information

Assignment 1 Physics/ECE 176

Assignment 1 Physics/ECE 176 Assignment 1 Physics/ECE 176 Made available: Thursday, January 13, 211 Due: Thursday, January 2, 211, by the beginning of class. Overview Before beginning this assignment, please read carefully the part

More information

Release Notes Digimat 6.0.1

Release Notes Digimat 6.0.1 Release Notes Digimat 6.0.1 May 2015 p. 2 p. 3 p.4 p. 6 p. 7 p. 9 - p.10 1 P a g e C o p y r i g h t M S C S o f t w a r e B e l g i u m, 2015 New Capabilities Failure indicators o Temperature dependent

More information

Full GAED Characterization with Aqueous-phase comparisons for Sample EE-541 February 22, 2015

Full GAED Characterization with Aqueous-phase comparisons for Sample EE-541 February 22, 2015 1 Full GAED Characterization with Aqueous- comparisons for Sample February 22, 2015 Executive Summary One sample of granular activated carbon (GAC) was fully characterized for aqueous comparison using

More information

It s about time... The only timeline tool you ll ever need!

It s about time... The only timeline tool you ll ever need! It s about time... The only timeline tool you ll ever need! Introduction about me Jon Tomczak Senior Consultant Crypsis Game Dev turned Forensicator Past: Started TZWorks in 2006 Consultant at Mandiant

More information

TitriSoft 2.5. Content

TitriSoft 2.5. Content Content TitriSoft 2.5... 1 Content... 2 General Remarks... 3 Requirements of TitriSoft 2.5... 4 Installation... 5 General Strategy... 7 Hardware Center... 10 Method Center... 13 Titration Center... 28

More information

SpringerMaterials The fastest solution for identifying material properties

SpringerMaterials The fastest solution for identifying material properties materials.springer.com SpringerMaterials The fastest solution for identifying material properties Comprehensive, curated data for major materials science areas Save time with search options optimized for

More information

Turing Machines Part Three

Turing Machines Part Three Turing Machines Part Three What problems can we solve with a computer? What kind of computer? Very Important Terminology Let M be a Turing machine. M accepts a string w if it enters an accept state when

More information

Interacting Galaxies

Interacting Galaxies Interacting Galaxies Contents Introduction... 1 Downloads... 1 Selecting Interacting Galaxies to Observe... 2 Measuring the sizes of the Galaxies... 5 Making a Colour Image in IRIS... 8 External Resources...

More information

The Monte Carlo Method

The Monte Carlo Method ORBITAL.EXE Page 1 of 9 ORBITAL.EXE is a Visual Basic 3.0 program that runs under Microsoft Windows 9x. It allows students and presenters to produce probability-based three-dimensional representations

More information

CHEMISTRY 130 General Chemistry I. Radioisotopes

CHEMISTRY 130 General Chemistry I. Radioisotopes CHEMISTRY 130 General Chemistry I Radioisotopes Positron Emission Tomography or PET scans use the radioisotope 18 F to create an image of the brain. DEPARTMENT OF CHEMISTRY UNIVERSITY OF KANSAS Radioisotopes

More information

Algebra Exam. Solutions and Grading Guide

Algebra Exam. Solutions and Grading Guide Algebra Exam Solutions and Grading Guide You should use this grading guide to carefully grade your own exam, trying to be as objective as possible about what score the TAs would give your responses. Full

More information

Last updated: Copyright

Last updated: Copyright Last updated: 2012-08-20 Copyright 2004-2012 plabel (v2.4) User s Manual by Bioinformatics Group, Institute of Computing Technology, Chinese Academy of Sciences Tel: 86-10-62601016 Email: zhangkun01@ict.ac.cn,

More information

ATLAS of Biochemistry

ATLAS of Biochemistry ATLAS of Biochemistry USER GUIDE http://lcsb-databases.epfl.ch/atlas/ CONTENT 1 2 3 GET STARTED Create your user account NAVIGATE Curated KEGG reactions ATLAS reactions Pathways Maps USE IT! Fill a gap

More information

Extending MISP with Python modules MISP - Malware Information Sharing Platform & Threat Sharing

Extending MISP with Python modules MISP - Malware Information Sharing Platform & Threat Sharing Extending MISP with Python modules MISP - Malware Information Sharing Platform & Threat Sharing Alexandre Dulaunoy Andras Iklody TLP:WHITE June 16, 2016 Why we want to go more modular... Ways to extend

More information

A GUI FOR EVOLVE ZAMS

A GUI FOR EVOLVE ZAMS A GUI FOR EVOLVE ZAMS D. R. Schlegel Computer Science Department Here the early work on a new user interface for the Evolve ZAMS stellar evolution code is presented. The initial goal of this project is

More information

Characterisation of Porous Hydrogen Storage Materials: Carbons, Zeolites, MOFs and PIMs

Characterisation of Porous Hydrogen Storage Materials: Carbons, Zeolites, MOFs and PIMs Characterisation of Porous Hydrogen Storage Materials: Carbons, Zeolites, MOFs and PIMs Steven Tedds, a * Allan Walton, a Darren P. Broom, b and David Book a DOI:.39/c0fd00022a Electronic Supplementary

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Objective: Students will gain familiarity with using Excel to record data, display data properly, use built-in formulae to do calculations, and plot and fit data with linear functions.

More information