Commit caaad18d authored by Yan's avatar Yan
Browse files

Speedup of timstof chromatogram routine

* thx to Michał Startek
parent 4ef7b63a
......@@ -14,7 +14,7 @@ from . import zcetools_help
from . import reactivitytools
__version__ = "0.0.41"
__version__ = "0.0.42"
__all__ = ['config', 'datatools', 'docks', 'drltools', 'datasets',
......
......@@ -157,10 +157,9 @@ class BrukerTimsDataset(Dataset):
def get_chromatograms(self):
logger.info("getting timsTOF chromatogram")
times = self.dataset.retention_times / 60
# devNote - summing is fast, asarray is fast, iterating is slow.
intensities = np.asarray([
np.sum(i['intensity']) for i in self.dataset.query_iter(
np.arange(self.dataset.max_frame)+1, columns=('intensity',))])
# Thx to Michał Startek, slight deviation, but much faster
intensities = (self.dataset.frames['SummedIntensities'] *
self.dataset.frames['AccumulationTime']) / 100.0
return [[times, intensities]]
def get_spectra(self, mint=None, maxt=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment