This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
PixelPipeline / PacketProcessor is missing data in the first seconds after startup #32
Labels
bug
Something isn't working
Within the packet processor (
pymepix/processing/logic/packet_processor.py
) in thePixelPipeline
, it is observed that some data is missing in the first seconds after the acquisition was initiated withPymepixConnection.start()
. As a consequence, the assigned counter values might be shifted for the first events, since some events are simply not counted.The origin of this issue is not clear to me. But it looks to me as if this is likely already present in the data provided by the UDP sampler.
Evidence
Missing triggers
Looking at the absolute times for the trigger edges that are seen by pymepix and used in
PacketProcessor.find_events_fast()
to assign the detected pixels (with known absolute time) to their trigger. And to then compute their time of arrival relative to their trigger.To make the error apparent I added in the file
pymepix/processing/logic/packet_processor.py
for logging afterline 283
so in the context of the function it looks like:
The array
start
contains the absolute times of the detected triggers (rising edges to TDC1). For a 10Hz repetition rates triggers should appear every 0.1 second. This is usually the case, except for a gap in the beginning.Consistently, also after power-cycling of the pymepix, the array
start
has in the first or second call (note: I am not sure whether it was also observed in the first call) offind_events_fast
a single longer spacing. Here some examples[ 0.85430714 0.95435797 1.0544088 1.45457223 1.55462305 1.65467388 1.75472471 1.85477553]
[ 0.83766719 0.93771802 1.03776885 1.13781967 1.43797215 1.53802298 1.63807381 1.73812463 1.83817546]
[ 0.27671487 0.37672582 0.47673677 0.57670785 0.6767188 1.47676652 1.57677747]
[ 0.38867928 0.4887301 0.58878092 1.48923833 1.58924927 1.68930009]
[ 0.34440454 0.44441549 0.54446631 0.64447725 1.44464456 1.54465551 1.64470633]
Missing pixel data
Even further, when looking not at the
MessageType.EventData
butMessageType.PixelData
, and printing a histogram, there is a gap in the same time window. Meaning the time window missing the triggers also misses the pixel data.e.g. from the full log shown below (top row histogram counts, bottom row bin edges):
setup / minimal script
I run the PixelPipeline with only 1 process for the packet processor (opposed to the default hardcoded 2 processes).
I.e. in
pymepix/processing/acquisition.py
line 47
is changed toCode to reproduce (please note the necessary changes in pymepix to print logs, also you need to indicate the correct sophy config file):
Full log output
Here the full output from the script:
The text was updated successfully, but these errors were encountered: