Skip to content

Commit

Permalink
formatting/typing
Browse files Browse the repository at this point in the history
  • Loading branch information
pauliacomi committed Nov 8, 2021
1 parent f8927ea commit 0b5bb1a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/pygaps/characterisation/area_bet.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def area_BET(isotherm, branch='ads', limits=None, verbose=False):
'bet_slope': slope,
'bet_intercept': intercept,
'corr_coef': corr_coef,
'limits': [minimum, maximum]
'limits': (minimum, maximum)
}


Expand Down
2 changes: 1 addition & 1 deletion src/pygaps/characterisation/area_langmuir.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def area_langmuir(isotherm, branch='ads', limits=None, verbose=False):
'langmuir_slope': slope,
'langmuir_intercept': intercept,
'corr_coef': corr_coef,
'limits': [minimum, maximum]
'limits': (minimum, maximum)
}


Expand Down
9 changes: 6 additions & 3 deletions src/pygaps/characterisation/isosteric_enthalpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,12 @@ def isosteric_enthalpy(
) for iso in isotherms
]).T

iso_enthalpy, slopes, correlation, std_errs = isosteric_enthalpy_raw(
pressures, temperatures
)
(
iso_enthalpy,
slopes,
correlation,
std_errs,
) = isosteric_enthalpy_raw(pressures, temperatures)

if verbose:
isosteric_enthalpy_plot(loading, iso_enthalpy, std_errs)
Expand Down
18 changes: 10 additions & 8 deletions src/pygaps/characterisation/psd_mesoporous.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
Methods of calculating a pore size distribution for pores in the mesopore range
(2-100 nm), based on the Kelvin equation and pore condensation/evaporation.
"""
import typing as t

import numpy

from ..core.adsorbate import Adsorbate
from ..core.baseisotherm import BaseIsotherm
from ..graphing.calc_graphs import psd_plot
from ..utilities.exceptions import CalculationError
from ..utilities.exceptions import ParameterError
Expand All @@ -19,14 +21,14 @@


def psd_mesoporous(
isotherm,
psd_model='pygaps-DH',
pore_geometry='cylinder',
branch='des',
thickness_model='Harkins/Jura',
kelvin_model='Kelvin',
p_limits=None,
verbose=False
isotherm: BaseIsotherm,
psd_model: str = 'pygaps-DH',
pore_geometry: str = 'cylinder',
branch: str = 'des',
thickness_model: str = 'Harkins/Jura',
kelvin_model: str = 'Kelvin',
p_limits: t.Optional[t.Tuple[float, float]] = None,
verbose: bool = False
):
r"""
Calculate the mesopore size distribution.
Expand Down
2 changes: 1 addition & 1 deletion src/pygaps/characterisation/psd_microporous.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def psd_microporous(
branch: str = 'ads',
material_model: str = 'Carbon(HK)',
adsorbate_model: str = None,
p_limits: t.List[float] = None,
p_limits: t.Optional[t.Tuple[float, float]] = None,
verbose: bool = False
) -> t.Mapping:
r"""
Expand Down
1 change: 0 additions & 1 deletion src/pygaps/graphing/calc_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ def isosteric_enthalpy_plot(
ax.xaxis.set_major_locator(
plt.ticker.LogLocator(base=10.0, numticks=15, numdecs=20)
)
ax.set_title("Isosteric enthalpy", **TITLE_STYLE)
ax.set_xlabel(r'Loading [$mmol\/g^{-1}$]', **LABEL_STYLE)
ax.set_ylabel(r'Isosteric enthalpy [$kJ\/mol^{-1}$]', **LABEL_STYLE)
ax.legend(loc='best', **LEGEND_STYLE)
Expand Down

0 comments on commit 0b5bb1a

Please sign in to comment.