- 
        Couldn't load subscription status. 
- Fork 274
Description
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:
ctapipe/src/ctapipe/io/hdf5eventsource.py
Lines 66 to 72 in e6eeae9
| DL2_CONTAINERS = { | |
| "energy": ReconstructedEnergyContainer, | |
| "geometry": ReconstructedGeometryContainer, | |
| "classification": ParticleClassificationContainer, | |
| "impact": TelescopeImpactParameterContainer, | |
| "disp": DispContainer, | |
| } | 
but the group is named "particle_type" via the ReconstructionProperty-Class
ctapipe/src/ctapipe/reco/reconstructor.py
Lines 25 to 45 in e6eeae9
| 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:
ctapipe/src/ctapipe/containers.py
Lines 1087 to 1090 in e6eeae9
| classification = Field( | |
| default_factory=partial(Map, ParticleClassificationContainer), | |
| description="map of algorithm to classification parameters", | |
| ) | 
from classification to particle_type or just particle.