IMP logo
IMP Reference Guide  2.22.0
The Integrative Modeling Platform
DecayPattern.h
Go to the documentation of this file.
1 /**
2  * \file IMP/bff/DecayPattern.h
3  * \brief Simple Accessible Volume decorator.
4  *
5  * \authors Thomas-Otavio Peulen
6  * Copyright 2007-2023 IMP Inventors. All rights reserved.
7  */
8 
9 #ifndef IMPBFF_DECAYPATTERN_H
10 #define IMPBFF_DECAYPATTERN_H
11 
12 #include <IMP/bff/bff_config.h>
13 #include <iostream>
14 #include <algorithm>
15 #include <IMP/bff/DecayModifier.h>
16 
17 IMPBFF_BEGIN_NAMESPACE
18 
19 /**
20  * @class DecayPattern
21  * @brief The DecayPattern class represents a decay pattern with a constant offset and a background pattern.
22  *
23  * The DecayPattern class is a subclass of DecayModifier and provides functionality to add a background pattern to a decay curve.
24  * It allows setting and retrieving the constant offset and the fraction of the background pattern.
25  */
26 class IMPBFFEXPORT DecayPattern: public DecayModifier{
27 private:
28  /// The constant offset in the model
29  double constant_offset = 0.0;
30 
31  /// Fraction (area) of background pattern
32  double pattern_fraction = 0.0;
33 
34 public:
35  /**
36  * @brief Get the fraction (area) of the background pattern.
37  * @return The fraction (area) of the background pattern.
38  */
39  double get_pattern_fraction() const;
40 
41  /**
42  * @brief Set the fraction (area) of the background pattern.
43  * @param v The fraction (area) of the background pattern to set.
44  */
45  void set_pattern_fraction(double v);
46 
47  /**
48  * @brief Set the background pattern.
49  * @param v The background pattern to set.
50  */
51  void set_pattern(DecayCurve* v);
52 
53  /**
54  * @brief Get the background pattern.
55  * @return The background pattern.
56  */
57  DecayCurve* get_pattern();
58 
59  /**
60  * @brief Set the constant offset in the model.
61  * @param v The constant offset to set.
62  */
63  void set_constant_offset(double v);
64 
65  /**
66  * @brief Get the constant offset in the model.
67  * @return The constant offset in the model.
68  */
69  double get_constant_offset() const;
70 
71  /**
72  * @brief Add the background pattern to the given decay curve.
73  * @param out The decay curve to add the background pattern to.
74  */
75  void add(DecayCurve* out) override;
76 
77  /**
78  * @brief Constructor for the DecayPattern class.
79  * @param constant_offset The constant offset in the model (default: 0.0).
80  * @param pattern The background pattern (default: nullptr).
81  * @param pattern_fraction The fraction (area) of the background pattern (default: 0.0).
82  * @param start The start index of the decay curve (default: 0).
83  * @param stop The stop index of the decay curve (default: -1).
84  * @param active The flag indicating if the DecayPattern is active (default: true).
85  */
86  explicit DecayPattern(
87  double constant_offset = 0.0,
88  DecayCurve* pattern = nullptr,
89  double pattern_fraction = 0.0,
90  int start = 0,
91  int stop = -1,
92  bool active = true
93  );
94 };
95 
97 
98 IMPBFF_END_NAMESPACE
99 
100 #endif //IMPBFF_DECAYPATTERN_H
Simple Accessible Volume decorator.
A decorator that modifies a DecayCurve within a specified range.
Definition: DecayModifier.h:29
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.
Definition: DecayCurve.h:38
virtual void add(DecayCurve *out)=0
The DecayPattern class represents a decay pattern with a constant offset and a background pattern...
Definition: DecayPattern.h:26