pymepix package¶
Subpackages¶
- pymepix.SPIDR package
- pymepix.clustering package
- pymepix.config package
- pymepix.core package
- pymepix.processing package
- Subpackages
- Submodules
- pymepix.processing.acquisition module
- pymepix.processing.baseacquisition module
- pymepix.processing.basepipeline module
- pymepix.processing.datatypes module
- pymepix.processing.pipeline_centroid_calculator module
- pymepix.processing.pipeline_packet_processor module
- pymepix.processing.rawfilesampler module
- pymepix.processing.rawtodisk module
- pymepix.processing.udpsampler module
- pymepix.processing.usbtrainid module
- Module contents
- pymepix.util package
Submodules¶
pymepix.main module¶
Main module for pymepix
pymepix.post_processing module¶
-
class
pymepix.post_processing.
ProgressBar
(iterable=None, desc=None, total=None, leave=True, file=None, ncols=None, mininterval=0.1, maxinterval=10.0, miniters=None, ascii=None, disable=False, unit='it', unit_scale=False, dynamic_ncols=False, smoothing=0.3, bar_format=None, initial=0, position=None, postfix=None, unit_divisor=1000, write_bytes=False, lock_args=None, nrows=None, colour=None, delay=0, gui=False, **kwargs)[source]¶ Bases:
tqdm.std.tqdm
-
gui_bar_fun
= None¶
-
pymepix.pymepix_connection module¶
-
class
pymepix.pymepix_connection.
PymepixConnection
(spidr_address=('192.168.1.10', 50000), src_ip_port=('192.168.1.1', 8192), pipeline_class=<class 'pymepix.processing.acquisition.PixelPipeline'>)[source]¶ Bases:
pymepix.core.log.Logger
High level class to work with timepix and perform acquistion
This class performs connection to SPIDR, initilization of timepix and handling of acquisition. Each individual timepix device can be accessed using the square bracket operator.
Parameters: - spidr_address (
tuple
ofstr
andint
) – socket style tuple of SPIDR ip address and port - src_ip_port (
tuple
ofstr
andint
, optional) – socket style tuple of the IP address and port of the interface that is connecting to SPIDR
Examples
Startup device
>>> timepix = Pymepix(('192.168.1.10',50000))
Find how many Timepix are connected
>>> len(timepix) 1
Set the Bias voltage >>> timepix.biasVoltage = 50
Access a specific Timepix device:
>>> timepix[0].deviceName W0026_K06
Load a config file into timepix
>>> timepix[0].loadSophyConfig('W0026_K06_50V.spx')
-
biasVoltage
¶ Bias voltage in volts
-
dataCallback
¶ Function to call when data is received from a timepix device
This has the effect of disabling polling.
-
enablePolling
(maxlen=100)[source]¶ Enables polling mode
This clears any user defined callbacks and the polling buffer
-
isAcquiring
¶
-
numDevices
¶
-
poll
(block=False)[source]¶ If polling is used, returns data stored in data buffer.
the buffer is in the form of a ring and will overwrite older values if it becomes full
Returns: Return type: MessageType
, data
-
pollBufferLength
¶ Get/Set polling buffer length
Clears buffer on set
- spidr_address (
pymepix.timepixdef module¶
-
class
pymepix.timepixdef.
DacRegisterCodes
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
Ibias_CP_PLL
= 17¶
-
Ibias_DiscS1_OFF
= 9¶
-
Ibias_DiscS1_ON
= 8¶
-
Ibias_DiscS2_OFF
= 11¶
-
Ibias_DiscS2_ON
= 10¶
-
Ibias_Ikrum
= 4¶
-
Ibias_PixelDAC
= 12¶
-
Ibias_Preamp_OFF
= 2¶
-
Ibias_Preamp_ON
= 1¶
-
Ibias_TPbufferIn
= 13¶
-
Ibias_TPbufferOut
= 14¶
-
PLL_Vcntrl
= 18¶
-
VPreamp_NCAS
= 3¶
-
VTP_coarse
= 15¶
-
VTP_fine
= 16¶
-
Vfbk
= 5¶
-
Vthreshold_coarse
= 7¶
-
Vthreshold_fine
= 6¶
-
-
class
pymepix.timepixdef.
GrayCounter
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
Disable
= 0¶
-
Enable
= 8¶
-
Mask
= 8¶
-
-
class
pymepix.timepixdef.
OperationMode
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
EventiTot
= 4¶
-
Mask
= 6¶
-
ToA
= 2¶
-
ToAandToT
= 0¶
-
-
class
pymepix.timepixdef.
PacketType
[source]¶ Bases:
enum.Enum
An enumeration.
-
Pixel
= 1¶
-
Trigger
= 0¶
-
-
class
pymepix.timepixdef.
Polarity
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
Negative
= 1¶
-
Positive
= 0¶
-
-
class
pymepix.timepixdef.
SuperPixel
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
Disable
= 0¶
-
Enable
= 64¶
-
Mask
= 64¶
-
-
class
pymepix.timepixdef.
TestPulse
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
Disable
= 0¶
-
Enable
= 32¶
-
Mask
= 32¶
-
-
class
pymepix.timepixdef.
TestPulseDigAnalog
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
DiscriminatorDigital
= 512¶
-
FrontEndAnalog
= 0¶
-
Mask
= 512¶
-
-
class
pymepix.timepixdef.
TestPulseGenerator
[source]¶ Bases:
enum.IntEnum
An enumeration.
-
External
= 1024¶
-
Internal
= 0¶
-
Mask
= 1024¶
-
pymepix.timepixdevice module¶
-
class
pymepix.timepixdevice.
TimepixDevice
(spidr_device, data_queue, pipeline_class=<class 'pymepix.processing.acquisition.PixelPipeline'>)[source]¶ Bases:
pymepix.core.log.Logger
Provides high level control of a timepix/medipix object
-
Ibias_DiscS1_OFF
¶ [0, 15]
-
Ibias_DiscS1_ON
¶ [0, 255]
-
Ibias_DiscS2_OFF
¶ [0, 15]
-
Ibias_DiscS2_ON
¶ [0, 255]
-
Ibias_Ikrum
¶ [0, 255]
-
Ibias_PixelDAC
¶ [0, 255]
-
Ibias_Preamp_OFF
¶ [0, 15]
-
Ibias_Preamp_ON
¶ [0, 255]
-
Ibias_TPbufferIn
¶ [0, 255]
-
Ibias_TPbufferOut
¶ [0, 255]
-
VPreamp_NCAS
¶ [0, 255]
-
VTP_coarse
¶ [0, 255]
-
VTP_fine
¶ [0, 511]
-
Vfbk
¶ [0, 255]
-
Vthreshold_coarse
¶ [0, 15]
-
Vthreshold_fine
¶ [0, 511]
-
acquisition
¶ Returns the acquisition object
Can be used to set parameters in the acqusition directly for example, to setup TOF calculation when using a
PixelPipeline
>>> tpx.acqusition.enableEvents False >>> tpx.acquistion.enableEvents = True
-
config
¶
-
devIdToString
()[source]¶ Converts device ID into readable string
Returns: Device string identifier Return type: str
-
deviceName
¶
-
grayCounter
¶
-
operationMode
¶
-
pixelMask
¶ Pixel mask set for timepix device
Parameters: value ( numpy.array
ofint
) – 256x256 uint8 threshold mask to set locallyReturns: Locally stored pixel mask matrix Return type: numpy.array
ofint
orNone
-
pixelTest
¶ Pixel test set for timepix device
Parameters: value ( numpy.array
ofint
) – 256x256 uint8 pixel test to set locallyReturns: Locally stored pixel test matrix Return type: numpy.array
ofint
orNone
-
pixelThreshold
¶ Threshold set for timepix device
Parameters: value ( numpy.array
ofint
) – 256x256 uint8 threshold to set locallyReturns: Locally stored threshold matrix Return type: numpy.array
ofint
orNone
-
polarity
¶
-
setDac
(code, value)[source]¶ Sets the DAC parameter using codes
Parameters: - code (
int
) – DAC code to set - value (
int
) – value to set
- code (
-
setEthernetFilter
(eth_filter)[source]¶ Sets the packet filter, usually set to 0xFFFF to all all packets
-
setupDevice
()[source]¶ Sets up valid paramters for acquisition
This will be manual when other acqusition parameters are working
-
superPixel
¶
-
testPulse
¶
-
testPulseDigitalAnalog
¶
-
testPulseGeneratorSource
¶
-
timeOfArrivalClock
¶
-
timerOverflowControl
¶
-