Skip to content

not compliant with recent spec updates on unit attachment #181

@ManuelHu

Description

@ManuelHu

in a recent update (see also legend-exp/legend-data-format-specs#12), the LH5 spec changed the attachment point of units in "complex" data structures (VoV, and similar). The library still cannot deal with this in all places and might drop/ignore such units in some places. also it is still hard to create such structures with the correct attributes set.

Warning

the spec does not specify where any other attribute needs to be attached. this needs to be taken into account when fixing this, simply swapping all references from where attributes are used is not correct.

some open issues:

  • contructors (e.g., VectorOfVector(..., attrs)) should attach all attrs (or only the units?) to the flattened_data array
  • what should getattr() do?
  • __str__ should output both / either one that is set (combined into one attrs line, or split?)
  • LGDO.view_as()
    since support units in view_as("ak") #179, it should read the unit attrs from both locations, to always return the correct native representation also for old files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions