Connecting and Configuring¶
Connecting¶
The IP address for the camera needs to be set up in the default.yaml file and a pipeline configuration needs to be selected from the pipelines.yaml file. Timepix3 with 10 Gb/s uses 192.168.100.1. Look up the official documentation for your camera to find out more. The IP address of your TPX camera is the one seen on the OLED screen.
Before using Pymepix, make sure your camera works properly with the SoPhy software.
Connecting to SPIDR with a desired pipeline configuration can be done with:
>>> pipeline_config = AcquisitionPipeline.getConfigFromYaml("pixel_pipeline")
>>> timepix = PymepixConnection(pipeline_config)
The number of devices can be found using:
>>> len(timepix)
1
Meaning we have one device. To access this device directly, use:
tpx0 = timepix[0]
And to check the device name:
>>> tpx0.deviceName
W0026_K08
Configuring¶
To set the biasVoltage to 50 Volts in spidr you can do:
>>> timepix.biasVoltage = 50
Setting the we can manage its settings directly. To easily setup the device we can use a SoPhy config file (.spx):
tpx0.loadConfig('myFile.spx')
This sets up all the DAC setting and pixel configurations. Individual parameters can also be set for example. To set the fine threshold to 100 mV do:
>>> tpx0.Vthreshold_fine = 100
pixel threshold configurations can be set by passing a 256x256 numpy array:
import numpy as np
tpx0.pixelThreshold[...] = 0
The same for pixel masks, to set a checkboard mask do:
tpx0.pixelMask[::2] = 1
These need to be uploaded to timepix before they take effect:
>>> tpx0.uploadPixels()
The full list of parameters that can be set can be found in timepixdevice().