Skip to main content

A PYthon library for basic and eXtended COntinuous Change Detection algorithms

Project description

PYXCCD

GithubActions Pypi Downloads ReadTheDocs Codecov

A PYthon library for basic and eXtended COntinuous Change Detection

Author: Su Ye (remotesensingsuy@gmail.com)

The Continuous Change Detection and Classification (CCDC) algorithm has been popular for processing satellite-based time series datasets, particularly for Landsat-based datasets. As a CCDC user, you may already be familiar with the existing CCDC tools such as pyccd and gee ccdc.

Wait.. so why does the pyxccd package still exist?

I developed pyxccd mainly for the below purposes:

  1. Near real-time monitoring: This package provides the unique S-CCD algorithm to recursively update model coefficients and detect changes;

  2. The latest version of CCDC (COLD) with the highest breakpoint detection accuracy: The COLD algorithm has been verified with Zhe’s MATLAB version;

  3. Large-scale time-series processing in the desktop environment: the core of xccd was coded in C with the superior computing efficiency and small memory usage;

  4. Using dataset other than Landsat (such as Sentinel-2, modis): pyxccd supports the use of any band combination from any sensor (the flexible mode);

  5. Decomposing time-series signals to unveil inter-season/inter-annual variation (such as phenological shifts): S-CCD allows continuously outputting trend and seasonal signal components as “states”;

1. Installation

It only supports windows and linux system so far. Please contact the author if you wish to install it in the macOS system.

pip install pyxccd

2. Using pyxccd for pixel-based processing (more see jupyter examples)

COLD:

from pyxccd import cold_detect
cold_result = cold_detect(dates, blues, greens, reds, nirs, swir1s, swir2s, thermals, qas)

COLD algorithm for any combination of band inputs from any sensor:

from pyxccd import cold_detect
# input a user-defined array instead of multiple lists
cold_result = cold_detect_flex(dates, np.stack((band1, band2, band3), axis=1), qas, tmask_b1=1, tmask_b2=2)

S-CCD:

# require offline processing for the first time
from pyxccd import sccd_detect, sccd_update
sccd_pack = sccd_detect(dates, blues, greens, reds, nirs, swir1s, swir2s, qas)

# then use sccd_pack to do recursive and short-memory NRT update
sccd_pack_new = sccd_update(sccd_pack, dates, blues, greens, reds, nirs, swir1s, swir2s, qas)

S-CCD for outputting continuous seasonal and trend states:

# open state output by setting state_intervaldays as a non-zero value
sccd_result, state_ensemble = sccd_detect(dates, blues, greens, reds, nirs, swir1s, swir2s, qas, state_intervaldays=1)

3. Documentation

Tutorial: under development

4. Citations

If you make use of the algorithms in this repo (or to read more about them), please cite (/see) the relevant publications from the following list:

[S-CCD] Ye, S., Rogan, J., Zhu, Z., & Eastman, J. R. (2021). A near-real-time approach for monitoring forest disturbance using Landsat time series: Stochastic continuous change detection. Remote Sensing of Environment, 252, 112167.

[COLD] Zhu, Z., Zhang, J., Yang, Z., Aljaddani, A. H., Cohen, W. B., Qiu, S., & Zhou, C. (2020). Continuous monitoring of land disturbance based on Landsat time series. Remote Sensing of Environment, 238, 111116.

The recent applications of S-CCD could be found in CONUS Land Watcher

Q&A

Q1: Has pyxccd been verified with original Matlab codes?

Re: yes, multiple rounds of verification have been done. Comparison based on two testing tiles shows that pyxccd and Matlab version have smaller than <2% differences for breakpoint detection and <2% differences for harmonic coefficients; the accuracy of pyxccd was also tested against the same reference dataset used in the original COLD paper (Zhu et al., 2020), and pyxccd reached the same accuracy (27% omission and 28% commission) showing that the discrepancy doesn’t hurt accuracy. The primary source for the discrepancy is mainly from the rounding: MATLAB uses float64 precision, while pyxccd chose float32 to save the run-time computing memory and boost efficiency.

Q2: how much time for production of a tile-based disturbance map (5000*5000 pixels) using pyxccd?

