Skip to content

About

Wrapper around the `Julia` package `MultiScaleTreeGraph.jl`

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

openalea.multiScaletreegraphpy

Actions Status Documentation Status

Conda-Forge

GitHub Discussion

This Python package is a wrapper around the Julia package MultiScaleTreeGraph.jl available here (documentation here)which is a package for reading, writting, analysing and ploting MTG (Multi-scale Tree Graph) files. The package is designed to be used in the context of plant architecture analysis.

In addition, it can also convert openalea MTG objects into Julia MultiScaleTreeGraph Node using openalea_to_julia(my_mtg) and julia_to_openalea(my_Node) functions.

Note

This package is still in development and should be used with caution. It is meant to be a proof of concept !

Note

This package is based on the implementation of the diffeqpy package available here

Installation

Build yourself a dedicated conda environment. Although it relies on Julia, it is not mandatory to have Julia installed on your machine. The package will download the Julia binaries for you if it can't find it.

mamba create -n MultiScaleTreeGraphPy python
mamba activate MultiScaleTreeGraphPy
mamba install -c openalea3 openalea.mtg # if you want to convert an openalea MTG to a MultiScaleTreeGraph Node
mamba install -c conda-forge xxx xxx (julia) ... # if you want to install a local version of julia in the environment
git clone https://github.com/openalea/MultiScaleTreeGraphPy.git
cd MultiScaleTreeGraphPy
pip install -e .

or directly

git clone https://github.com/openalea/MultiScaleTreeGraphPy.git 
cd ArchimedLightPy
mamba env create -f environment.yaml

Then you're ready to go ! (First time you run the package, it will download the Julia binaries and dependancies, and pre-compile the packages, so it might take a while)

from openalea.multiscaletreegraphpy import jmtg, julia_to_openalea, openalea_to_julia
my_mtg = jmtg.read_mtg("path/to/mtg/file.mtg")
df = jmtg.DataFrame(my_mtg)
df
jmtg.node_attributes(my_mtg)

oa_mtg = julia_to_openalea(my_mtg)
...

About

Wrapper around the `Julia` package `MultiScaleTreeGraph.jl`

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages