spidr4.stream
spidr4.stream Module
- class spidr4.stream.PacketReaderThread(tpxStub, queue, chipIndex=0, top=True, bottom=True, forward_empty=True, tag=None)[source]
- spidr4.stream.frame8b_generator(q, top_tag='top', bottom_tag='bot', frame_factory=<function <lambda>>)[source]
- Generator for complete frames. - Parameters:
- q – A tagged queue for bottom and top. 0 
- top_tag 
- bottom_tag 
- frame_factory 
 
- Returns:
 
- spidr4.stream.packet_read_thread(tpxStub, queue, chipIndex=0, top=True, bottom=True, forward_empty=True, tag=None)[source]
- Start read thread starts a thread retrieving pixel data from the ScDaq using PacketReadout. - This thread will run for the entire duration of the program. - Parameters:
- tpxStub – The gRPC Timepix4 stub 
- queue – The queue to place packets in 
- chipIndex – the index of the chip (default = 0) 
- top – Whether or not to stream the top 
- bottom – Whether or not to stream the bottom 
- forward_empty – Whether or not to forward empty packets 
- tag – The optional tag to put the queue 
 
- Returns:
- PacketReaderThread 
 
- spidr4.stream.queue_generator(q, timeout=0.05)[source]
- Generator for retrieving packets from a queue. Data can be placed in the queue from the packet_read_thread. - Parameters:
- q – The queue to read from 
- timeout – Optional timeout, default 40 ms 
 
 
Functions
| 
 | Generator for complete frames. | 
| 
 | |
| 
 | |
| 
 | Start read thread starts a thread retrieving pixel data from the ScDaq using PacketReadout. | 
| 
 | Generator for retrieving packets from a queue. | 
| 
 | |
| 
 | 
Classes
| 
 | |
| 
 | |
| 
 | defaultdict(default_factory=None, /, [...]) --> dict with default factory | 
Class Inheritance Diagram
