|
vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
How the time of an acquisition is cut into fractions. More...
#include <vitrio/detector_event_fractionation.hpp>
Public Member Functions | |
| detector_event_fractionation (std::size_t fraction_count) | |
| Construct a fractionation into a number of fractions. | |
| detector_event_fractionation (const detector_event_fractionation &other) noexcept | |
| detector_event_fractionation & | operator= (const detector_event_fractionation &other) noexcept |
| std::size_t | get_fraction_count () const noexcept |
| Get how many fractions the time is cut into. | |
| std::uint64_t | get_fraction_begin (std::size_t fraction, std::uint64_t time_extent) const noexcept |
| Get the time a fraction begins at. | |
Static Public Attributes | |
| static constexpr std::size_t | max_fraction_count = 0xFFFFFFFF |
| The most fractions a fractionation may cut into. | |
Friends | |
| bool | operator== (const detector_event_fractionation &lhs, const detector_event_fractionation &rhs) noexcept |
| bool | operator!= (const detector_event_fractionation &lhs, const detector_event_fractionation &rhs) noexcept |
How the time of an acquisition is cut into fractions.
A fixed number of fractions, of time spans as even as integers allow: fraction i of N, over a time extent T, spans [floor(i*T/N),floor((i+1)*T/N)). The fractions differ by one time quantum at most, and the longer ones are spread over the acquisition rather than gathered at either end of it. Over the frames of a movie, that means some fractions hold one frame more than others.
Where the fractions fall is the business of whoever reads the acquisition, not of the acquisition, so it is stated apart from it and applied to any time extent.
|
explicit |
Construct a fractionation into a number of fractions.
| fraction_count | How many fractions the time is cut into. |
| std::invalid_argument | If fraction_count is zero or exceeds max_fraction_count. |
|
noexcept |
Get the time a fraction begins at.
Fraction i spans from where it begins up to where fraction i+1 does, so the fraction past the last one begins where the time ends.
| fraction | Index of the fraction. Must not exceed get_fraction_count. |
| time_extent | How many time quanta are cut. |
time_extent for the fraction past the last one.
|
noexcept |
Get how many fractions the time is cut into.