Skip to content

Commit

Permalink
Make the constants show up in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dostuffthatmatters committed Aug 29, 2024
1 parent cfb786d commit f3e525b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
30 changes: 30 additions & 0 deletions docs/pages/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,36 @@ Loads the output of Proffast 2 into a polars DataFrame.
A polars DataFrame containing all columns.


##### `SERIAL_NUMBERS`

The serial numbers of the EM27 devices.


##### `COLORS`

Colors recommended for plotting the EM27 data.


##### `COLORS_LIGHT`

Lighter colors recommended for plotting the EM27 data.


##### `COLORS_DARK`

Darker colors recommended for plotting the EM27 data.


##### `PROFFAST_MULTIPLIERS`

Multiplication factors for the EM27 data retrieved using Proffast to bring the data in a common unit.


##### `PROFFAST_UNITS`

Units for the EM27 data retrieved using Proffast after applying the multiplication factor.


## `tum_esm_utils.files`

File-related utility functions.
Expand Down
15 changes: 13 additions & 2 deletions tum_esm_utils/em27.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ def load_proffast2_result(path: str) -> pl.DataFrame:
"me": 117,
"kc": 83,
}
"""The serial numbers of the EM27 devices."""

COLORS: dict[str, str] = {
"ma": TCH.YELLOW_500,
"mb": TCH.ORANGE_500,
Expand All @@ -266,6 +268,8 @@ def load_proffast2_result(path: str) -> pl.DataFrame:
"me": TCH.BLUE_500,
"kc": TCH.GREEN_500,
}
"""Colors recommended for plotting the EM27 data."""

COLORS_LIGHT: dict[str, str] = {
"ma": TCH.YELLOW_400,
"mb": TCH.ORANGE_400,
Expand All @@ -274,6 +278,8 @@ def load_proffast2_result(path: str) -> pl.DataFrame:
"me": TCH.BLUE_400,
"kc": TCH.GREEN_400,
}
"""Lighter colors recommended for plotting the EM27 data."""

COLORS_DARK: dict[str, str] = {
"ma": TCH.YELLOW_600,
"mb": TCH.ORANGE_600,
Expand All @@ -282,7 +288,9 @@ def load_proffast2_result(path: str) -> pl.DataFrame:
"me": TCH.BLUE_600,
"kc": TCH.GREEN_600,
}
MULTIPLIERS: dict[str, float] = {
"""Darker colors recommended for plotting the EM27 data."""

PROFFAST_MULTIPLIERS: dict[str, float] = {
"XCO2": 1,
"XCH4": 1000,
"XCO": 1000,
Expand All @@ -302,7 +310,9 @@ def load_proffast2_result(path: str) -> pl.DataFrame:
"CO": 1 / (6.022 * 10e+23),
"CH4_S5P": 1 / (6.022 * 10e+23),
}
UNITS: dict[str, str] = {
"""Multiplication factors for the EM27 data retrieved using Proffast to bring the data in a common unit."""

PROFFAST_UNITS: dict[str, str] = {
"XH2O": "ppm",
"XAIR": "ppm",
"XCO2": "ppm",
Expand All @@ -318,3 +328,4 @@ def load_proffast2_result(path: str) -> pl.DataFrame:
"CO": "mol",
"CH4_S5P": "mol",
}
"""Units for the EM27 data retrieved using Proffast after applying the multiplication factor."""

0 comments on commit f3e525b

Please sign in to comment.