Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when using AdelDress and dim_T #4

Open
rbarillot opened this issue Jul 17, 2017 · 1 comment
Open

Issue when using AdelDress and dim_T #4

rbarillot opened this issue Jul 17, 2017 · 1 comment

Comments

@rbarillot
Copy link

rbarillot commented Jul 17, 2017

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()
@rbarillot
Copy link
Author

Update: the bug reported in the example 1 is fixed if the stem dimensions are specified (using stem_dimension). Not tested for example 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant