vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Friends | List of all members
vitrio::detector_event_fractionation Class Reference

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ detector_event_fractionation()

vitrio::detector_event_fractionation::detector_event_fractionation ( std::size_t  fraction_count)
explicit

Construct a fractionation into a number of fractions.

Parameters
fraction_countHow many fractions the time is cut into.
Exceptions
std::invalid_argumentIf fraction_count is zero or exceeds max_fraction_count.

Member Function Documentation

◆ get_fraction_begin()

std::uint64_t vitrio::detector_event_fractionation::get_fraction_begin ( std::size_t  fraction,
std::uint64_t  time_extent 
) const
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.

Parameters
fractionIndex of the fraction. Must not exceed get_fraction_count.
time_extentHow many time quanta are cut.
Returns
std::uint64_t The first time quantum of the fraction, or time_extent for the fraction past the last one.

◆ get_fraction_count()

std::size_t vitrio::detector_event_fractionation::get_fraction_count ( ) const
noexcept

Get how many fractions the time is cut into.

Returns
std::size_t The number of fractions. Never zero.

The documentation for this class was generated from the following file: