A class for scaling a DecayCurve by a constant factor and subtracting a constant background value.
More...
#include <IMP/bff/DecayScale.h>
A class for scaling a DecayCurve by a constant factor and subtracting a constant background value.
The DecayScale class is a subclass of DecayModifier and is used to scale a DecayCurve by a constant factor and subtract a constant background value. It provides methods to set and get the constant background value, as well as to set whether the curve should be blanked outside a specified range. The scaling and background subtraction are applied to the DecayCurve when the modify() method is called.
Definition at line 34 of file DecayScale.h.
|
| DecayScale (DecayCurve *data=nullptr, double constant_background=0.0, int start=0, int stop=-1, bool active=true, bool blank_outside=true) |
|
void | add (DecayCurve *decay) override |
|
bool | get_blank_outside () |
|
double | get_constant_background () const |
|
double | get_number_of_photons () |
|
void | set (DecayCurve *data=nullptr, double constant_background=0.0, int start=0, int stop=-1, bool active=true, bool blank_outside=true) |
|
void | set_blank_outside (double v) |
|
void | set_constant_background (double v) |
|
| DecayModifier (DecayCurve *data=nullptr, int start=0, int stop=-1, bool active=true) |
|
| ~DecayModifier () |
|
virtual DecayCurve * | get_data () |
|
bool | is_active () const |
|
void | resize (size_t n, double v=0.0) |
|
void | set (DecayCurve *data, int start=0, int stop=-1, bool active=true) |
|
void | set_active (bool v) |
|
virtual void | set_data (DecayCurve *v) |
|
| DecayRange (int start, int stop) |
| Constructor. More...
|
|
virtual | ~DecayRange ()=default |
| Destructor. More...
|
|
std::vector< int > | get_range (DecayCurve *d=nullptr) |
| Get the range as a vector of indices. More...
|
|
size_t | get_start (DecayCurve *d=nullptr) const |
| Get the start index of the decay range. More...
|
|
size_t | get_stop (DecayCurve *d=nullptr) const |
| Get the stop index of the decay range. More...
|
|
void | set (int start=0, int stop=-1) |
| Set the start and stop indices of the decay range. More...
|
|
void | set_range (std::vector< int > v) |
| Set the range using a vector of indices. More...
|
|
void | set_start (int v) |
| Set the start index of the decay range. More...
|
|
void | set_stop (int v) |
| Set the stop index of the decay range. More...
|
|
void | show (std::ostream &out=std::cout) const |
|
IMP::bff::DecayScale::DecayScale |
( |
DecayCurve * |
data = nullptr , |
|
|
double |
constant_background = 0.0 , |
|
|
int |
start = 0 , |
|
|
int |
stop = -1 , |
|
|
bool |
active = true , |
|
|
bool |
blank_outside = true |
|
) |
| |
Construct a DecayScale object with the specified parameters.
- Parameters
-
data | The DecayCurve to be scaled. |
constant_background | The constant background value to be subtracted. |
start | The start index of the range to be considered. |
stop | The stop index of the range to be considered. |
active | Flag indicating whether the DecayScale object is active. |
blank_outside | Flag indicating whether the curve should be blanked outside the specified range. |
void IMP::bff::DecayScale::add |
( |
DecayCurve * |
decay | ) |
|
|
overridevirtual |
bool IMP::bff::DecayScale::get_blank_outside |
( |
| ) |
|
Get whether the curve should be blanked outside a specified range.
- Returns
- Flag indicating whether the curve should be blanked outside a specified range.
double IMP::bff::DecayScale::get_constant_background |
( |
| ) |
const |
Get the constant background value.
- Returns
- The constant background value.
double IMP::bff::DecayScale::get_number_of_photons |
( |
| ) |
|
Get the number of photons in the data between the start and stop indices. If the model is scaled to the data, the number of photons is returned. Otherwise, the user-specified number of photons is returned.
- Returns
- The number of photons in the data.
void IMP::bff::DecayScale::set |
( |
DecayCurve * |
data = nullptr , |
|
|
double |
constant_background = 0.0 , |
|
|
int |
start = 0 , |
|
|
int |
stop = -1 , |
|
|
bool |
active = true , |
|
|
bool |
blank_outside = true |
|
) |
| |
Set the parameters of the DecayScale object.
- Parameters
-
data | The DecayCurve to be scaled. |
constant_background | The constant background value to be subtracted. |
start | The start index of the range to be considered. |
stop | The stop index of the range to be considered. |
active | Flag indicating whether the DecayScale object is active. |
blank_outside | Flag indicating whether the curve should be blanked outside the specified range. |
void IMP::bff::DecayScale::set_blank_outside |
( |
double |
v | ) |
|
Set whether the curve should be blanked outside a specified range.
- Parameters
-
v | Flag indicating whether the curve should be blanked outside a specified range. |
void IMP::bff::DecayScale::set_constant_background |
( |
double |
v | ) |
|
Set the constant background value.
- Parameters
-
v | The constant background value to be set. |
The documentation for this class was generated from the following file: