Skip to content

Naming missmatch between classification and particle_type group in HDF5EventSource #2759

@Hckjs

Description

@Hckjs

This came up using the HDF5EventSource to stream in some DL2 data with applied particle classifier where i got:

Unknown DL2 stereo group particle_type
Unknown DL2 telescope group particle_type

It tries to read in the classification group defined here:

DL2_CONTAINERS = {
"energy": ReconstructedEnergyContainer,
"geometry": ReconstructedGeometryContainer,
"classification": ParticleClassificationContainer,
"impact": TelescopeImpactParameterContainer,
"disp": DispContainer,
}

but the group is named "particle_type" via the ReconstructionProperty-Class

class ReconstructionProperty(Flag):
"""
Primary particle properties estimated by a `Reconstructor`
These properties are of enum.Flag type and can thus be
combined using bitwise operators to indicate a reconstructor
provides several properties at once.
"""
#: Energy if the primary particle
ENERGY = auto()
#: Geometric properties of the primary particle,
#: direction and impact point
GEOMETRY = auto()
#: Prediction score that a particle belongs to a certain class
PARTICLE_TYPE = auto()
#: Disp, distance of the source position from the Hillas COG along the main axis
DISP = auto()
def __str__(self):
return f"{self.name.lower()}"

I think "particle_type" would be the better naming here (more specific, fits better to geometry, energy).
To be more coherent, we could also adapt the ReconstructedContainer-Field here:

classification = Field(
default_factory=partial(Map, ParticleClassificationContainer),
description="map of algorithm to classification parameters",
)

from classification to particle_type or just particle.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions