Integration of user-provided time series algorithms¶

The YATSM package provides some time series algorithms as part of the project, but developers can also build and integrate their own algorithms into the suite of time series algorithms that can be utilized by programs like yatsm line or yatsm pixel.

YATSM uses the setuptools module concept of “entry points” to enumerate time series algorithms. YATSM algorithms are registered into a group based on the type of algorithm – there are entry point groups for algorithms that find change as separate from algorithsm which postprocess existing change results. Both categories link an entry point name to a class or function usable within the YATSM package. For example, from the setup.py installation setup script:

[yatsm.algorithms.change]
CCDCesque=yatsm.algorithms.ccdc:CCDCesque


This entry point definition links the name of the algorithm, “CCDCesque”, to the module (yatsm.algorithms.ccdc) containing the relevant time series algorithm class, yatsm.algorithms.ccdc.CCDCesque. Users select the “CCDCesque” algorithm by defining it their configuration files.

Using entry points, you can create your own algorithms, distribute them in separate Python packages, and YATSM will be able to find them and enable them to work within the YATSM package.

Behind the scenes¶

YATSM uses the function iter_entry_points from the setuptools module to find and load all entry points associated with the YATSM package.

Todo

Create example yatsm_algorithms repository to act as a template for including additional algorithms via setuptools.