Giter VIP home page Giter VIP logo

adel's People

Contributors

christian34 avatar elmercr77 avatar mlabadie avatar mngauthier avatar pradal avatar revesansparole avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

adel's Issues

Dimension parametrisation in AdelWheatDyn

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).

ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

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.

Attributes of Adel object not updated after loading a MTG

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

Issue when using AdelDress and dim_T

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.

  • The example below generates a MTG with only 3 metamers instead of 4 and with wrong dimensions for the blade of metamer 1.
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()
  • The second example results in a KeyError in blade_dimension:
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()

Impossible to install

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...

Environmental problem

Dear, I enter the command as required, after the environment is configured, run the program, prompt this. But I have an R pack in my environment. How to solve.I've been operating for two days, and the environmental problems are still.
image
image

Boost version conflict when install with Conda on Mac and Windows

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

Units in adel_dynamic

Using add_metamer(), it seems like a new metamer has internodes and sheaths with diameters in centimer while all other values are in meter (length, area).

standalone_adel

Test astk_interface.py not running with initialize_stand

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_'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.