62 #ifndef OPENMS_SYSTEM_STOPWATCH_H
110 tolerance_mz_ = tolerance_mz;
111 param_.setValue(
"2d:tolerance_mz", tolerance_mz);
119 max_peak_distance_ = max_peak_distance;
120 param_.setValue(
"2d:max_peak_distance", max_peak_distance);
128 max_iteration_ = max_iteration;
129 param_.setValue(
"iterations", max_iteration);
137 penalties_ = penalties;
138 param_.setValue(
"penalties:position", penalties.
pos);
139 param_.setValue(
"penalties:height", penalties.
height);
140 param_.setValue(
"penalties:left_width", penalties.
lWidth);
141 param_.setValue(
"penalties:right_width", penalties.
rWidth);
162 PeakMap& ms_exp,
bool real2D =
true);
169 std::vector<std::pair<SignedSize, SignedSize> >
signal2D;
187 : m_inputs(dimensions), m_values(num_data_points), m_data(data) {}
231 std::vector<double>::iterator
searchInScan_(std::vector<double>::iterator scan_begin,
232 std::vector<double>::iterator scan_end,
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:72
Base::const_iterator const_iterator
Definition: MSExperiment.h:117
std::vector< SpectrumType >::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSExperiment.h:105
Definition: TwoDOptimization.h:181
int values() const
Definition: TwoDOptimization.h:184
int df(const Eigen::VectorXd &x, Eigen::MatrixXd &J)
const int m_inputs
Definition: TwoDOptimization.h:194
int operator()(const Eigen::VectorXd &x, Eigen::VectorXd &fvec)
const TwoDOptimization::Data * m_data
Definition: TwoDOptimization.h:195
TwoDOptFunctor(unsigned dimensions, unsigned num_data_points, const TwoDOptimization::Data *data)
Definition: TwoDOptimization.h:186
int inputs() const
Definition: TwoDOptimization.h:183
This class provides the two-dimensional optimization of the picked peak parameters.
Definition: TwoDOptimization.h:87
double getMZTolerance() const
Non-mutable access to the matching epsilon.
Definition: TwoDOptimization.h:106
std::multimap< double, IsotopeCluster >::iterator iso_map_iter
Definition: TwoDOptimization.h:170
std::vector< std::pair< SignedSize, SignedSize > > signal2D
Definition: TwoDOptimization.h:169
void getRegionEndpoints_(PeakMap &exp, InputSpectrumIterator &first, InputSpectrumIterator &last, Size iso_map_idx, double noise_level, TwoDOptimization::Data &d)
Get the indices of the first and last raw data point of this region.
OptimizationFunctions::PenaltyFactorsIntensity penalties_
Penalty factors for some parameters in the optimization.
Definition: TwoDOptimization.h:224
void setPenalties(OptimizationFunctions::PenaltyFactorsIntensity &penalties)
Mutable access to the minimal number of adjacent scans.
Definition: TwoDOptimization.h:135
PeakMap::ConstIterator raw_data_first
Definition: TwoDOptimization.h:174
std::map< Int, std::vector< PeakIndex > > matching_peaks
Definition: TwoDOptimization.h:172
PeakMap picked_peaks
Definition: TwoDOptimization.h:173
OptimizationFunctions::PenaltyFactorsIntensity penalties
Definition: TwoDOptimization.h:175
void findMatchingPeaks_(std::multimap< double, IsotopeCluster >::iterator &it, PeakMap &ms_exp)
Identify matching peak in a peak cluster.
std::map< Int, std::vector< PeakIndex > > matching_peaks_
Indices of peaks in the adjacent scans matching peaks in the scan with no. ref_scan.
Definition: TwoDOptimization.h:213
void optimizeRegions_(InputSpectrumIterator &first, InputSpectrumIterator &last, PeakMap &ms_exp)
TwoDOptimization()
Constructor.
void optimizeRegionsScanwise_(InputSpectrumIterator &first, InputSpectrumIterator &last, PeakMap &ms_exp)
bool real_2D_
Optimization considering all scans of a cluster or optimization of each scan separately.
Definition: TwoDOptimization.h:220
std::vector< double > positions
Definition: TwoDOptimization.h:176
MSExperiment::const_iterator InputSpectrumIterator
Definition: TwoDOptimization.h:90
double max_peak_distance_
upper bound for distance between two peaks belonging to the same region
Definition: TwoDOptimization.h:206
double tolerance_mz_
threshold for the difference in the peak position of two matching peaks
Definition: TwoDOptimization.h:209
UInt max_iteration_
Convergence Parameter: Maximal number of iterations.
Definition: TwoDOptimization.h:217
double getMaxPeakDistance() const
Non-mutable access to the maximal peak distance in a cluster.
Definition: TwoDOptimization.h:115
UInt getMaxIterations() const
Non-mutable access to the maximal number of iterations.
Definition: TwoDOptimization.h:124
Size total_nr_peaks
Definition: TwoDOptimization.h:171
std::vector< double >::iterator searchInScan_(std::vector< double >::iterator scan_begin, std::vector< double >::iterator scan_end, double current_mz)
std::multimap< double, IsotopeCluster > iso_map_
stores the retention time of each isotopic cluster
Definition: TwoDOptimization.h:200
void setMaxPeakDistance(double max_peak_distance)
Mutable access to the maximal peak distance in a cluster.
Definition: TwoDOptimization.h:117
TwoDOptimization(const TwoDOptimization &opt)
Copy constructor.
TwoDOptimization & operator=(const TwoDOptimization &opt)
Assignment operator.
void updateMembers_() override
update members method from DefaultParamHandler to update the members
std::multimap< double, IsotopeCluster >::const_iterator curr_region_
Pointer to the current region.
Definition: TwoDOptimization.h:203
void optimize(InputSpectrumIterator first, InputSpectrumIterator last, PeakMap &ms_exp, bool real2D=true)
Find two dimensional peak clusters and optimize their peak parameters.
void setMZTolerance(double tolerance_mz)
Mutable access to the matching epsilon.
Definition: TwoDOptimization.h:108
const OptimizationFunctions::PenaltyFactorsIntensity & getPenalties() const
Non-mutable access to the minimal number of adjacent scans.
Definition: TwoDOptimization.h:133
void setMaxIterations(UInt max_iteration)
Mutable access to the maximal number of iterations.
Definition: TwoDOptimization.h:126
~TwoDOptimization() override
Destructor.
Definition: TwoDOptimization.h:99
std::vector< double > signal
Definition: TwoDOptimization.h:177
Helper struct (contains the size of an area and a raw data container)
Definition: TwoDOptimization.h:168
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Definition: IsobaricIsotopeCorrector.h:43
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
Class for the penalty factors used during the optimization.
Definition: OptimizePeakDeconvolution.h:59
double height
Definition: OptimizePeakDeconvolution.h:76
double rWidth
Penalty factor for the peak shape's right width parameter.
Definition: OptimizePick.h:90
double pos
Penalty factor for the peak shape's position.
Definition: OptimizePick.h:86
double lWidth
Penalty factor for the peak shape's left width parameter.
Definition: OptimizePick.h:88