Skip to content

Instantly share code, notes, and snippets.

View GeraultTr's full-sized avatar

Tristan Gérault GeraultTr

  • INRAE, AgroParisTech, Université Paris-Saclay
View GitHub Profile
@GeraultTr
GeraultTr / WB_setup_steps.txt
Last active October 9, 2025 19:01
Wheat-BRIDGES flash install
mkdir Wheat-BRIDGES_framework
cd Wheat-BRIDGES_framework
git clone -b release2025 git@github.com:openalea/Root-CyNAPS.git
git clone -b main git@github.com:openalea/metafspm.git
git clone -b release2025 git@github.com:openalea/fspm-utility.git
git clone -b develop_tristan git@github.com:openalea/rhizodep.git
git clone -b main git@github.com:GeraultTr/RhizoSoil.git
git clone -b munch git@github.com:GeraultTr/Root_BRIDGES.git
git clone --recurse-submodules -b main git@github.com:GeraultTr/Wheat-BRIDGES.git
@GeraultTr
GeraultTr / test_rsml_conversion.py
Last active July 18, 2024 14:18
Attempt to convert RSML files provided by Lobet et al. 2016
import rsml
from openalea.mtg import *
file_path = "inputs\\monocot-sim-4-4-14.rsml"
g = rsml.rsml2mtg(file_path)
def diam(v):
# d = g.node(v).diam
return 0.01
@GeraultTr
GeraultTr / turtle.py
Last active May 23, 2024 06:32
Turtle for mtg
import numpy as np
def turtle_coordinates(g, vid: int, angle_roll: float, angle_down: float):
"""
Function intended to compute the coordinates of a succession of root segments in the scene referential.
NOTE : It was designed as a per-vid function, but it should be used from collar to tips for proper functioning.
:param g: mtg
:param vid: segment vid
:param angle_roll: first event, rotation in gradient around the z axis carried by the cylinder orientation
from dataclasses import dataclass
import inspect
@dataclass
class ParentModel:
"""
"""
input: float = 0.
state_variable: float = 0.
parameter: float = 0. # On a des fields en réalité
# use : mamba env create -f requirements.yml
name: root_bridges
channels:
- conda-forge
- openalea3
dependencies:
- python>=3.8
# OpenAlea dependancies
- openalea.plantgl
- openalea.mtg
@GeraultTr
GeraultTr / requirements.sh
Last active March 11, 2024 08:21
Requirements structure for my packages
# Model packages
conda create -n rhizodep python=3.9.18
conda activate rhizodep
conda install -y -c conda-forge mamba
# My dependancies not yet on conda
cd ~/package
git clone https://github.com/GeraultTr/genericmodel.git
git clone https://github.com/GeraultTr/data_utility.git