PyCCD - Python Continuous Change Detection
pyccd creates change segments from Landsat timeseries data
Using PyCCD
>>> import ccd
>>> results = ccd.detect(dates, blues, greens, reds, nirs, swir1s, swir2s, thermals, qas, prev_results)
>>>
>>> type(results)
<class 'dict'>
>>>
>>> results
{algorithm: 'pyccd:x.x.x',
processing_mask: [bool, bool, ...],
snow_prob: float,
water_prob: float,
cloud_prob: float,
change_models: [
{start_day: int,
end_day: int,
break_day: int,
observation_count: int,
change_probability: float,
curve_qa: int,
blue: {magnitude: float,
rmse: float,
coefficients: (float, float, ...),
intercept: float},
green: {magnitude: float,
rmse: float,
coefficients: (float, float, ...),
intercept: float},
red: {magnitude: float,
rmse: float,
coefficients: (float, float, ...),
intercept: float},
nir: {magnitude: float,
rmse: float,
coefficients: (float, float, ...),
intercept: float},
swir1: {magnitude: float,
rmse: float,
coefficients: (float, float, ...),
intercept: float},
swir2: {magnitude: float,
rmse: float,
coefficients: (float, float, ...),
intercept: float},
thermal: {magnitude: float,
rmse: float,
coefficients: (float, float, ...),
intercept: float}}
]
}
Default processing parameters can be overridden using a dictionary (see parameters.yaml for valid keys):
>>> import ccd
>>> params = {'QA_BITPACKED': False,
'QA_FILL': 255,
'QA_CLEAR': 0,
'QA_WATER': 1,
'QA_SHADOW': 2,
'QA_SNOW': 3,
'QA_CLOUD': 4}
>>> results = ccd.detect(dates, blues, greens, reds, nirs, swir1s, swir2s, thermals, qas, params=params)
Installing
System requirements (Ubuntu)
- python3-dev
- gfortran
- libopenblas-dev
- liblapack-dev
- graphviz
- python-virtualenv
System requirements (Centos)
- python3-devel
- gfortran
- blas-dev
- lapack-dev
- graphviz
- python-virtualenv
It's highly recommended to do all your development & testing in a virtual environment.
user@dev:/home/user/$ mkdir pyccd
user@dev:/home/user/$ cd pyccd
user@dev:/home/user/pyccd$ virtualenv -p python3 .venv
user@dev:/home/user/pyccd$ . .venv/bin/activate
(.venv) user@dev:/home/user/pyccd$
Install
$ pip install -e .[test,dev,docs,deploy,profile]
Testing
$ pytest
$ pytest --profile
$ pytest --profile-svg
# pytest-watch
$ ptw
Make targets
$ make build
$ make tests
$ make docs
$ make deploy
$ make profile
Profiling
Decorate the function to be profiled with @profile and
run make profile. Remove decorations before committing code.
Contributing
Before committing to this repository, run the following command.
git config --local commit.template .gitmessage
This will add the LCMAP commit template to git commit.
jira/lcmap-xxxx: Title
Description
Contributions are most welcome.
- Open an issue and discuss the change.
- Branch from major version and name it after the issue
- jira/lcmap-xxxx
- Write automated tests for your changes and make sure all tests pass.
- Update documentation in project.
- Submit pull request to the appropriate branch (e.g. 1,x)
Versions
PyCCD previously followed MAJOR.MINOR.PATCH.LABEL semantic versioning but has changed to date based semantic versioning, thus: YYYY.MM.DD[.HH.MM.SS][-label].
PyCCD's version is defined by the ccd/version.py/__version__ attribute.
References
Metadata
Release files for lcmap-pyccd 2021.7.19
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 |
|---|---|---|---|---|
| lcmap-pyccd-2021.7.19.tar.gz | 32.9 kB | Without provenance | Details for lcmap-pyccd-2021.7.19.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lcmap_pyccd-2021.7.19-py3-none-any.whl | Python 3 | none | any | Details for lcmap_pyccd-2021.7.19-py3-none-any.whl |
Total release size: 64.1 kB
Release files / lcmap-pyccd-2021.7.19.tar.gz
| Download URL | lcmap-pyccd-2021.7.19.tar.gz |
|---|---|
| Size | 32.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fddb3421e62a530eb8530aaf22a52033cdc8b5f412cb6f453cce48bcfad02f2
|
|
BLAKE2b-256 checksum How to use checksums |
eaa922c1c500b4e8e26b99655c22e53dfa58c3f11e844bfe123327f7559acc34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11
|
Release files / lcmap_pyccd-2021.7.19-py3-none-any.whl
| Download URL | lcmap_pyccd-2021.7.19-py3-none-any.whl |
|---|---|
| Size | 31.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
605230eaaeccc6d7273dc7d0675272e309819b58e70376e7f55a83dafc1fab41
|
|
BLAKE2b-256 checksum How to use checksums |
9e932ecbadaa8713491feb48d08014e29490e475bf4896e230bc5dac1e08146b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.11
|
Security for lcmap-pyccd 2021.7.19
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.