tttrlib
A library for time-tagged time resolved data
Loading...
Searching...
No Matches
TTTRMask.h
Go to the documentation of this file.
1#ifndef TTTRLIB_MASKEDTTTR_H
2#define TTTRLIB_MASKEDTTTR_H
3
4#include "TTTR.h"
5#include <vector>
6
7class TTTR;
8
9class TTTRMask{
10
11 friend class TTTR;
12
13private:
14
15 std::vector<bool> masked = {};
16
17public:
18
19 ~TTTRMask() = default;
20
21 TTTRMask() = default;
22
23 TTTRMask(TTTR* data);
24
25 int size(){
26 return masked.size();
27 }
28
29 void flip() {
30 masked.flip();
31 }
32
33 void set_mask(std::vector<bool> mask){
34 masked = mask;
35 }
36
37 std::vector<bool>& get_mask(){
38 return masked;
39 }
40
41 void set_tttr(TTTR* tttr);
42
56 TTTR* tttr,
57 signed char *routing_channels,
58 int n_routing_channels,
59 bool mask = false
60 );
61
69 void select_count_rate(TTTR* tttr, double time_window, int n_ph_max, bool invert);
70
78 std::vector<std::pair<int,int>> micro_time_ranges =
79 std::vector<std::pair<int,int>>()
80 );
81
88 std::vector<int> get_indices(bool selected=true);
89
90 std::vector<int> get_selected_ranges();
91
92};
93
94
95#endif //TTTRLIB_MASKEDTTTR_H
Time-Tagged Time-Resolved (TTTR) data class.
Definition TTTR.h:195
Definition TTTRMask.h:9
std::vector< int > get_selected_ranges()
std::vector< bool > & get_mask()
Definition TTTRMask.h:37
void select_microtime_ranges(TTTR *tttr, std::vector< std::pair< int, int > > micro_time_ranges=std::vector< std::pair< int, int > >())
int size()
Definition TTTRMask.h:25
TTTRMask()=default
void flip()
Definition TTTRMask.h:29
std::vector< int > get_indices(bool selected=true)
void select_count_rate(TTTR *tttr, double time_window, int n_ph_max, bool invert)
~TTTRMask()=default
void set_tttr(TTTR *tttr)
TTTRMask(TTTR *data)
void select_channels(TTTR *tttr, signed char *routing_channels, int n_routing_channels, bool mask=false)
Selects a subset of indices by a list of routing channel numbers.
void set_mask(std::vector< bool > mask)
Definition TTTRMask.h:33