PyRATP
RATP: Radiation Absorption, Transpiration and Photosynthesis
Install / Use
/learn @openalea/PyRATPREADME
PyRATP
Software
Authors
- Herve Sinoquet
- Marc Saudreau
- Jerome Ngao
- Boris Adam
- Christophe Pradal
- Christian Fournier
- Fabrice Bauget
Description
RATP: Radiation Absorption, Transpiration and Photosynthesis
Status
Python package
License
CecILL-C URL : https://pyratp.rtfd.io
Dependencies
- meson-python
- numpy
- pandas
- scipy
- openalea.plantgl
- openalea.mtg
- QtPy
Modifications
- Installation with make: it compiles fortran part with f2py then installs the package with setuptools and pip
- Compute transmitted radiation for each voxel
- Intercepted and transmitted radiation among the output results
- leaf angle distribution for each voxel
- Local or solar hour option for computing sun position
- Possibility for external use of the sun computation routine
Installation
for user
- Install Miniforge: https://github.com/conda-forge/miniforge
- Create a conda environment:
mamba create -n pyratp openalea.ratp -c conda-forge -c openalea3
- activate the environment:
mamba activate pyratp
The user has the possibility to install the package from a candicate release channel of the conda repository of openalea as follows:
mamba create -n pyratp openalea.ratp -c conda-forge -c openalea3/label/rc
The rc channel corresponds to the latest build of PyRatp when the main channel is the stable release.
For developpers Linux (python modification only)
Editable install with conda/environment.yml is not functionning because of namespace conflict. A workaround is as follow:
- download the repository and change to the root directory:
git clone https://github.com/openalea/PyRATP.git
cd PyRATP
- Create a conda environment with dependencies manually with:
mamba create -n pyratp -c openalea3 -c conda-forge openalea.plantgl openalea.mtg qtpy compilers meson-python gfortran scipy pytest jupyter
-
activate the environment:
mamba activate pyratp -
Build the fortran library:
meson setup builddir
meson compile -C builddir
cp builddir/src/openalea/ratp/pyratp.cpython-31*.so src/openalea/ratp
- modify the Python path: via the environment variable
export PYTHONPATH="$PWD/src":$PYTHONPATH
For developpers (python and fortran modifications)
Editable installation with conda/environment.yml is not functioning because of namespace conflict. A workaround is as follows:
- download the repository and change to the root directory:
git clone https://github.com/openalea/PyRATP.git
cd PyRATP
- Create a conda environment with dependencies manually:
Using MAC and Linux:
mamba create -n pyratp_dev -c conda-forge -c openalea3 openalea.plantgl openalea.mtg qtpy compilers meson-python scipy pytest jupyter
Using Windows:
mamba create -n pyratp_dev -c conda-forge -c openalea3 openalea.plantgl openalea.mtg qtpy m2w64-toolchain meson-python scipy pytest gfortran jupyter
-
activate the environment:
mamba activate pyratp_dev -
Compile everything:
pip install ."[test]"
and after each modification of the python or Fortran part, run
pip install .
then restart your kernel (when using IPython) for your modifications to be taken into account.
- Have a look at the notebooks and scripts in
example/!
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
