31#include "../../exception/exceptionoutofrange.h"
37std::map<QThread *, TimsDataFastMap>
49 it.first->second.mapTofIndexIntensity.resize(500000);
51 return it.first->second;
70 map_element.
count = intensity;
75 map_element.
count += intensity;
78 return map_element.
count;
80 catch(std::out_of_range &error)
83 QObject::tr(
"out of range exception for tof index %1 ").arg(key));
93 return map_element.
count;
99 std::vector<std::pair<quint32, std::size_t>> temp_vector;
102 temp_vector.push_back({tof_index,
readIntensity(tof_index)});
107 for(
auto &pair_tof_intensity : temp_vector)
110 quint32 mzkey = (pair_tof_intensity.first / mzindex_merge_window);
111 mzkey = (mzkey * mzindex_merge_window) + (mzindex_merge_window / 2);
120 qDebug() <<
"tofIndexList.size()=" <<
tofIndexList.size();
124 std::sort(tof_index_list_tmp.begin(), tof_index_list_tmp.end());
128 quint32 previous_tof_index = tof_index_list_tmp[0];
129 std::size_t previous_intensity =
readIntensity(previous_tof_index);
130 for(std::size_t i = 1; i < tof_index_list_tmp.size(); i++)
132 quint32 tof_index = tof_index_list_tmp[i];
133 if(previous_tof_index == tof_index - 1)
136 if(previous_intensity > intensity)
140 previous_intensity + intensity);
141 previous_intensity = 0;
142 previous_tof_index = tof_index;
147 previous_intensity += intensity;
148 previous_tof_index = tof_index;
154 if(previous_intensity > 0)
159 previous_tof_index = tof_index;
165 if(previous_intensity > 0)
172 qDebug() <<
"tofIndexList.size()=" <<
tofIndexList.size();
181 for(quint32 tof_index : tof_index_list_tmp)
197const std::vector<quint32> &
std::size_t accumulateIntensity(quint32 tofIndex, std::size_t intensity)
accumulates intesity for the given tof index
void removeArtefactualSpike()
const std::vector< quint32 > & getTofIndexList() const
void builtInCentroid()
simple filter to agregate counts on neigbhor mobility slots (+1)
std::size_t readIntensity(quint32)
reads intensity for a tof_index
std::vector< quint32 > tofIndexList
void downsizeMzRawMap(std::size_t mzindex_merge_window)
downsize mz resolution to lower the number of real mz computations
static TimsDataFastMap & getTimsDataFastMapInstance()
static std::map< QThread *, TimsDataFastMap > m_preAllocatedFastMapPerThread
std::vector< TimsDataFastMapElement > mapTofIndexIntensity
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
replacement fot std::map dedicated to tims data for fast computations