Skip to content

Commit

Permalink
Add links to dataset documentation everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
mats-knmi committed Aug 12, 2024
1 parent 369ef4a commit cb25820
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
1 change: 1 addition & 0 deletions pysteps/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def get_precipitation_fields(
Returns
-------
dataset: xarray.Dataset
As described in the documentation of :py:mod:`pysteps.io.importers`.
"""

if source == "bom":
Expand Down
9 changes: 6 additions & 3 deletions pysteps/utils/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def to_rainrate(dataset: xr.Dataset, zr_a=None, zr_b=None):
Parameters
----------
dataset: xarray.Dataset
Dataset to be (back-)transformed.
Dataset to be (back-)transformed as described in the documentation of
:py:mod:`pysteps.io.importers`.
Additionally, in case of conversion to/from reflectivity units, the
zr_a and zr_b attributes are also required,
Expand Down Expand Up @@ -160,7 +161,8 @@ def to_raindepth(dataset: xr.Dataset, zr_a=None, zr_b=None):
Parameters
----------
dataset: xarray.Dataset
Dataset to be (back-)transformed.
Dataset to be (back-)transformed as described in the documentation of
:py:mod:`pysteps.io.importers`.
Additionally, in case of conversion to/from reflectivity units, the
zr_a and zr_b attributes are also required,
Expand Down Expand Up @@ -249,7 +251,8 @@ def to_reflectivity(dataset: xr.Dataset, zr_a=None, zr_b=None):
Parameters
----------
dataset: xarray.Dataset
Dataset to be (back-)transformed.
Dataset to be (back-)transformed as described in the documentation of
:py:mod:`pysteps.io.importers`.
Additionally, in case of conversion to/from reflectivity units, the
zr_a and zr_b attributes are also required,
Expand Down
16 changes: 10 additions & 6 deletions pysteps/utils/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def aggregate_fields_time(
Parameters
----------
dataset: xarray.Dataset
Dataset containing
a time series of (ensemble) input fields.
Dataset containing a time series of (ensemble) input fields
as described in the documentation of :py:mod:`pysteps.io.importers`.
They must be evenly spaced in time.
time_window_min: float or None
The length in minutes of the time window that is used to
Expand Down Expand Up @@ -112,7 +112,8 @@ def aggregate_fields_space(
----------
dataset: xarray.Dataset
Dataset containing a single field or
a time series of (ensemble) input fields.
a time series of (ensemble) input fields as described in the documentation of
:py:mod:`pysteps.io.importers`.
space_window: float, tuple or None
The length of the space window that is used to upscale the fields.
If a float is given, the same window size is used for the x- and
Expand Down Expand Up @@ -182,7 +183,8 @@ def aggregate_fields(
Parameters
----------
dataset: xarray.Dataset
Dataset containing the input fields.
Dataset containing the input fields as described in the documentation of
:py:mod:`pysteps.io.importers`.
window_size: int or array-like of ints
The length of the window that is used to aggregate the fields.
If a single integer value is given, the same window is used for
Expand Down Expand Up @@ -273,7 +275,8 @@ def clip_domain(dataset: xr.Dataset, extent=None):
Parameters
----------
dataset: xarray.Dataset
Dataset containing the input fields.
Dataset containing the input fields as described in the documentation of
:py:mod:`pysteps.io.importers`.
extent: scalars (left, right, bottom, top), optional
The extent of the bounding box in data coordinates to be used to clip
the data.
Expand Down Expand Up @@ -325,7 +328,8 @@ def square_domain(dataset: xr.Dataset, method="pad", inverse=False):
Parameters
----------
dataset: xarray.Dataset
Dataset containing the input fields.
Dataset containing the input fields as described in the documentation of
:py:mod:`pysteps.io.importers`.
method: {'pad', 'crop'}, optional
Either pad or crop.
If pad, an equal number of zeros is added to both ends of its shortest
Expand Down
12 changes: 8 additions & 4 deletions pysteps/utils/transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def boxcox_transform(
Parameters
----------
dataset: xarray.Dataset
Dataset to be transformed.
Dataset to be transformed as described in the documentation of
:py:mod:`pysteps.io.importers`.
Lambda: float, optional
Parameter Lambda of the Box-Cox transformation.
It is 0 by default, which produces the log transformation.
Expand Down Expand Up @@ -147,7 +148,8 @@ def dB_transform(
Parameters
----------
dataset: xarray.Dataset
Dataset to be (back-)transformed.
Dataset to be (back-)transformed as described in the documentation of
:py:mod:`pysteps.io.importers`.
threshold: float, optional
Optional value that is used for thresholding with the same units as in the dataset.
If None, the threshold contained in metadata is used.
Expand Down Expand Up @@ -224,7 +226,8 @@ def NQ_transform(dataset: xr.Dataset, inverse: bool = False, **kwargs) -> xr.Dat
Parameters
----------
dataset: xarray.Dataset
Dataset to be transformed.
Dataset to be transformed as described in the documentation of
:py:mod:`pysteps.io.importers`.
inverse: bool, optional
If set to True, it performs the inverse transform. False by default.
Expand Down Expand Up @@ -310,7 +313,8 @@ def sqrt_transform(dataset: xr.Dataset, inverse: bool = False, **kwargs) -> xr.D
Parameters
----------
dataset: xarray.Dataset
Dataset to be transformed.
Dataset to be transformed as described in the documentation of
:py:mod:`pysteps.io.importers`.
inverse: bool, optional
If set to True, it performs the inverse transform. False by default.
Expand Down

0 comments on commit cb25820

Please sign in to comment.