pept.scanners.modular_camera#
- pept.scanners.modular_camera(data_file, sample_size=None, overlap=None, verbose=True)[source]#
Initialise PEPT LoRs from the modular camera DAQ.
Can read data from a .da_1 file or equivalent. The file must contain the standard datawords from the modular camera output. This will then be automatically transformed into the standard LineData format with every row being [time, x1, y1, z1, x2, y2, z2], where the geometry is derived from the C-extension. The current useable geometry is a square layout with 4 stacks for 4 modules, separated by 250 mm.
- Parameters
- data_file
str A string with the (absolute or relative) path to the data file from which the PEPT data will be read. It should include the full file name, along with the extension (.da_1)
- sample_size
int, optional An int` that defines the number of lines that should be returned when iterating over _lines. A sample_size of 0 yields all the data as one single sample. (Default is 200)
- overlap
int, optional An int that defines the overlap between two consecutive samples that are returned when iterating over _lines. An overlap of 0 means consecutive samples, while an overlap of (sample_size - 1) means incrementing the samples by one. A negative overlap means skipping values between samples. An error is raised if overlap is larger than or equal to sample_size. (Default is 0)
- verbosebool, optional
An option that enables printing the time taken for the initialisation of an instance of the class. Useful when reading large files (10gb files for PEPT data is not unheard of). (Default is True)
- data_file
- Returns
LineDataThe initialised LoRs.
- Raises
ValueErrorIf overlap >= sample_size. Overlap has to be smaller than sample_size. Note that it can also be negative.
ValueErrorIf the data file does not have (N, 7) shape.