50 {
51
54
55
56 const int MS2_INDEX_0 = 1;
57 const int MS2_INDEX_1 = 3;
58
60
62 SpectrumPtr s21 = centroidedPtr->spectrum(MS2_INDEX_1,
true);
63
64
65 s21->binaryDataArrayPtrs.clear();
69
70 newMzs = vector<double>({ 0.0, 2.0, 2.000001, 3.999999, 4.0, 4.000001, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0 });
71 for (
size_t mz = 0;
mz < newMzs.
size(); ++
mz)
72 {
74 }
75
76 vector<double> s21ExpectedIntensities = { 1.0, 2.0, 3.0 };
77 while (s21ExpectedIntensities.size() < s20->getIntensityArray()->data.size())
78 {
79 s21ExpectedIntensities.push_back(1.0);
80 }
81
82
85
86
88
89
91 int numSpectra = 2;
92 signal.reset(
new MatrixType(numSpectra, mzsToDemux->data.size()));
93
94
95 peakExtractor(s20, *signal, 0);
96 peakExtractor(s21, *signal, 1);
97
98
101 for (size_t i = 0; i < baseIntensities->data.size(); ++i)
102 {
104 }
105
106
107 for (size_t i = 0; i < s21ExpectedIntensities.size(); ++i)
108 {
110 }
111
112
115
116
117 signal.reset(
new MatrixType(numSpectra, s21->getMZArray()->data.size()));
118 binExamplePeakExtractor(s21, *signal, 0);
119 binExamplePeakExtractor(s20, *signal, 1);
120
121
122 for (size_t i = 0; i < s21->getIntensityArray()->data.size(); ++i)
123 {
124 unit_assert_equal(signal->row(0)[i], s21->getIntensityArray()->data.at(i), 0.0001);
125 }
126 }
A custom vector class that can store its contents in either a std::vector or a cli::array (when compi...
void push_back(const T &value)
MS_number_of_detector_counts
number of detector counts: The number of counted events observed in one or a group of elements of a d...
boost::shared_ptr< MatrixType > MatrixPtr
Matrix< DemuxScalar, Dynamic, Dynamic > MatrixType
double mz(double neutralMass, int protonDelta, int electronDelta=0, int neutronDelta=0)
PWIZ_API_DECL void initializeTiny(MSData &msd)
boost::shared_ptr< const msdata::Spectrum > Spectrum_const_ptr
boost::shared_ptr< BinaryDataArray > BinaryDataArrayPtr
boost::shared_ptr< Spectrum > SpectrumPtr
struct for expressing m/z tolerance in either amu or ppm
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here....
#define unit_assert_equal(x, y, epsilon)
#define unit_assert_operator_equal(expected, actual)