Closed smXplorer closed 7 years ago
This is related to #1 .
The solution you propose is easy enough and perfectly within the specs. The only reason why phconvert uses 0 and 1 for all spots is that on matlab and python you can "view" uint8 array as booleans without memory copy and this helps to select timestamps streams with low RAM usage.
The bigger problem is #1 though. We still miss a mapping between detectors and position on the array.
In v0.5 the detectors ID (the values in /photon_data/detectors/) can be unique across spots or not. To find the original (hardware) id for a given detector, one would do something like this:
index = np.where((setup.detectors.spot == spot) * (setup.detectors.id == id))
setup.detectors.id_hardware[index]
Anyway, the issue is addressed in #33.
Currently, phconvert outputs multispot data files which have the same pixel IDs for all Donor ("0") and all Acceptor ("1") channels. While there is no ambiguity in doing so, it erases any information on the original pixel identity (see the the detector label issue). If the user wants to correlate nearby pixels for instance, an internal labeling scheme needs to be designed (internal to the analysis software), which would be unnecessary if the pixel IDs were all different in the first place. Note that imposing different IDs for different pixels doesn't change the file structure, only the specification, therefore it should be relatively easy to enforce, especially at such an early development stage.