geopulse.types
Type aliases and custom types used across GeoPulse.
Centralising types here avoids circular imports and provides a single reference for all type contracts.
Module Attributes
1-D or N-D array of float64. |
|
1-D or N-D array of complex128. |
|
(latitude_deg, longitude_deg) pair, both in degrees. |
- geopulse.types.FloatArray
1-D or N-D array of float64. The workhorse type.
alias of
NDArray[float64]
- geopulse.types.ComplexArray
1-D or N-D array of complex128. For frequency-domain quantities.
alias of
NDArray[complex128]
- geopulse.types.LatLon
(latitude_deg, longitude_deg) pair, both in degrees.
- class geopulse.types.Uncertain(nominal, samples=None, distribution='deterministic', params=<factory>)[source]
Bases:
Generic[T]A value that may carry uncertainty information.
- Parameters:
nominal (
TypeVar(T)) – The central / best-estimate value.samples (
Optional[list[TypeVar(T)]]) – Monte-Carlo samples, if uncertainty has been propagated. Length equals the number of MC draws.distribution (
str) – Distribution family. One of"deterministic","gaussian","uniform","ensemble". Default:"deterministic".params (
dict) – Distribution parameters. Forgaussian:{"std": ...}. Foruniform:{"low": ..., "high": ...}. Forensemble: empty (samples ARE the distribution).
Notes
Uncertainis not frozen:generate_samples()is a query method and does not mutate the instance, but downstream propagation code may attach freshly-drawnsamplesafter construction.- nominal: T
- generate_samples(n, rng=None)[source]
Draw
nMonte-Carlo samples from the declared distribution.- Parameters:
- Return type:
- Returns:
list –
nsamples, each with the same shape/type asnominal.- Raises:
ValueError – If
distributionis not one of the supported families.