openalea-incubator / adel Goto Github PK
View Code? Open in Web Editor NEWCharacterization of 3D plant development for graminae crops
License: Other
Characterization of 3D plant development for graminae crops
License: Other
Whean creatin g anew instance of AdelWheatDyn, we have to be able to define organ dimensions.
We also need to be able to access the dimensions tables for some parameters (sheath and internode diameter).
Function add_axe from mtg_editions does not compute nff parameter which causes a bug when using add_metamer function on the added tiller.
AdelWheatDyn should inherit from Adel instead AdelWheat to avoid R uneeded R dependency.
AdelWheatDyn only requires axeT and PhytoT
from alinea.adel.astk_interface import AdelWheat
from alinea.astk.Weather import sample_weather
seq, weather = sample_weather()
wdata = weather.get_weather(seq)
adel = AdelWheat(nsect=2)
g = adel.setup_canopy(100)
adel.grow(g, wdata)
Getting the error:
(adel) C:\Users\Personal\Desktop\OpenAlea research\adel\example>python test_AdelWheat.py
Traceback (most recent call last):
File "test_AdelWheat.py", line 1, in
from alinea.adel.astk_interface import AdelWheat
File "C:\Users\Personal\Desktop\OpenAlea research\adel\src\alinea\adel\astk_interface.py", line 6, in
from alinea.adel.AdelR import setAdel, RunAdel, genGeoAxe, checkAxeDyn, getAxeT,
File "C:\Users\Personal\Desktop\OpenAlea research\adel\src\alinea\adel\AdelR.py", line 23, in
import rpy2.robjects as robj
File "C:\Users\Personal.conda\envs\adel\lib\site-packages\rpy2\robjects_init_.py", line 16, in
import rpy2.rinterface as rinterface
File "C:\Users\Personal.conda\envs\adel\lib\site-packages\rpy2\rinterface_init_.py", line 92, in
from rpy2.rinterface._rinterface import (baseenv,
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
Convert using 2 to 3 packages
Check all functionalities
Hi,
The attributes of an Adel object are not updated after loading a pickled MTG.
For instance, the script below,
from alinea.adel.astk_interface import AdelWheat
# Save MTG
adel_wheat_1 = AdelWheat(nplants=10)
g1 = adel_wheat_1.setup_canopy()
adel_wheat_1.save(g1)
print 'saved domain: ', adel_wheat_1.domain
print 'saved nplants: ', adel_wheat_1.nplants
# Loading MTG previously pickled
adel_wheat_2 = AdelWheat()
g2 = adel_wheat_2.load(dir=r'~\adel_saved')
print 'loaded domain: ', adel_wheat_2.domain
print 'loaded nplants: ', adel_wheat_2.nplants
gives:
>>>
'saved domain: ' ((-13.333333333333336, -7.5), (13.333333333333336, 7.5))
'saved nplants: ' 10
'loaded domain: ' ((-1.3333333333333335, -7.5), (1.3333333333333335, 7.5))
'loaded nplants: ' 1
Hi,
I'm having an issue when using AdelDress and dim_T in order to get a MTG with predefined blade dimensions. This may be due to an index error because of the metamer 0.
Here are two examples to illustrate the problem.
from alinea.adel.dresser import blade_dimension, dimension_table, AdelDress
blades = blade_dimension(length=[0.0814, 0.0924, 0.0935, 0.001],
area=[9.73318E-4, 2.33465E-4, 8.2562E-4, 1E-6],
ntop=[4, 3, 2, 1])
dimT = dimension_table(blades)
adel = AdelDress(dimT=dimT, dim_unit='m', scene_unit='m', seed=1234)
g = adel.canopy()
g.display()
from alinea.adel.dresser import blade_dimension, dimension_table, AdelDress
blades = blade_dimension(length=[0.0814, 0.0924, 0.0935, 0.001],
area=[9.73318E-4, 2.33465E-4, 8.2562E-4, 1E-6],
ntop=[11, 10, 9, 8])
dimT = dimension_table(blades)
adel = AdelDress(dimT=dimT, dim_unit='m', scene_unit='m', seed=1234)
g = adel.canopy()
g.display()
It is currently impossible to conda install
adel because the binaries/dependencies (like plantgl) don't exists (windows) or were build against an 8 year old glibc version (linux) which makes them impossible to run on any updated system.
I am currently building all dependencies manually and editing the meta.yaml in hope of getting this to work.
Should I have missed an easy solution for this issue I will happily close it.
Edit: this might be more of an issue with plantgl...
It would be nice to have a Python 2 branch
Sheath and lamina of leave number 8 are extending toward the ground. It seems it is not the case for internode 8.
Follow the installation instruction:
Installation with conda
Create an environment:
conda create -n adel -c openalea openalea.plantgl boost=1.66
(base) hwang@mac % conda create -n adel -c openalea openalea.plantgl boost=1.66
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package boost conflicts for:
boost=1.66
openalea.plantgl -> cgal -> boost==1.57.0
openalea.plantgl -> boost
@christian34 : OK to move the repo to openalea org?
Need :
We would like to start our simulation with the full MTG : all leaves in all axis.
Then, we need a method to extract it.
Error:
~\Documents\GitHub\adel\src\alinea\adel\newmtg.py in mtg_factory(parameters, metamer_factory, leaf_sectors, leaves, stand, axis_dynamics, add_elongation, topology, split, aborting_tiller_reduction, leaf_db)
530 args.update({'split': split})
531
--> 532 if args.get('HS_final') < args.get('nff'):
533 for what in (
534 'Ll', 'Lv', 'Lr', 'Lsen', 'L_shape', 'Lw_shape', 'Gl', 'Gv',
TypeError: '>' not supported between instances of 'numpy.ndarray' and 'numpy.str_'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.