tttrlib
A library for time-tagged time resolved data
|
Time-Tagged Time-Resolved (TTTR) data class. More...
#include <TTTR.h>
Public Member Functions | |
std::shared_ptr< TTTR > | Get () |
Returns a shared pointer to the current instance of TTTR. | |
void | copy_from (const TTTR &p2, bool include_big_data=true) |
Copies information from another TTTR object. | |
int | read_file (const char *fn=nullptr, int container_type=-1) |
Reads TTTR data from a file into the TTTR object. | |
void | append_events (unsigned long long *macro_times, int n_macrotimes, unsigned short *micro_times, int n_microtimes, signed char *routing_channels, int n_routing_channels, signed char *event_types, int n_event_types, bool shift_macro_time=true, long long macro_time_offset=0) |
Appends events to the TTTR object. | |
void | append_event (unsigned long long macro_time, unsigned short micro_time, signed char routing_channel, signed char event_type, bool shift_macro_time=true, long long macro_time_offset=0) |
Appends a single event to the TTTR object. | |
void | append (const TTTR *other, bool shift_macro_time=true, long long macro_time_offset=0) |
Appends events from another TTTR object to the current TTTR object. | |
size_t | size () |
Returns the number of valid events in the TTTR data. | |
void | get_used_routing_channels (signed char **output, int *n_output) |
Retrieves the used routing channel numbers from the TTTR data. | |
void | get_macro_times (unsigned long long **output, int *n_output) |
Retrieves the macro times of valid TTTR events. | |
void | get_micro_times (unsigned short **output, int *n_output) |
Retrieves the micro times of valid TTTR events. | |
void | get_intensity_trace (int **output, int *n_output, double time_window_length=1.0) |
Computes and returns an intensity trace for a specified integration window. | |
void | get_routing_channel (signed char **output, int *n_output) |
Returns an array containing the routing channel numbers of the valid TTTR events. | |
void | get_event_type (signed char **output, int *n_output) |
Returns an array containing the event types of the valid TTTR events. | |
unsigned int | get_number_of_micro_time_channels () |
Returns the number of micro time channels that fit between two macro time clocks. | |
size_t | get_n_valid_events () |
Returns the number of valid events in the TTTR file. | |
std::string | get_tttr_container_type () |
Returns the container type used to open the TTTR file. | |
std::shared_ptr< TTTR > | select (int *selection, int n_selection) |
Creates a new TTTR object by selecting specific events based on the provided indices. | |
TTTR () | |
Default constructor for the TTTR (Time-Tagged Time-Resolved) class. | |
TTTR (const TTTR &p2) | |
Copy constructor for the TTTR (Time-Tagged Time-Resolved) class. | |
TTTR (const char *filename, int container_type, bool read_input) | |
TTTR (const char *filename, int container_type) | |
TTTR (const char *filename, const char *container_type) | |
TTTR (unsigned long long *macro_times, int n_macrotimes, unsigned short *micro_times, int n_microtimes, signed char *routing_channels, int n_routing_channels, signed char *event_types, int n_event_types, bool find_used_channels=true) | |
TTTR (const TTTR &parent, int *selection, int n_selection, bool find_used_channels=true) | |
~TTTR () | |
std::string | get_filename () |
std::shared_ptr< TTTR > | get_tttr_by_selection (int *selection, int n_selection) |
void | get_ranges_by_time_window (int **output, int *n_output, double minimum_window_length, double maximum_window_length=-1, int minimum_number_of_photons_in_time_window=-1, int maximum_number_of_photons_in_time_window=-1, double macro_time_calibration=-1, bool invert=false) |
Returns time windows (tw), i.e., the start and the stop indices for a minimum tw size, a minimum number of photons in a tw. | |
void | get_selection_by_channel (int **output, int *n_output, signed char *input, int n_input) |
Get events indices by the routing channel number. | |
std::shared_ptr< TTTR > | get_tttr_by_channel (signed char *input, int n_input) |
Get a TTTR object based on a selection by routing channel numbers. | |
void | get_selection_by_count_rate (int **output, int *n_output, double time_window, int n_ph_max, bool invert=false, bool make_mask=false) |
Get indices where the count rate is below a specified maximum. | |
std::shared_ptr< TTTR > | get_tttr_by_count_rate (double time_window, int n_ph_max, bool invert=false, bool make_mask=false) |
Get a TTTR object filtered by count rate criteria. | |
void | get_time_window_ranges (int **output, int *n_output, double minimum_window_length, int minimum_number_of_photons_in_time_window, int maximum_number_of_photons_in_time_window=-1, double maximum_window_length=-1.0, double macro_time_calibration=-1, bool invert=false) |
Get time windows (tw) based on specified criteria. | |
TTTRHeader * | get_header () |
Get the header as a map of strings. | |
void | set_header (TTTRHeader *v) |
Set the header for the TTTR object. | |
size_t | get_n_events () |
Returns the number of events in the TTTR file, or the number of selected events if a selection is applied. | |
bool | write (std::string filename, TTTRHeader *header=nullptr) |
Writes the contents of an opened TTTR file to a new TTTR file. | |
void | write_spc132_events (FILE *fp, TTTR *tttr) |
Write events from the TTTR object to a file as SPC-132. | |
void | write_hht3v2_events (FILE *fp, TTTR *tttr) |
Write events from the TTTR object to a file as HHT3v2. | |
void | write_header (std::string &fn, TTTRHeader *header=nullptr) |
Writes the header information to a TTTR file. | |
void | shift_macro_time (int shift) |
Shifts the macro time by adding an integer value to each macro time entry. | |
TTTR * | operator+ (const TTTR *other) const |
Adds the events of another TTTR object to the current TTTR object. | |
void | get_microtime_histogram (double **histogram, int *n_histogram, double **time, int *n_time, unsigned short micro_time_coarsening=1) |
Computes and returns a histogram of the TTTR data's micro times. | |
double | mean_lifetime (TTTR *tttr_irf=nullptr, int m0_irf=1, int m1_irf=1, std::vector< int > *tttr_indices=nullptr, double dt=-1.0, int min_ph=1) |
Computes the mean lifetime by moments of decay and instrument response. | |
double | get_count_rate (std::vector< int > *tttr_indices=nullptr, double macrotime_resolution=-1.0) |
Gets the count rate. | |
double | get_mean_microtime (std::vector< int > *tttr_indices=nullptr, double microtime_resolution=-1.0, int minimum_number_of_photons=1) |
Gets the mean microtime. | |
Static Public Member Functions | |
static size_t | get_number_of_records_by_file_size (std::FILE *fp, size_t offset, size_t bytes_per_record) |
Determines the number of records in a TTTR file (not for use with HDF5). | |
static void | compute_microtime_histogram (TTTR *tttr_data, double **output, int *n_output, double **time, int *n_time, unsigned short micro_time_coarsening=1, std::vector< int > *tttr_indices=nullptr) |
Computes a histogram of the TTTR data's micro times. | |
static double | compute_mean_lifetime (TTTR *tttr_data, TTTR *tttr_irf=nullptr, double m0_irf=1, double m1_irf=0, std::vector< int > *tttr_indices=nullptr, double dt=-1.0, int minimum_number_of_photons=1, std::vector< double > *background=nullptr, double m0_bg=0.0, double m1_bg=0.0, double background_fraction=-1.0) |
Computes the mean lifetime by the moments of the decay and the instrument response function. | |
static double | compute_count_rate (TTTR *tttr_data, std::vector< int > *tttr_indices=nullptr, double macrotime_resolution=-1.0) |
Computes the count rate. | |
static double | compute_mean_microtime (TTTR *tttr_data, std::vector< int > *tttr_indices=nullptr, double microtime_resolution=-1.0, int minimum_number_of_photons=1) |
Computes the mean microtime. | |
Protected Member Functions | |
void | find_used_routing_channels () |
Traverses the routing channel array and identifies used routing channel numbers. | |
Protected Attributes | |
std::vector< signed char > | used_routing_channels |
A routing channel is a numeric identifier associated with each photon in the time-tagged time-resolved (TTTR) data. It signifies the path or channel through which the photon is detected or routed. | |
Friends | |
class | CLSMImage |
class | TTTRRange |
class | TTTRMask |
class | CorrelatorPhotonStream |
Time-Tagged Time-Resolved (TTTR) data class.
The TTTR class represents Time-Tagged Time-Resolved data, which is commonly used in time-correlated single-photon counting (TCSPC) experiments. It inherits from std::enable_shared_from_this to facilitate shared ownership through std::shared_ptr.
The class includes friend declarations for CLSMImage, TTTRRange, TTTRMask, and CorrelatorPhotonStream classes, allowing these classes to access the private and protected members of TTTR.
TTTR data typically consists of time-tagged events, and this class provides functionality to work with and analyze such data.
TTTR::TTTR | ( | ) |
TTTR::TTTR | ( | const TTTR & | p2 | ) |
TTTR::TTTR | ( | const char * | filename, |
int | container_type, | ||
bool | read_input ) |
Constructor that can read a file.
filename | TTTR filename. |
container_type | Container type as int:
|
read_input | If true, reads the content of the file. |
TTTR::TTTR | ( | const char * | filename, |
int | container_type ) |
Constructor for TTTR object that reads the content of the file.
filename | TTTR filename. |
container_type | Container type as int:
|
TTTR::TTTR | ( | const char * | filename, |
const char * | container_type ) |
Constructor for TTTR object.
filename | TTTR filename. |
container_type | Container type as string:
|
TTTR::TTTR | ( | unsigned long long * | macro_times, |
int | n_macrotimes, | ||
unsigned short * | micro_times, | ||
int | n_microtimes, | ||
signed char * | routing_channels, | ||
int | n_routing_channels, | ||
signed char * | event_types, | ||
int | n_event_types, | ||
bool | find_used_channels = true ) |
Constructor for TTTR object using arrays of TTTR events.
If arrays of different sizes are used to initialize a TTTR object, the shortest array among all provided arrays is used to construct the TTTR object.
macro_times | Array containing the macro times. |
n_macrotimes | Number of macro times. |
micro_times | Array containing the microtimes. |
n_microtimes | Length of the micro time array. |
routing_channels | Routing channel array. |
n_routing_channels | Length of the routing channel array. |
event_types | Array of event types. |
n_event_types | Number of elements in the event type array. |
find_used_channels | If set to true (default), searches all indices to find the used routing channels. |
TTTR::TTTR | ( | const TTTR & | parent, |
int * | selection, | ||
int | n_selection, | ||
bool | find_used_channels = true ) |
Constructor for creating a new TTTR object containing records specified in the selection array.
The selection array is an array of indices. The events with indices in the selection array are copied in the order of the selection array to a new TTTR object.
parent | Parent TTTR object from which to select records. |
selection | Array of indices specifying the selected records. |
n_selection | Number of elements in the selection array. |
find_used_channels | If set to true (default), searches all indices to find the used routing channels. |
TTTR::~TTTR | ( | ) |
void TTTR::append | ( | const TTTR * | other, |
bool | shift_macro_time = true, | ||
long long | macro_time_offset = 0 ) |
Appends events from another TTTR object to the current TTTR object.
Appends events from another TTTR object (other
) to the current TTTR object. Optionally shifts macro times and applies an offset to the macro times.
other | Pointer to the TTTR object containing events to append. |
shift_macro_time | Flag indicating whether to shift macro times. |
macro_time_offset | Offset applied to macro times if shift_macro_time is true. |
void TTTR::append_event | ( | unsigned long long | macro_time, |
unsigned short | micro_time, | ||
signed char | routing_channel, | ||
signed char | event_type, | ||
bool | shift_macro_time = true, | ||
long long | macro_time_offset = 0 ) |
Appends a single event to the TTTR object.
Appends a single event represented by macro_time, micro_time, routing_channel, and event_type to the TTTR object.
macro_time | Macro time value for the event. |
micro_time | Micro time value for the event. |
routing_channel | Routing channel value for the event. |
event_type | Event type value for the event. |
shift_macro_time | Flag indicating whether to shift macro time. |
macro_time_offset | Offset applied to macro time if shift_macro_time is true. |
void TTTR::append_events | ( | unsigned long long * | macro_times, |
int | n_macrotimes, | ||
unsigned short * | micro_times, | ||
int | n_microtimes, | ||
signed char * | routing_channels, | ||
int | n_routing_channels, | ||
signed char * | event_types, | ||
int | n_event_types, | ||
bool | shift_macro_time = true, | ||
long long | macro_time_offset = 0 ) |
Appends events to the TTTR object.
Appends events represented by macro_times, micro_times, routing_channels, and event_types to the TTTR object. The sizes of the input arrays (n_macrotimes, n_microtimes, n_routing_channels, n_event_types) must be equal.
macro_times | Array of macro time values. |
n_macrotimes | Number of elements in the macro_times array. |
micro_times | Array of micro time values. |
n_microtimes | Number of elements in the micro_times array. |
routing_channels | Array of routing channel values. |
n_routing_channels | Number of elements in the routing_channels array. |
event_types | Array of event type values. |
n_event_types | Number of elements in the event_types array. |
shift_macro_time | Flag indicating whether to shift macro times. |
macro_time_offset | Offset applied to macro times if shift_macro_time is true. |
|
static |
|
static |
Computes the mean lifetime by the moments of the decay and the instrument response function.
The computed lifetime is the first lifetime determined by the method of moments (Irvin Isenberg, 1973, Biophysical journal).
tttr_data | TTTR object for which the lifetime is computed. |
tttr_irf | TTTR object that is used as IRF. |
m0_irf | Number of counts in the IRF (used if no TTTR object for IRF provided). |
m1_irf | First moment of the IRF (used if no TTTR object for IRF provided). |
tttr_indices | Optional list of indices for selecting a subset of the TTTR. |
dt | Time resolution of the micro time. If not provided, extracted from the header (slow). |
minimum_number_of_photons | Minimum number of photons. If fewer photons are in the dataset, returns -1 as computed lifetime. |
background | Background pattern. |
m0_bg | Sum of background photons (overwritten if the background pattern is not empty). |
m1_bg | First moment of the background pattern (overwritten if the background pattern is not empty). |
background_fraction | Background fraction (if negative, the background is not scaled). |
|
static |
Computes the mean microtime.
tttr_data | TTTR object for which the mean microtime is computed. |
tttr_indices | Optional indices for selecting a subset of the TTTR. |
microtime_resolution | If negative (default), reads microtime resolution from header (slow). |
minimum_number_of_photons | Minimum number of photons. If less, returns -1 as computed mean microtime. |
|
static |
Computes a histogram of the TTTR data's micro times.
tttr_data | Pointer to the TTTR object containing the data. |
output | Pointer to which the histogram will be written (memory is allocated by the method). |
n_output | Pointer to the number of points in the histogram. |
time | Pointer to the time axis of the histogram (memory is allocated by the method). |
n_time | Pointer to the number of points in the time axis. |
micro_time_coarsening | A factor by which the micro times in the TTTR object are divided (default value is 1). |
tttr_indices | Optional pointer to store the indices of TTTR events used in the histogram. |
void TTTR::copy_from | ( | const TTTR & | p2, |
bool | include_big_data = true ) |
Copies information from another TTTR object.
This function allows copying information from another TTTR object, including optional components based on the specified parameters.
p2 | The TTTR object from which the information is copied. |
include_big_data | If true, macro time, micro time, etc., are also copied. Otherwise, only essential information is copied. |
|
protected |
Traverses the routing channel array and identifies used routing channel numbers.
Traverses the routing channel array and populates the protected attribute used_routing_channels with the routing channel numbers that are in use.
|
inline |
|
inline |
Gets the count rate.
tttr_indices | Optional indices for selecting a subset of the TTTR. |
macrotime_resolution | If negative (default), reads macrotime resolution from header (slow). |
void TTTR::get_event_type | ( | signed char ** | output, |
int * | n_output ) |
Returns an array containing the event types of the valid TTTR events.
The event types are stored in the output array, and the number of elements in the array is returned through the n_output parameter.
output | Pointer to the array to store the event types. |
n_output | Pointer to the number of elements in the output array. |
std::string TTTR::get_filename | ( | ) |
TTTRHeader * TTTR::get_header | ( | ) |
Get the header as a map of strings.
void TTTR::get_intensity_trace | ( | int ** | output, |
int * | n_output, | ||
double | time_window_length = 1.0 ) |
Computes and returns an intensity trace for a specified integration window.
The intensity trace is calculated based on the integration time windows, and the result is stored in the output array. The number of points in the intensity trace is returned through the n_output parameter.
output | Pointer to the array to store the intensity trace. |
n_output | Pointer to the number of points in the intensity trace. |
time_window_length | The length of the integration time windows in units of milliseconds. |
void TTTR::get_macro_times | ( | unsigned long long ** | output, |
int * | n_output ) |
Retrieves the macro times of valid TTTR events.
This function populates the provided output array with the macro times of the valid TTTR events. The number of elements in the output array is stored in the n_output parameter.
output | Pointer to the output array to be populated. |
n_output | Pointer to the number of elements in the output array. |
|
inline |
Gets the mean microtime.
tttr_indices | Optional indices for selecting a subset of the TTTR. |
microtime_resolution | If negative (default), reads microtime resolution from header (slow). |
minimum_number_of_photons | Minimum number of photons. If less, returns -1 as computed mean microtime. |
void TTTR::get_micro_times | ( | unsigned short ** | output, |
int * | n_output ) |
Retrieves the micro times of valid TTTR events.
This function populates the provided output array with the micro times of the valid TTTR events. The number of elements in the output array is stored in the n_output parameter.
output | Pointer to the output array to be populated. |
n_output | Pointer to the number of elements in the output array. |
|
inline |
Computes and returns a histogram of the TTTR data's micro times.
histogram | Pointer to which the histogram will be written (memory is allocated by the method). |
n_histogram | Pointer to the number of points in the histogram. |
time | Pointer to the time axis of the histogram (memory is allocated by the method). |
n_time | Pointer to the number of points in the time axis. |
micro_time_coarsening | A factor by which the micro times in the TTTR object are divided (default value is 1). |
size_t TTTR::get_n_events | ( | ) |
size_t TTTR::get_n_valid_events | ( | ) |
unsigned int TTTR::get_number_of_micro_time_channels | ( | ) |
Returns the number of micro time channels that fit between two macro time clocks.
This function calculates and returns the maximum valid number of micro time channels that fit between two macro time clocks.
|
static |
Determines the number of records in a TTTR file (not for use with HDF5).
Calculates the number of records in the file based on the file size. If the offset is passed, the number of records is calculated using the file size, offset, and bytes_per_record. If the offset is not specified, the current location of the file pointer is used. If bytes_per_record is not specified, the attribute value bytes_per_record of the class instance is used.
fp | The file pointer to the TTTR file. |
offset | The offset for calculating the number of records. |
bytes_per_record | The number of bytes per record. |
|
inline |
Returns time windows (tw), i.e., the start and the stop indices for a minimum tw size, a minimum number of photons in a tw.
output | [out] Array containing the interleaved start and stop indices of the tws in the TTTR object. |
n_output | [out] Length of the output array |
minimum_window_length | [in] Minimum length of a tw (mandatory). |
maximum_window_length | [in] Maximum length of a tw (optional). |
minimum_number_of_photons_in_time_window | [in] Minimum number of photons a selected tw contains (optional) |
maximum_number_of_photons_in_time_window | [in] Maximum number of photons a selected tw contains (optional) |
macro_time_calibration | [in] Macro time calibration in units of the macro time resolution. If negative, the macro time resolution from the TTTR header is used. |
invert | [in] If set to true, the selection criteria are inverted. |
void TTTR::get_routing_channel | ( | signed char ** | output, |
int * | n_output ) |
Returns an array containing the routing channel numbers of the valid TTTR events.
The routing channel numbers are stored in the output array, and the number of elements in the array is returned through the n_output parameter.
output | Pointer to the array to store the routing channel numbers. |
n_output | Pointer to the number of elements in the output array. |
void TTTR::get_selection_by_channel | ( | int ** | output, |
int * | n_output, | ||
signed char * | input, | ||
int | n_input ) |
Get events indices by the routing channel number.
This method retrieves an array containing the event/ photon indices of events with routing channel numbers found in the selection input array.
output | [out] Indices of the selected events |
n_output | [out] Number of selected events |
input | [in] Routing channel numbers for selecting events |
n_input | [in] Number of routing channels for selection |
void TTTR::get_selection_by_count_rate | ( | int ** | output, |
int * | n_output, | ||
double | time_window, | ||
int | n_ph_max, | ||
bool | invert = false, | ||
bool | make_mask = false ) |
Get indices where the count rate is below a specified maximum.
This method returns an array of indices where the count rate, calculated within a sliding time window, is below a specified maximum.
output | [out] Array containing the selected indices |
n_output | [out] Number of elements in the output array |
time_window | [in] Length of the time window in milliseconds |
n_ph_max | [in] Maximum number of photons within a time window |
invert | [in] If set to true, the selection criteria are inverted |
make_mask | [in] If set to true, the output array will be a boolean mask |
void TTTR::get_time_window_ranges | ( | int ** | output, |
int * | n_output, | ||
double | minimum_window_length, | ||
int | minimum_number_of_photons_in_time_window, | ||
int | maximum_number_of_photons_in_time_window = -1, | ||
double | maximum_window_length = -1.0, | ||
double | macro_time_calibration = -1, | ||
bool | invert = false ) |
Get time windows (tw) based on specified criteria.
Returns time windows (tw), i.e., the start and stop indices for a minimum tw size, a minimum number of photons in a tw.
output[out] | Array containing the interleaved start and stop indices of the tws in the TTTR object. |
n_output[out] | Length of the output array |
minimum_window_length[in] | Minimum length of a tw in units of ms (mandatory). |
minimum_number_of_photons_in_time_window[in] | Minimum number of photons a selected tw contains (optional) in units of seconds |
maximum_number_of_photons_in_time_window[in] | Maximum number of photons a selected tw contains (optional) |
maximum_window_length[in] | Maximum length of a tw (optional). |
macro_time_calibration[in] | Macro time calibration in units of seconds. If negative, the macro time resolution from the header is used. |
invert[in] | If set to true, the selection criteria are inverted. |
|
inline |
Get a TTTR object based on a selection by routing channel numbers.
This method creates and returns a shared pointer to a TTTR object that contains only the events with routing channel numbers specified in the input array.
input | [in] Routing channel numbers for selecting events |
n_input | [in] Number of routing channels for selection |
|
inline |
Get a TTTR object filtered by count rate criteria.
This method returns a TTTR object filtered based on count rate criteria.
time_window | [in] Length of the time window in milliseconds |
n_ph_max | [in] Maximum number of photons within a time window |
invert | [in] If set to true, the count rate criteria are inverted |
make_mask | [in] If set to true, the output array will be a boolean mask |
|
inline |
Get a pointer to a TTTR object that is based on a selection on the current TTTR object. A selection is an array of indices of the TTTR events.
selection | Array of indices of TTTR events. |
n_selection | Number of elements in the selection array. |
|
inline |
void TTTR::get_used_routing_channels | ( | signed char ** | output, |
int * | n_output ) |
Retrieves the used routing channel numbers from the TTTR data.
This function populates the provided output array with the routing channel numbers that are used in the TTTR file. The number of elements in the output array is stored in the n_output parameter.
output | Pointer to the output array to be populated. |
n_output | Pointer to the number of elements in the output array. |
|
inline |
Computes the mean lifetime by moments of decay and instrument response.
tttr_irf | TTTR object used as IRF. |
m0_irf | Counts in the IRF (used if no TTTR object for IRF provided). |
m1_irf | First moment of the IRF (used if no TTTR object for IRF provided). |
tttr_indices | Optional indices for selecting a subset of the TTTR. |
dt | Time resolution of the micro time. If not provided, extracted from the header (slow). |
min_ph | Minimum number of photons. If fewer photons are in the dataset, returns -1 as computed lifetime. |
int TTTR::read_file | ( | const char * | fn = nullptr, |
int | container_type = -1 ) |
Reads TTTR data from a file into the TTTR object.
This function reads TTTR data from the specified file into the TTTR object. If the filename is not provided (default is nullptr), the filename attribute of the TTTR object is used. The container_type parameter specifies the type of container used in the file.
fn | The filename to read. If nullptr (default), the TTTR object's filename is used. |
container_type | The container type. |
std::shared_ptr< TTTR > TTTR::select | ( | int * | selection, |
int | n_selection ) |
Creates a new TTTR object by selecting specific events based on the provided indices.
This function creates a new TTTR (Time-Tagged Time-Resolved) object by selecting specific events from the current TTTR object based on the provided indices.
selection | Pointer to an array containing the indices of selected events. |
n_selection | Number of elements in the selection array. |
void TTTR::set_header | ( | TTTRHeader * | v | ) |
Set the header for the TTTR object.
v | Pointer to the TTTRHeader object containing the header information. |
void TTTR::shift_macro_time | ( | int | shift | ) |
Shifts the macro time by adding an integer value to each macro time entry.
shift | The integer value added to each macro time entry. |
|
inline |
Returns the number of valid events in the TTTR data.
This function is a wrapper for the get_n_valid_events() method and returns the total number of valid events in the TTTR data.
bool TTTR::write | ( | std::string | filename, |
TTTRHeader * | header = nullptr ) |
Writes the contents of an opened TTTR file to a new TTTR file.
filename | The filename for the new TTTR file. |
header | Optional TTTRHeader to be written. If set to nullptr, no header is written (default is nullptr). |
void TTTR::write_header | ( | std::string & | fn, |
TTTRHeader * | header = nullptr ) |
Writes the header information to a TTTR file.
fn | The filename to write the header to. |
header | Pointer to the TTTRHeader object containing header information. |
void TTTR::write_hht3v2_events | ( | FILE * | fp, |
TTTR * | tttr ) |
void TTTR::write_spc132_events | ( | FILE * | fp, |
TTTR * | tttr ) |
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |
A routing channel is a numeric identifier associated with each photon in the time-tagged time-resolved (TTTR) data. It signifies the path or channel through which the photon is detected or routed.