36 #ifndef OPENMS_SYSTEM_STOPWATCH_H
84 tolerance_mz_ = tolerance_mz;
85 param_.setValue(
"2d:tolerance_mz", tolerance_mz);
93 max_peak_distance_ = max_peak_distance;
94 param_.setValue(
"2d:max_peak_distance", max_peak_distance);
102 max_iteration_ = max_iteration;
103 param_.setValue(
"iterations", max_iteration);
111 penalties_ = penalties;
112 param_.setValue(
"penalties:position", penalties.
pos);
113 param_.setValue(
"penalties:height", penalties.
height);
114 param_.setValue(
"penalties:left_width", penalties.
lWidth);
115 param_.setValue(
"penalties:right_width", penalties.
rWidth);
136 PeakMap& ms_exp,
bool real2D =
true);
143 std::vector<std::pair<SignedSize, SignedSize> >
signal2D;
161 : m_inputs(dimensions), m_values(num_data_points), m_data(data) {}
205 std::vector<double>::iterator
searchInScan_(std::vector<double>::iterator scan_begin,
206 std::vector<double>::iterator scan_end,
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
Base::const_iterator const_iterator
Definition: MSExperiment.h:91
std::vector< SpectrumType >::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSExperiment.h:79
Definition: TwoDOptimization.h:155
int values() const
Definition: TwoDOptimization.h:158
int df(const Eigen::VectorXd &x, Eigen::MatrixXd &J)
const int m_inputs
Definition: TwoDOptimization.h:168
int operator()(const Eigen::VectorXd &x, Eigen::VectorXd &fvec)
const TwoDOptimization::Data * m_data
Definition: TwoDOptimization.h:169
TwoDOptFunctor(unsigned dimensions, unsigned num_data_points, const TwoDOptimization::Data *data)
Definition: TwoDOptimization.h:160
int inputs() const
Definition: TwoDOptimization.h:157
This class provides the two-dimensional optimization of the picked peak parameters.
Definition: TwoDOptimization.h:61
double getMZTolerance() const
Non-mutable access to the matching epsilon.
Definition: TwoDOptimization.h:80
std::multimap< double, IsotopeCluster >::iterator iso_map_iter
Definition: TwoDOptimization.h:144
std::vector< std::pair< SignedSize, SignedSize > > signal2D
Definition: TwoDOptimization.h:143
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:198
void setPenalties(OptimizationFunctions::PenaltyFactorsIntensity &penalties)
Mutable access to the minimal number of adjacent scans.
Definition: TwoDOptimization.h:109
PeakMap::ConstIterator raw_data_first
Definition: TwoDOptimization.h:148
std::map< Int, std::vector< PeakIndex > > matching_peaks
Definition: TwoDOptimization.h:146
PeakMap picked_peaks
Definition: TwoDOptimization.h:147
OptimizationFunctions::PenaltyFactorsIntensity penalties
Definition: TwoDOptimization.h:149
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:187
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:194
std::vector< double > positions
Definition: TwoDOptimization.h:150
MSExperiment::const_iterator InputSpectrumIterator
Definition: TwoDOptimization.h:64
double max_peak_distance_
upper bound for distance between two peaks belonging to the same region
Definition: TwoDOptimization.h:180
double tolerance_mz_
threshold for the difference in the peak position of two matching peaks
Definition: TwoDOptimization.h:183
UInt max_iteration_
Convergence Parameter: Maximal number of iterations.
Definition: TwoDOptimization.h:191
double getMaxPeakDistance() const
Non-mutable access to the maximal peak distance in a cluster.
Definition: TwoDOptimization.h:89
UInt getMaxIterations() const
Non-mutable access to the maximal number of iterations.
Definition: TwoDOptimization.h:98
Size total_nr_peaks
Definition: TwoDOptimization.h:145
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:174
void setMaxPeakDistance(double max_peak_distance)
Mutable access to the maximal peak distance in a cluster.
Definition: TwoDOptimization.h:91
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:177
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:82
const OptimizationFunctions::PenaltyFactorsIntensity & getPenalties() const
Non-mutable access to the minimal number of adjacent scans.
Definition: TwoDOptimization.h:107
void setMaxIterations(UInt max_iteration)
Mutable access to the maximal number of iterations.
Definition: TwoDOptimization.h:100
~TwoDOptimization() override
Destructor.
Definition: TwoDOptimization.h:73
std::vector< double > signal
Definition: TwoDOptimization.h:151
Helper struct (contains the size of an area and a raw data container)
Definition: TwoDOptimization.h:142
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
Definition: IsobaricIsotopeCorrector.h:17
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
Class for the penalty factors used during the optimization.
Definition: OptimizePeakDeconvolution.h:33
double height
Definition: OptimizePeakDeconvolution.h:50
double rWidth
Penalty factor for the peak shape's right width parameter.
Definition: OptimizePick.h:64
double pos
Penalty factor for the peak shape's position.
Definition: OptimizePick.h:60
double lWidth
Penalty factor for the peak shape's left width parameter.
Definition: OptimizePick.h:62