th260 package¶
th260.th260controller module¶
-
class
th260.th260controller.
TH260Controller
[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObject
TH260 controller class to configure and monitor a TH260 P card
TH260Controller is meant to access a PicoQuant TimeHarp 260 Pico via TH260LIB.DLL v 3.1. for application to positron annihilation lifetime spectroscopy. It is derived from QtCore.QObject to allow the use of signals and slots logic to communicate between thread workers (usually a GUI application and a sorter worker).
-
ACQTMAX
= 360000000¶
-
ACQTMIN
= 1¶
-
ACQ_ENDED
¶ pyqtsignal() Signal send to the sorter worker to force the sorting of last events.
Type: obj
-
CFDLVLMAX
= 0¶
-
CFDLVLMIN
= -1200¶
-
CFDZCMAX
= 0¶
-
CFDZCMIN
= -40¶
-
CHANOFFSMAX
= 99999¶
-
CHANOFFSMIN
= -99999¶
-
DATA
¶ pyqtsignal(obj, int) Signal to share data object with the sorter worker of TH260 module. The first argument is the data object itself, here a c_type array buffer. The second argument is the number of records contained in the data buffer.
Type: obj
-
DEVINIT
¶ pyqtsignal() Sent by the initialization method when the device is successfuly initialised.
Type: obj
-
ERROR
¶ pyqtsignal(tuple) Not yet in use.
Type: obj
-
FLAG_FIFOFULL
= 2¶
-
FLAG_OVERFLOW
= 1¶
-
LIB_VERSION
= '3.1'¶
-
MAXDEVNUM
= 4¶
-
MAXINPCHAN
= 2¶
-
MAXLENCODE
= 5¶
-
MODE_T2
= 2¶
-
MODE_T3
= 3¶
-
NEW_OUTPUT
¶ pyqtsignal(str) message to be printed in a console or GUI output
Type: obj
-
PROGRESS
¶ pyqtsignal(str, int) Signal to share the progress status of the on-going acquisition. The first argument should always be ‘file’ when use together with the Pals3D GUI application. ‘file’ refer to the status of a single acquisition file in opposition to ‘acq’ that relate to the totale acquisition programm, and that is sent by the acquisition worker of the GUI application. This can be changed when used with an external application.
Type: obj
-
TH260LIB
= <MagicMock name='mock()' id='139821101025656'>¶
-
TTREADMAX
= 131072¶
-
UPDATECountRate
¶ pyqtsignal() Sent to the GUI application to force the update of these values in the GUI application.
Type: obj
-
WARNING
¶ pyqtsignal(str) Warming messages for message box in GUI
Type: obj
-
configureSetting
()[source]¶ Set the card paramaters before starting a measurement
Parameters are either changed in the init function, or acquired through an external script or GUI. Here, we only set CFD parameters and channel offsets and the device resolution should always be 25 ns as we are running in T2 mode only.
-
initialization
()[source]¶ Initialize communication with TH260 pico card
When initializationg is successfuly done, emit a DEVINIT signal.
-
printOutput
(text)[source]¶ Print a message to console output.
Meant to be used as slot for the NEW_OUTPUT and WARNING signals when no other slot (e.g. GUI application) is defined.
Parameters: text (str) – Message to be printed to console output
-
startAcquisition
()[source]¶ Start data collection with current settings
Launch measurement according to current settings. Emit signals to communicate with other workers. Data buffers are emitted through a signal for being sorted by the TH260sorter module. Output messages and countrates are also sent over signals.
-
tacq
= None¶ Measurement time in millisec,
-
tryfunc
(retcode, funcName, measRunning=False)[source]¶ Check for errors when executing a function
If an error is raised, print the corresponding error message, stop the TTTR measurement if needed and close the device.
Parameters: - retcode (int) – code return by the function funcName (0 = success, <0 = failed)
- funcName (str) – Name of the function being executed
- measRunning (bool, default False) – specify if TTTR measurement is running. If True, the measurement will be stopped when an error occured, and then the device is closed
-
th260.th260sorter module¶
-
class
th260.th260sorter.
SortingWorker
(**kwargs)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObject
Data sorting class for data received from a TH260 PicoQuant card
Inherit from QObect to use Qt signal and slot logic for receiving and sorting data. Can then be easily used in a GUI application
Parameters: kwargs (kwargs) – Keyword arguments passed from the main thread -
dataArray
¶ Type: dict
-
dataDeck
¶ Type: deque
-
islastEvent
¶ Type: bool
-
globRes
¶ Type: double
-
resultArray_01
¶ Type: list
-
resultArray_02
¶ Type: list
-
resultArray_12
¶ Type: list
Keyword Arguments: - sortingType (str) – ‘2C’ or ‘3C’
- timeGate (int) – Long time gate for positron lifetime (in ps)
- timeRes (int) – Short time gate for 511 MeV photons (in ps)
- filename (str) – Filename base for output file
- CFDset (dict) – Dictionnary of all the CFD settings for all channels
- acqTime (int) – Acquisition time (in min)
- nftot (int) – Total number of files during current measurement
-
COINCRATE
¶ pyqtSignal(int)
Type: obj
-
NEW_OUTPUT
¶ pyqtSignal(str)
Type: obj
-
T2WRAPAROUND_V1
= 33552000¶ Wraparound for version 1
Type: int
-
T2WRAPAROUND_V2
= 33554432¶ Wraparound for version 2
Type: int
-
VERSION
= 2¶ Version ==> remove?
Type: int
-
newMeasurement
(noFile)[source]¶ Initialise class attributes for new measurement
Parameters: noFile (int) – File numero in case of multiple file acquisition
-
saveData
(noFile, **kwargs)[source]¶ Do histogramming of the whole data set and save to files
Parameters: noFile (int) – Numero of the current acquisition file to be appended to the filename base.
-