particula.activity.convert_functional_group
OH equivalent for the oxygen to carbon ratio and molar mass ratio.
Gorkowski, K., Preston, T. C., & Zuend, A. (2019). Relative-humidity-dependent organic aerosol thermodynamics Via an efficient reduced-complexity model. Atmospheric Chemistry and Physics https://doi.org/10.5194/acp-19-13383-2019
Attributes
| Name | Description |
|---|---|
FloatArray | No description. |
SUPPORTED_FUNCTIONAL_GROUPS | No description. |
_FUNCTIONAL_GROUP_ADJUSTMENTS | No description. |
Functions
| Name | Description |
|---|---|
_normalize_functional_group | No description. |
convert_to_oh_equivalent | Convert oxygen and molar mass ratios for BAT functional groups. |
FloatArrayattributemodule attribute#
FloatArray = Union[float, NDArray[np.float64]]SUPPORTED_FUNCTIONAL_GROUPSattributemodule attribute#
SUPPORTED_FUNCTIONAL_GROUPS = (None, *tuple(_FUNCTIONAL_GROUP_ADJUSTMENTS.keys()))_FUNCTIONAL_GROUP_ADJUSTMENTSattributemodule attribute#
_FUNCTIONAL_GROUP_ADJUSTMENTS = {'alcohol': (1.0, 16.0), 'ether': (1.0, 16.0), 'carboxylic_acid': (2.0, 45.0)}_normalize_functional_groupfunction#
def _normalize_functional_group(functional_group: Optional[Union[str, Sequence[str]]]) -> Optional[str]convert_to_oh_equivalentfunction#
def convert_to_oh_equivalent(oxygen2carbon: FloatArray, molar_mass_ratio: FloatArray, functional_group: Optional[Union[str, Sequence[str]]] = None) -> Tuple[FloatArray, FloatArray]Convert oxygen and molar mass ratios for BAT functional groups.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
oxygen2carbon | FloatArray | required | The oxygen to carbon ratio. |
molar_mass_ratio | FloatArray | required | The molar mass ratio of water to organic matter. |
functional_group | Optional[Union[str, Sequence[str]]] | None | Optional functional group requiring adjustments.
Supported values are None, "alcohol", "ether", and
"carboxylic_acid". |
Returns
FloatArray- Tuple containing the converted oxygen2carbon and molar_mass_ratio.
FloatArray- Scalar inputs return scalars, array inputs return
np.ndarray.
Raises
ValueError- If
functional_groupis not one of the supported values.
Examples
>>> from particula.activity.convert_functional_group import (... convert_to_oh_equivalent,... )>>> convert_to_oh_equivalent(... oxygen2carbon=0.3,... molar_mass_ratio=0.1,... functional_group="carboxylic_acid",... )(2.3, 45.1)