General overview¶
The main Pymepix library is built up in several different submodules which each tackle a different task in working with the Timepix camera. As seen in the API index those are * config * core * processing * SPIDR * util
The top layer Pymepix consists of pymepix, timepixdef and timepixdevice.
pymepix¶
pymepix provides the highest level of interaction with the library. A single Pymepix object will hold all connected Timepix devices and manage the users’ interaction with those.
timepixdevice and timepixdef¶
config module¶
core module¶
The core module consists of only the log class. It defines functionality for Pymepix’ needs and uses the basic python logging module.
processing module¶
The processing module provides the data pipeline to process the incoming camera data. Pymepix can use different acquisition pipelines to process the data. Those are defined in acquisition with the base functionality provided by baseacquisition. An acquisition pipeline determines which steps work in what order on the incoming data and connects those.
Each pipeline consists of acquisition stages (baseacquisition), where one stage holds the information about one logical step in the pipeline. Those tasks are currently udpsampler (capturing the packets), rawtodisk (saving the raw data), pipline_packet_processor (interpreting the raw packets) and pipeline_centroid_calculator (compress data by finding blob centers). Each of these specific pipeline steps overwrites the BasePipelineObject, which is in fact a python multiprocessing.Process.
The majority of the logic for the pipeline_packet_processor and the pipeline_centroid_calculator is separated in the classes centroid_calculator and packet_processor. The pipeline_ classes only add functionality for the integration of those classes into the multiprocessing pipeline.
Each stage knows the task it has to fulfill and then creates one or multiple processes to work on that task in parallel.
datatypes provides an enum to classify the data that is passed through the pipeline at each step.
SPIDR module¶
This module communicates with the SPIDR chip of the Timepix. One spidrcontroller knows about one or more spidrdevices. spidrcmds lists the known commands to pass information and instructions to a chip. spidrdefs extends those commands by constants that can be passed. error contains information on possible errors from SPIDR.