File types: Difference between revisions
Jump to navigation
Jump to search
Line 149: | Line 149: | ||
; PMF note | ; PMF note | ||
: With each pmf generating '''.pmf.idx''' binary file, other is same as TXT with acqCount = 1. | : With each pmf generating '''.pmf.idx''' binary file, other is same as TXT with acqCount = 1. | ||
<br> | |||
; TXT file data, default | |||
: 0 0 0 5 0 0 0 … 256 numbers (int for non-calibrated values or float if the calibration used) and enter | |||
: 0 872 0 0 0 … 256 numbers (int for non-calibrated values or float if the calibration used) and enter | |||
: (256 lines) | |||
<br> | |||
; PMF file data, default | |||
: 0.00000 78.65742 0.00000 … 256 numbers (int for non-calibrated values or float if the calibration used) and enter | |||
: 0.00000 0.00000 999785.5 … 256 numbers (int for non-calibrated values or float if the calibration used) and enter | |||
: (256 lines * acqCount) | |||
<br> | |||
The '''PMF.IDX''' files generated beside the PMFs. Contains the simple binary array of little-endian qword addresses of | |||
the each frame start. | |||
<br> | |||
; .pmf.idx example | |||
: Pointers to frames at 0, 0x29, 0x52, 0x7b, 0xA4, 0xCD, … | |||
<br> | |||
TXT file data, pixet.PX_FRAMESAVE_SPARSEX flag: | |||
_ToA.txt file: px index, ToA _ToT.txt file: px index, ToT | |||
----------------------------------------------------------------------------- | |||
0 227212.500000 0 20 | |||
17 310685.937500 17 13 | |||
255 265487.500000 255 11 | |||
1274 105728.125000 1274 9 | |||
(lists of all hited pixels, int for non-calibrated data or float if the calibration used) | |||
{| class="wikitable" | |||
|+ TXT file data, pixet.PX_FRAMESAVE_SPARSEX flag | |||
|- | |||
! Header text !! Header text !! Header text | |||
|- | |||
| Example || Example || Example | |||
|- | |||
| Example || Example || Example | |||
|- | |||
| Example || Example || Example | |||
|} |
Revision as of 09:45, 8 January 2024
Under construction
- Under construction
- Under construction
- Under construction
- Under construction
- Under construction
- Under construction
- Under construction
- Under construction
- Under construction
- Under construction
- Under construction
- Under construction
File type and extensions constants
These constants are file types and extensions. It can be used for filenames testing or with acquisition functions.
Python example:
# measure and save one 0.25 second frame to png file named "testFile.png"
dev.doSimpleAcquisition(1, 0.25, pixet.PX_FTYPE_PNG, "testFile")
dev.doSimpleAcquisition(1, 0.25, pixet.PX_FTYPE_AUTODETECT, "testFile.png")
File type constants | File extensions constants | Exts |
---|---|---|
PX_FTYPE_NONE | (No direct file saving – data stored only in memory) | |
PX_FTYPE_AUTODETECT | (FTYPE detected by extension in a filename) | |
PX_FTYPE_ASCII_FRAME | PX_EXT_ASCII_FRAME | "txt" |
PX_FTYPE_BINARY_FRAME | PX_EXT_BINARY_FRAME | "pbf" |
PX_FTYPE_MULTI_FRAME | PX_EXT_MULTI_FRAME | "pmf" |
PX_FTYPE_BINARY_MULTIFRAME | PX_EXT_BINARY_MULTI_FRAME | "bmf" |
PX_FTYPE_TPX3_PIXELS | PX_EXT_TPX3_PIXELS | "t3p" |
PX_FTYPE_TPX3_PIXELS | PX_ASCII PX_EXT_TPX3_PIXELS_ASCII | "t3pa" |
PX_FTYPE_CLUSTER_LOG | PX_EXT_CLUSTER_LOG | "clog" |
PX_FTYPE_PIXEL_LOG | PX_EXT_PIXEL_LOG | "plog" |
PX_FTYPE_PNG | PX_EXT_PNG | "png" |
PX_FTYPE_TPX3_RAW_DATA | PX_EXT_TPX3_RAW_DATA | "t3r" |
PX_FTYPE_PIXET_RAW_DATA | PX_EXT_PIXET_RAW_DATA | "prd" |
PX_FTYPE_EXTERNAL | (reserved) | |
(description file saved automatically with pmf/txt) | PX_EXT_FRAME_DESC | "dsc" |
(index file saved automatically with pmf/txt) | PX_EXT_INDEX | "idx" |
txt | ASCII matrix: Text files with img lines converted to text lines with numbers separated by spaces. |
pbf | Simple binary files, numbers only. |
pmf | Multiple frames. Default is same as the txt, but multiple frames on top of each other. Can use BINARY flag. |
t3pa | Tpx3 pixels ASCII. Text format, tab-separated columns with the header in the first row. Biggest to saving. |
t3p | Tpx3 pixels. Binary format. Lower saved size, more complex to understand. |
t3r | Tpx3 raw data. Fastest to saving, difficult to understand, slow to processing and can cause processing errors. |
bstg | Binary settings file: Measured data with all configuration. See Binary Spectral Imaging API: BSTG files |
clog, plog | Clusters/pixels logs. Text files contains clusters separated to frames with pixels lists. Historic formats for saving a data with few hited pixels in a frames. |
h5 | HDF5, hierarchical data format 5. Used as one of multi-frame formats. |
info | Text file with "[FileInfo]" head and all metadata list. |
dsc | Text file with frame index first and all metadata list. |
idx | Binary index for multi-frame files. Usesfull for fast access to n-th frame. |
File saving flags summary
File saving flags can do additional settings for file(s) saving.
- Can be used in saving files or in doAdvancedAcquisition python methods, for example.
- Flags can be combined.
- Default frame file settings is set of separate subframes text files, with all pixels include zeros, each subframe with idx+dsc files:
- file_ToT.pmf, file_ToT.pmf.dsc, file_ToT.pmf.idx, file_ToA.pmf, file_ToA.pmf.dsc, file_ToA.pmf.idx
Flag constant base name | Description |
---|---|
PX_FRAMESAVE_BINARY | Use binary format in pmf. |
PX_FRAMESAVE_SPARSEX | Index + non-zero pixels in file. # separates (sub)frs. |
PX_FRAMESAVE_SPARSEXY | X, Y + non-zero pixel in file. # separates (sub)frames. |
PX_FRAMESAVE_NODSC | Do not add dsc file. |
PX_FRAMESAVE_NOSUBFRAMES | Do not use subframes, save main frame only. |
PX_FRAMESAVE_SUBFRAMES_ONEFILE | Save all subframes to a single file. |
PX_FRAMESAVE_SUBFRAMES_SAVEMAINFRAME | Save separate all subframes and main frame extra. |
File extensions and flags: TXT/PBF/PMF/BMF details
The files formats
txt | Single frame in the text file. |
pbf | Pixet Binary Frame - Single frame in the binary file. |
pmf | Pixet Multi Frame - Multiframe file with text or binary format, depends on flags used with saving. |
bmf | Binary Multi Frame - Multiframe file with binary format, depends on flags used with saving. |
idx | Index for seeking - Binary array of 64b pointers to start of frames and subframes. |
dsc | Description. List of all metadata for each frame and subframe. Actual device and acquisition parameters, data types, etc. The "Frame name" item can be helpful to orientation in pmf structure if the ONEFILE flag used. The Type=item is helpful to understanding the structure of data if the BINARY flag used. |
Multi-files names generation
- Note
- All the next examples are for Timepix3, single chip, opm = TPX3_OPM_TOATOT
- flags 0 (default), input filename = "name", acqCount = 1
- name_ToA.txt, name_ToA.txt.dsc, name_ToT.txt, name_ToT.txt.dsc
- acqCount = 6
- name_0_ToA.txt, name_0_ToA.txt.dsc, name_0_ToT.txt, ...
- ...
- name_5_ToA.txt, name_5_ToA.txt.dsc, ...
- PMF note
- With each pmf generating .pmf.idx binary file, other is same as TXT with acqCount = 1.
- TXT file data, default
- 0 0 0 5 0 0 0 … 256 numbers (int for non-calibrated values or float if the calibration used) and enter
- 0 872 0 0 0 … 256 numbers (int for non-calibrated values or float if the calibration used) and enter
- (256 lines)
- PMF file data, default
- 0.00000 78.65742 0.00000 … 256 numbers (int for non-calibrated values or float if the calibration used) and enter
- 0.00000 0.00000 999785.5 … 256 numbers (int for non-calibrated values or float if the calibration used) and enter
- (256 lines * acqCount)
The PMF.IDX files generated beside the PMFs. Contains the simple binary array of little-endian qword addresses of
the each frame start.
- .pmf.idx example
- Pointers to frames at 0, 0x29, 0x52, 0x7b, 0xA4, 0xCD, …
TXT file data, pixet.PX_FRAMESAVE_SPARSEX flag:
_ToA.txt file: px index, ToA _ToT.txt file: px index, ToT
0 227212.500000 0 20 17 310685.937500 17 13 255 265487.500000 255 11 1274 105728.125000 1274 9 (lists of all hited pixels, int for non-calibrated data or float if the calibration used)
Header text | Header text | Header text |
---|---|---|
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |