IMP logo
IMP Reference Guide  develop.63b38c487d,2024/12/22
The Integrative Modeling Platform
DecayLinearization.h
Go to the documentation of this file.
1 /**
2  * \file IMP/bff/DecayLinearization.h
3  * \brief Decay modifier to add non-linearities
4  *
5  * This file contains the declaration of the DecayLinearization class, which is a
6  * subclass of DecayModifier. DecayLinearization applies a linearization to a
7  * DecayCurve object, which represents a decay model. It computes a linearization
8  * table and applies it to the input DecayCurve.
9  *
10  * \authors Thomas-Otavio Peulen
11  * Copyright 2007-2022 IMP Inventors. All rights reserved.
12  */
13 
14 #ifndef IMPBFF_DECAYLINEARIZATION_H
15 #define IMPBFF_DECAYLINEARIZATION_H
16 
17 #include <IMP/bff/bff_config.h>
18 #include <iostream> /* std::cerr */
19 #include <algorithm> /* std::min */
20 #include <vector>
21 #include <IMP/bff/DecayCurve.h>
22 #include <IMP/bff/DecayModifier.h>
23 
24 IMPBFF_BEGIN_NAMESPACE
25 
26 /**
27  * \class DecayLinearization
28  * \brief A decay modifier to apply linearization to a DecayCurve
29  *
30  * The DecayLinearization class is a subclass of DecayModifier. It takes a
31  * DecayCurve as input and computes a linearization table for the input curve.
32  * The linearization table is then applied to the input DecayCurve using the
33  * add() method.
34  *
35  * Typical applications of DecayLinearization include computing a perturbed
36  * fluorescence decay model.
37  */
38 class IMPBFFEXPORT DecayLinearization : public DecayModifier {
39 private:
40  DecayCurve linearization_table_; //!< The linearization table
41 
42 public:
43  /**
44  * Set the linearization table for the DecayLinearization object.
45  * \param v The linearization table
46  */
47  void set_linearization_table(DecayCurve* v);
48 
49  /**
50  * Get the linearization table of the DecayLinearization object.
51  * \return The linearization table
52  */
53  DecayCurve* get_linearization_table();
54 
55  /**
56  * Apply the linearization table to the input DecayCurve.
57  * \param out The output DecayCurve
58  */
59  void add(DecayCurve* out) override;
60 
61  /**
62  * Construct a DecayLinearization object.
63  * \param linearization_table The linearization table
64  * \param start The start index of the linearization window
65  * \param stop The stop index of the linearization window
66  * \param active Flag indicating if the DecayLinearization is active
67  * \param n_window The size of the linearization window
68  */
69  DecayLinearization(DecayCurve* linearization_table,
70  int start, int stop,
71  bool active = true,
72  int n_window = 5);
73 };
74 
76 
77 IMPBFF_END_NAMESPACE
78 
79 #endif // IMPBFF_DECAYLINEARIZATION_H
Simple Accessible Volume decorator.
A decorator that modifies a DecayCurve within a specified range.
Definition: DecayModifier.h:29
A decay modifier to apply linearization to a DecayCurve.
A more IMP-like version of the std::vector.
Definition: Vector.h:50
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Definition: value_macros.h:23
Class for fluorescence decay curves.
Class for fluorescence decay curves.
Definition: DecayCurve.h:38
virtual void add(DecayCurve *out)=0