Skip to content

Issue when using AdelDress and dim_T #4

Description

@rbarillot

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions