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

What is fixed for one acquisition of a detector that counts events: the grid its events are placed on and the time they span. More...

#include <vitrio/detector_event_timeline_descriptor.hpp>

Public Member Functions

 detector_event_timeline_descriptor (span< const std::size_t > extents, span< const std::size_t > subdivisions, std::uint64_t time_extent, double time_quantum)
 Construct a descriptor from its components.
 
 detector_event_timeline_descriptor (const detector_event_timeline_descriptor &other)
 
 detector_event_timeline_descriptor (detector_event_timeline_descriptor &&other) noexcept
 
detector_event_timeline_descriptor & operator= (const detector_event_timeline_descriptor &other)
 
detector_event_timeline_descriptor & operator= (detector_event_timeline_descriptor &&other) noexcept
 
std::size_t get_rank () const noexcept
 Get the number of axes events are placed along.
 
span< const std::size_t > get_extents () const noexcept
 Get the extents of the grid of positions.
 
span< const std::size_t > get_subdivisions () const noexcept
 Get how many position quanta a pixel of the detector spans.
 
std::uint64_t get_time_extent () const noexcept
 Get how many time quanta the acquisition spans.
 
double get_time_quantum () const noexcept
 Get the length of one time quantum.
 

Friends

bool operator== (const detector_event_timeline_descriptor &lhs, const detector_event_timeline_descriptor &rhs) noexcept
 
bool operator!= (const detector_event_timeline_descriptor &lhs, const detector_event_timeline_descriptor &rhs) noexcept
 

Detailed Description

What is fixed for one acquisition of a detector that counts events: the grid its events are placed on and the time they span.

Positions and times are integers, counted in quanta. A position quantum is a fraction of a pixel of the detector, the same along every pixel of an axis, so that an event is placed on a grid finer than the pixels by a whole number of subdivisions per pixel. A detector that places its events no finer than its pixels has one subdivision along every axis.

Time runs from zero up to the time extent, which bounds the acquisition whether or not an event falls at its end. A detector that reads out frames, such as one writing EER files, counts time in frames.

See also
detector_event_timeline

Constructor & Destructor Documentation

◆ detector_event_timeline_descriptor()

vitrio::detector_event_timeline_descriptor::detector_event_timeline_descriptor ( span< const std::size_t >  extents,
span< const std::size_t >  subdivisions,
std::uint64_t  time_extent,
double  time_quantum 
)

Construct a descriptor from its components.

Parameters
extentsExtents of the grid of positions, in position quanta and slowest axis first. Each must be at most 2^32, so that a position along it fits in 32 bits.
subdivisionsPosition quanta per pixel of the detector along each axis. Each must divide the extent of its axis.
time_extentHow many time quanta the acquisition spans.
time_quantumLength of one time quantum in seconds, or zero when it is not known.
Exceptions
std::invalid_argumentIf extents is empty, if subdivisions does not have its rank, if an extent or a subdivision is zero, if an extent exceeds 2^32 or is not divided by its subdivision, if time_extent is zero, or if time_quantum is negative or not finite.

Member Function Documentation

◆ get_extents()

span< const std::size_t > vitrio::detector_event_timeline_descriptor::get_extents ( ) const
noexcept

Get the extents of the grid of positions.

Returns
span<const std::size_t> The extents in position quanta, slowest axis first. It refers to storage owned by this descriptor.

◆ get_rank()

std::size_t vitrio::detector_event_timeline_descriptor::get_rank ( ) const
noexcept

Get the number of axes events are placed along.

Returns
std::size_t The rank. Never zero.

◆ get_subdivisions()

span< const std::size_t > vitrio::detector_event_timeline_descriptor::get_subdivisions ( ) const
noexcept

Get how many position quanta a pixel of the detector spans.

Returns
span<const std::size_t> The subdivisions of a pixel along each axis, slowest first. It refers to storage owned by this descriptor.

◆ get_time_extent()

std::uint64_t vitrio::detector_event_timeline_descriptor::get_time_extent ( ) const
noexcept

Get how many time quanta the acquisition spans.

Returns
std::uint64_t The time extent. Never zero.

◆ get_time_quantum()

double vitrio::detector_event_timeline_descriptor::get_time_quantum ( ) const
noexcept

Get the length of one time quantum.

Returns
double The length in seconds, or zero when it is not known.

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