File types: Difference between revisions
Jump to navigation
Jump to search
(Created page with "= File type and extensions constants = These constants are file types and extensions. It can be used for filenames testing or with acquisition functions.<br> <br> '''Python example:''' <syntaxhighlight lang=Python> # 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") </syntaxhighlight> {| class="wikitable" |+...") |
|||
Line 75: | Line 75: | ||
|} | |} | ||
= File saving flags = | = File saving flags overview = | ||
File saving flags can do additional settings for file(s) saving. | File saving flags can do additional settings for file(s) saving. | ||
* Can be used in '''saving''' files or in '''doAdvancedAcquisition''' python methods, for example. | * Can be used in '''saving''' files or in '''doAdvancedAcquisition''' python methods, for example. | ||
Line 101: | Line 101: | ||
| PX_FRAMESAVE_SUBFRAMES_SAVEMAINFRAME || Save separate all subframes and main frame extra. | | PX_FRAMESAVE_SUBFRAMES_SAVEMAINFRAME || Save separate all subframes and main frame extra. | ||
|} | |} | ||
== File extensions and flags: TXT/PBF/PMF/BMF details == |
Revision as of 18:30, 5 January 2024
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 | _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 | ||
(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 Spectraimg methods and properties). |
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 (see Frame metadata and his handling methods). |
dsc | Text file with frame index first and all metadata list (see Frame metadata and his handling methods). |
idx | Binary index for multi-frame files. Usesfull for fast access to n-th frame. |
File saving flags overview
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. |