Re: I tested it in UCONN HPC environment (200 EPYC7452 cores): for processing a 40-year Landsat ARD tile (1982-2021), the stacking typically takes 15 mins; per-pixel COLD processing costs averagely 1 hour, per-pixel S-CCD processing costs averagely 0.5 hour; exporting maps needs 7 mins.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxccd-0.0.1.tar.gz (3.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyxccd-0.0.1-cp313-cp313-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.13Windows x86-64

pyxccd-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pyxccd-0.0.1-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

pyxccd-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pyxccd-0.0.1-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

pyxccd-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pyxccd-0.0.1-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10Windows x86-64

pyxccd-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyxccd-0.0.1-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9Windows x86-64

pyxccd-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pyxccd-0.0.1-cp38-cp38-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8Windows x86-64

pyxccd-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file pyxccd-0.0.1.tar.gz.

File metadata

  • Download URL: pyxccd-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0c4f291fbcec5bde96f910288ca63a6fafbd82e65de05b18d016246acef0d78f
MD5 346ca78b6b9df50010d4aa57610e04d1
BLAKE2b-256 09915af6ec1bc1c055f3370f4f91811c9814d69560a78d74c43e1855421520cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1.tar.gz:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyxccd-0.0.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9a6692ce69bb909eb5f2eb081e1ec90a9ccdb87ccf3144c91bfcfc9925b53132
MD5 3753990ec2771a1d8193274725d72490
BLAKE2b-256 c39a48e48dd7d5c46747a65000c4698ebe962919d668f1e68bfa97a733d7319c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp313-cp313-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db5aa7f701cc918f1a2f4bb8385a388834fb89feebdaf8f09c7deb62ff0589c3
MD5 f6837c0bd73e5f1aa249b5e448d61f9c
BLAKE2b-256 4251fd2363e5612207836dff55a681cc3f524e1f1500f96b2b30129f7169ed0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyxccd-0.0.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f06d6bec7400b83d7729a45c56e020fe3cad27a814b23155a33764cb52859b12
MD5 7dc781cca3a5031ecd6c73f2ee057971
BLAKE2b-256 06530d9a8efcbdfe0f56a336af5e3b63c5792ee4127147d23a5a10cc5d4c92dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp312-cp312-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a7438658e2631ba03a9078bc659d938b6e3cb9dfb955e7fb0416683ff113899f
MD5 a2fb96f07526c7676652ce062c504260
BLAKE2b-256 0c3d38360c2db1615df212d88d1924519e778f1a9f972bee9d0eeceb188601ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyxccd-0.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 294a503849d0d2df8307c7fb007da80607f6d7641ad86deb9c1a680b243b71cd
MD5 4d908b82861a3f9c10ad00bffcd859f5
BLAKE2b-256 f22077b0812aa55fd0ab5aec03364fe00aedd8128943003f0242b598e33026b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp311-cp311-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4cdee21ceded4cca7bb51f508bf051a40f8d79e53d72cdb150a2b4a20919d347
MD5 6840a01d06ca53a16f05f5ac603c5924
BLAKE2b-256 377bdc9934d105fba2a4e8abb72865efdd2f159e92ef6e8a104136c087c4ed12

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyxccd-0.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a9461edf53e810e15feeb02bb3f4c33274e1c5fca3166e3035dcd0e1b4bb3919
MD5 0e0394ecbdd28de32d71029afb40d8ff
BLAKE2b-256 3c8ed3c830fc928310707e260527b63959f9d10941b975043389ae6de129f99a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp310-cp310-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85ca01f11a94bb8c1c480e6acfbf8dc470ef12af181b3f912e66e488b9789d8a
MD5 eb90a3c183ad4f8861e3643cf058fe6c
BLAKE2b-256 dc1f20cf4a421f0422146d3a476a904dd560fe5ce56866621d84b3f752887cc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyxccd-0.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 08bcc13d14ac421d83ca0f183e173f18c95bd491ea581a1d1f9e81911a42fc0d
MD5 e84d97f97adf7ee42d807e0e6ec69bac
BLAKE2b-256 37a6df37f4176b2e85fa437ac81efcf086bf916c176e808eeca35bb2ecc9b6f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp39-cp39-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56143a74182226509bdb614f21d593f06a6ac596b7838c617d5500e8ec5ec6a4
MD5 25aa81b8a02b4f7ea5c8ee8af4b06380
BLAKE2b-256 64e47fa6e5313ef3948d7410d77648f1229aae60e36372141c71074589d69846

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyxccd-0.0.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyxccd-0.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 67c3eb8acf34d405c0b1c1523b22ef92b21827cc31fe72197d59d06b031f234f
MD5 26441c2b078913f7b52b125858256588
BLAKE2b-256 0a152e245851fb14ccbc14ad3f9734fc10621c9143daba4de7298bb2b5d45422

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp38-cp38-win_amd64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyxccd-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyxccd-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3123cdff10dc8c49d01b505b786725bde47a6a1bba180758461fd82b1cf9bca1
MD5 8a162e61a86f81e6afe57e16cb4f3cf9
BLAKE2b-256 631bc9c361f8c03d73ac4b12e822ea674fd7e74fdd88b3d3c4d45c9613bcae5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyxccd-0.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: main.yml on Remote-Sensing-of-Land-Resource-Lab/pyxccd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page