diff --git a/meson.build b/meson.build index 37fc0cf..5355cde 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('xleaf', 'c', - version : '1.2.1', + version : '1.2.2', meson_version : '>=1.1.0', default_options : ['warning_level=2'], ) diff --git a/pyproject.toml b/pyproject.toml index 9313632..18fa30e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "mesonpy" [project] name = "xleaf" -version = "1.2.1" +version = "1.2.2" description = "Leaf and canopy radiative transfer modeling tools built on PROSPECT-D and SAIL" readme = "README.md" license = "MIT" diff --git a/xleaf/samplers.py b/xleaf/samplers.py index 25939f2..05b4f1c 100644 --- a/xleaf/samplers.py +++ b/xleaf/samplers.py @@ -6,6 +6,9 @@ import numpy as np +# default random seed, shared across samplers for reproducible draws +SEED = 2017 + class BaseSampler(abc.ABC): """Base class for creating random samples of leaf/canopy parameters.""" @@ -34,7 +37,7 @@ def sample(self) -> float: class UniformSampler(BaseSampler): """Uniform random sample generator.""" - def __init__(self, min: float, max: float, seed: int | None = 2017): + def __init__(self, min: float, max: float, seed: int | None = SEED): """Generate a uniform random sampler from a range of values. Args: @@ -65,7 +68,7 @@ def __init__( stdv: float, min: float | None = None, max: float | None = None, - seed: int | None = 2017, + seed: int | None = SEED, ): """Generate a normal random sampler from a parameterized distribution.