No project description provided
Project description
spectral-recovery
:artificial_satellite::evergreen_tree::chart_with_upwards_trend: supporting ecosystem restoration through spectral recovery analysis :chart_with_upwards_trend::evergreen_tree::artificial_satellite:
Github: https://github.com/PEOPLE-ER/spectral-recovery/
Documentation: https://people-er.github.io/spectral-recovery/
PyPi: https://pypi.org/project/spectral-recovery/
Overview
spectral-recovery
is an open-source project and Python package that provides simple, centralized, and reproducible methods for performing spectral recovery analysis to support Ecosystem Restoration (ER) efforts in forested ecosystems.
The package provides straight-forward interfaces and supplementary documentation to encourage the use of well-founded remote sensing techniques in ER research and projects. To get started, users provide restoration site locations, the years of disturbance and restoration, and annual composites of spectral data. spectral-recovery
handles the rest!
See Quick Start or our interactive notebooks to dive right in, (in-progress) tutorials for detailed instructions, or the theoretical basis for in-depth information.
Installation
pip install spectral-recovery
Quick Start
import spectral_recovery as sr
from spectral_recovery import data
# Read in timeseries data
spectral_ts = sr.read_timeseries(
path_to_tifs=data.bc06_wildfire_landsat_bap_timeseries(),
band_names={1: "blue", 2: "green", 3: "red", 4: "nir", 5: "swir16", 6: "swir22"},
)
# Compute indices
index_ts = sr.compute_indices(
timeseries_data=spectral_ts,
indices=["NBR", "NDVI"],
)
# Read in restoration site(s)
rest_site = sr.read_restoration_sites(
path=data.bc06_wildfire_restoration_site(),
dist_rest_years={0: [2005, 2006]},
)
# Compute recovery target for restoration site
median_hist = sr.recovery_targets.historic.median(
timeseries_data=index_ts,
restoration_sites=rest_site,
reference_start=2003,
reference_end=2005,
scale="pixel",
)
# Compute recovery metrics for restoration site!
metrics = sr.compute_metrics(
metrics=["Y2R", "R80P", "YrYr", "deltaIR", "RRI"],
timeseries_data=index_ts,
restoration_sites=rest_site,
recovery_targets=median_hist,
)
# Inspect recovery metrics for the restoration site (site 0)
# e.g what is the site's mean R80P (porportion of 80% of the recovery target)?:
metrics[0].sel(metric="R80P").mean().compute()
# Or, write results out to a TIF:
metrics[0].sel(metric="Y2R").rio.to_raster("site0_y2r.tif")
Documentation
- View background information, static tutorials, and API references in our project documentation.
- Try out an interactive notebook:
Contributing
- Report bugs, suggest features, and see what others are saying on our GitHub Issues page.
- Start discussions about the tool on our discussion page.
- Want to contribute code? See our CONTRIBUTING document for more information.
How to Cite
Publication in progress. For now, when using this tool in your work we ask that you acknowledge as follows:
"spectral-recovery method developed in the PEOPLE-ER Project, managed by Hatfield Consultants, and financed by the European Space Agency."
License
Copyright 2023 Hatfield Consultants LLP
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file spectral_recovery-1.0.1.tar.gz
.
File metadata
- Download URL: spectral_recovery-1.0.1.tar.gz
- Upload date:
- Size: 820.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4cc6ddd4810e5fcd2251e61c1c8c4aca8f52666d562934bb10727fb31238f05 |
|
MD5 | 59f024f01881feed821ff09249d38252 |
|
BLAKE2b-256 | dda62c19a61401a02f83e7f66df111b3c021d4064eaaa7c47494b42aaec02ac1 |
File details
Details for the file spectral_recovery-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: spectral_recovery-1.0.1-py3-none-any.whl
- Upload date:
- Size: 819.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa66f4935390f47538382d2f306aa3f149ee19e5cb714ea1840b77ba6f01859c |
|
MD5 | 42e31c23eb0242196dcd8dab092825ba |
|
BLAKE2b-256 | f900f62937507b09b13697cdc231249b7d390de467f5fea9e2cb30e2adedbee4 |