Metadata-Version: 2.4
Name: phenoflex-py
Version: 0.1.0
Summary: Python port of selected phenology models from the chillR R package
Author: Philipp August Muenker
License-Expression: GPL-3.0-only
Project-URL: Homepage, https://github.com/PhilippAugustMuenker/PhenoFlexPython
Project-URL: Repository, https://github.com/PhilippAugustMuenker/PhenoFlexPython
Project-URL: Issues, https://github.com/PhilippAugustMuenker/PhenoFlexPython/issues
Project-URL: Original-R-package, https://cran.r-project.org/package=chillR
Keywords: phenology,chill,chillR,PhenoFlex,horticulture
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: pandas
Requires-Dist: numba
Dynamic: license-file

# phenoflex-py

Python port of selected phenology models from the
[chillR](https://cran.r-project.org/package=chillR) R package.

## Overview

phenoflex-py provides Python implementations of chill and heat accumulation
models used in temperate fruit tree phenology research, including the
PhenoFlex model for predicting bloom dates.

## Installation

```bash
pip install git+https://github.com/PhilippAugustMuenker/PhenoFlexPython.git
```

## Quickstart

```python
from phenoflex import (
    load_KA_weather, stack_hourly_temps,
    Dynamic_Model, GDH, tempResponse,
    genSeasonList, PhenoFlex_run, PhenoFlex_GDHwrapper, phenologyFitter,
)

weather   = load_KA_weather()
hourtemps = stack_hourly_temps(weather, latitude=50.4)

# Seasonal chill and heat accumulation
response = tempResponse(hourtemps, Start_JDay=305, End_JDay=60)
print(response)
```

See [`examples/quickstart.py`](examples/quickstart.py) for a complete workflow.

## Available Functions

| Category | Functions |
|---|---|
| Chill models | `Chilling_Hours`, `Utah_Model`, `Dynamic_Model`, `step_model` |
| Heat models | `GDH`, `GDD` |
| Aggregation | `tempResponse`, `genSeason`, `genSeasonList` |
| PhenoFlex | `PhenoFlex_run` |
| Fitting | `PhenoFlex_GDHwrapper`, `PhenoFlex_GAUSSwrapper`, `phenologyFitter`, `RMSEP` |
| Utilities | `make_JDay`, `daylength`, `make_hourly_temps`, `stack_hourly_temps` |
| Datasets | `load_KA_weather`, `load_KA_bloom` |

## Dependencies

- Python >= 3.9
- numpy, scipy, pandas, numba

## License

This package is licensed under the **GNU General Public License v3.0 only
(GPL-3.0-only)**. See [LICENSE](LICENSE) for the full license text.

This package contains Python translations and adaptations of selected
functions from the [chillR](https://cran.r-project.org/package=chillR)
R package, which is also licensed under GPL-3. Because this package is
derived from GPL-3 code, it must be distributed under the same license.

You are free to use, study, modify, and distribute this software under
the terms of the GPL v3. No additional restrictions apply beyond those
of the GPL v3.

## Attribution

This package is a Python port of selected functions from:

**chillR** — Statistical Methods for Phenology Analysis in Temperate Fruit Trees
- Authors: Eike Luedeling, Lars Caspersen, Eduardo Fernandez
- License: GPL-3
- CRAN: https://cran.r-project.org/package=chillR
- Repository: https://github.com/cran/chillR

The PhenoFlex core model was originally implemented in C++ by
Carsten Urbach as part of chillR.

See [NOTICE](NOTICE) for a complete list of ported functions and
a description of changes made during the Python port.

## Acknowledgements

The authors of chillR (Eike Luedeling, Lars Caspersen, Eduardo Fernandez)
and the broader phenology research community for developing the underlying
models and methods.
