Third part of splitting up dev/gap. The multithreaded reader comes in
the next PR.
- `RawFile` takes an optional `GapPixels`. Frames are assembled with the
gaps inserted: fill the gap lines, scatter each module part through the
scratch buffer into its gapped position, and split the chip edge counts
if configured. `rows()`, `cols()`, `pixels_per_frame()` and
`bytes_per_frame()` include the gaps, for the full frame and for each
ROI. Only Jungfrau and Eiger are supported.
- Python `RawFile` accepts `gap_pixels` as a bool or a `GapPixels`,
exposes it as a property, and takes frame shapes from `rows()` and
`cols()`.
- The generic `File` is unchanged: it does not know the detector
geometry of `.npy` and `.dat` files, so gap pixels stay a `RawFile`
option. Use `RawFile`, or apply `insert_gap_pixels` to frames from
`File`.
- Tests: generalized raw file helper with arbitrary module layouts,
module layout assembly tests (these cover #421, which went in without
tests), synthetic gap tests, a split-counts oracle against
`insert_gap_pixels`, unsupported detector rejection, and data-backed
recorded-file and two-ROI cases.
- A raw file benchmark with no-gaps, fill-value and split-counts cases.
- Docs and release note.
We have no code in aare to deal with RawFiles that have missing packets
if they are not padded to full size or frames with packet loss dropped.
Added:
- check that we don't try to read files that are not supported
- python bindings for frame discard policy
at least we get the check in:
closes #171
---------
Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch>
- Updated error message to mention out of range and which file it
applies to
- If there are different number of frames in the subfiles, take the
minimum and print a warning
Closes: #363
Closes: #362
- handles file reading of disabled udp ports
- adds members disabled_udp_ports in master file as an optional
- adds member diasbled_udp_port_types in master file as an optional
- Treats enabled udp ports as ROIs
- merges/combines consecutive ROis into one
### To discuss:
- right now can only handle either ROI or disabled udp ports (disabled
udp ports has higher precedence)
- Should Frames in File be removed from Master File as value is nonsense
for disabled udp ports
---------
Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
Matterhorn10 Transform
some other Transformations from pyctbGUI
added method get_reading_mode for easier error handling in decoders
## TODO:
- proper error handling for all other decoders
- proper documentation for all other decoders
- refactoring all other decoders to store hard coded values in a Struct
ChipSpecification
Reading multiple ROI's for aare
- read_frame, read_n etc throws for multiple ROIs
- new functions read_ROIs, read_n_ROIs
- read_roi_into (used for python bindings - to not copy)
all these functions use get_frame or get_frame_into where one passes the
roi_index
## Refactoring:
- each roi keeps track of its subfiles that one has to open e.g.
subfiles can be opened several times
- refactored class DetectorGeometry - keep track of the updated module
geometries in new class ROIGeometry.
- ModuleGeometry updates based on ROI
## ROIGeometry:
- stores number of modules overlapping with ROI and its indices
- size of ROI
Note: only tested size of the resulting frames not the actual values
---------
Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
- automatically run python tests
- automatically run test using data files on local runner from gitea
- fixed some of the workflows
---------
Co-authored-by: Erik Fröjdh <erik.frojdh@psi.ch>
- No changes or evaluation of existing tests
- Tags for including tests that require data is changed to
**[.with-data]** and **--with-data** for C++ and python respectively
- Minor update to docs
- Added missing files to the test data repo