Description
I propose to use a separate function to extract features from the photon_stream.
At the moment you have if else
blocks for different treatment of simulation and observation events inside the feature extraction. This way, one might end up to have multiple of such if else
blocks all over the code which is error prone.
I propose to make a separate function which takes only the photon_stream e.g. in point-cloud representation, and then returns a dictionary of the extracted features. The extraction of feature must be independent of the event being a simulation or observation, so I would show and emphasize this in the code.
This function is then called on both simulations and observations.
I would restrict my self to have only one of such if else
blocks in the very beginning.
Also when the feature extraction is a function of its own, unit-tests are easier to implement (loosely coupled).