sitsfeats.py ⌛
Python package for extracting metrics from satellite image time series.
Installation
The package builds from source with no system dependencies. The C++ extension uses nanobind and the header-only Eigen library, both resolved automatically at build time:
pip install sitsfeats
Usage
The sitsfeats.py package is designed for simplicity. It is simple to get started with it. Here's a quick example:
from sitsfeats import feats
# Each row of the input array is a time-series
result = feats(your_numpy_data, ['median', 'skew'])
result.names
#> ['median', 'skew']
# A stacked (n_series, n_metrics) array; column j is result.names[j]
result.data
#> array([[ 5.5850e+03, -8.2705e-01],
#> [ 5.0490e+03, 3.9131e-02],
#> [ 6.6015e+03, -3.6274e-01],
#> [ 6.0470e+03, -3.0612e-01],
#> [ 4.6960e+03, 3.4300e-01]])
# Or a {name: column} mapping.
result.to_dict()
Working with data cubes (xarray)
The feats function also supports xarray data as input. To use this feature, first install the xarray dependencies:
pip install sitsfeats[xarray]
Then, you can use the xarray data as input:
from sitsfeats import feats
# cube: an xarray.DataArray with dims like (time, y, x)
features = feats(cube, ["mean", "skew", "iqr"], dim="time")
# A Dataset with one variable per metric, each shaped (y, x)
features["skew"]
To learn more, work through the step-by-step jupytext tutorials in the examples directory (ts-numpy.py for arrays and ts-xarray.py for data cubes - run them as scripts or open them as notebooks). Check also the documentation.
Metrics available
To see the metrics available in sitsfeats.py, it is possible to use the command metrics:
from sitsfeats import metrics
metrics() # all metrics
metrics(group="polar") # just one family
# name group description
# abs_sum basic Sum of absolute values
# amd basic Mean absolute first difference
# amplitude basic Range (max - min)
# ...
# area_ts polar Area of the polar-plot polygon
# polar_balance polar Std-dev of the four quadrant areas
Development
The project uses uv. After cloning:
uv sync # builds the C++ extension and installs dev tools
uv run pytest # run the test suite
uvx ruff check . # lint
uv run mkdocs serve # preview the docs
Contributing
We welcome contributions! If you have suggestions for improvements or bug fixes, please feel free to fork the repository and submit a pull request.
Acknowledgments
We would like to thank the developers and contributors of the sitsfeats (R) and stmetrics for their work that is the basis of this package.
License
sitsfeats.py is distributed under the MIT license. See LICENSE for more details.
Metadata
Release files for sitsfeats 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sitsfeats-0.2.0.tar.gz | 153.5 kB | Without provenance | Details for sitsfeats-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sitsfeats-0.2.0-cp313-cp313-macosx_26_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 26.0+ ARM64 | Details for sitsfeats-0.2.0-cp313-cp313-macosx_26_0_arm64.whl |
Total release size: 223.9 kB
Release files / sitsfeats-0.2.0.tar.gz
| Download URL | sitsfeats-0.2.0.tar.gz |
|---|---|
| Size | 153.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da9dc484f4dccdc262db5964089504ad53a9cdffd0bd675055974e446c555241
|
|
BLAKE2b-256 checksum How to use checksums |
46df3c496005050018fddd21b258d2bb2a0859daab46808a2f71f8800216f62a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / sitsfeats-0.2.0-cp313-cp313-macosx_26_0_arm64.whl
| Download URL | sitsfeats-0.2.0-cp313-cp313-macosx_26_0_arm64.whl |
|---|---|
| Size | 70.4 kB |
| Tags | CPython 3.13 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bdb03fbdbe46e8e4a5ecd24e6b1fe157e2aeb3e7a8c4a9d6137e32e4abe7af1a
|
|
BLAKE2b-256 checksum How to use checksums |
8090e7b94e869d46cea34010d3439259665cb919ce4ffcba6979b7d42daf871f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for sitsfeats 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.