IMP.bff
Loading...
Searching...
No Matches
DecayScore.h
Go to the documentation of this file.
1
10#ifndef IMPBFF_DECAYSCORE_H
11#define IMPBFF_DECAYSCORE_H
12
13#include <IMP/bff/bff_config.h>
14
15#include <string>
16#include <iostream>
17
18#include <IMP/bff/internal/PhotonStatistics.h>
19#include <IMP/bff/DecayRange.h>
20#include <IMP/bff/DecayCurve.h>
21
22
23IMPBFF_BEGIN_NAMESPACE
24
34class IMPBFFEXPORT DecayScore : public DecayRange {
35
36private:
37 DecayCurve* _model = nullptr;
38 DecayCurve* _data = nullptr;
39 DecayCurve* _default_model = nullptr;
40 DecayCurve* _default_data = nullptr;
41 std::vector<double> _weighted_residuals;
42 std::string _score_type = "default";
43public:
64
65private:
69 void update_weighted_residuals();
70
71public:
76 std::vector<double>& get_weighted_residuals();
84 double get_score(int start = 0, int stop = -1, const char* score_type = nullptr);
89 void set_score_type(std::string v);
94 std::string get_score_type();
103 void set(
104 DecayCurve* model, DecayCurve* data,
105 std::string score_type = "poisson",
106 int start = 0, int stop = -1
107 );
113 double score(DecayCurve* model = nullptr);
114
124 DecayCurve* model = nullptr,
125 DecayCurve* data = nullptr,
126 std::string score_type = "poisson",
127 int start = 0,
128 int stop = -1
129 );
130
134 ~DecayScore() override {
135 delete _default_data;
136 delete _default_model;
137 }
138
139
140};
141
142IMPBFF_END_NAMESPACE
143
144
145#endif //IMPBFF_DECAYSCORE_H
Class for fluorescence decay curves.
Definition DecayCurve.h:38
Represents an inspected range of fluorescence decay.
Definition DecayRange.h:30
Class for scoring model fluorescence decay.
Definition DecayScore.h:34
void set(DecayCurve *model, DecayCurve *data, std::string score_type="poisson", int start=0, int stop=-1)
std::string get_score_type()
std::vector< double > & get_weighted_residuals()
DecayScore(DecayCurve *model=nullptr, DecayCurve *data=nullptr, std::string score_type="poisson", int start=0, int stop=-1)
Constructs a DecayScore object with the specified model, experimental data, score type,...
void set_score_type(std::string v)
double score(DecayCurve *model=nullptr)
void set_data(DecayCurve *v)
~DecayScore() override
Destroys the DecayScore object and frees any allocated memory.
Definition DecayScore.h:134
DecayCurve * get_model()
double get_score(int start=0, int stop=-1, const char *score_type=nullptr)
void set_model(DecayCurve *v)
DecayCurve * get_data()