MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / addMS1Precursor

Function addMS1Precursor

tools/scripts/create_im_with_swathIm.py:95–102  ·  view source on GitHub ↗
(sp, fda, mz, im_idx, base_intensity, im_offset_idx=2, nr_peaks=10)

Source from the content-addressed store, hash-verified

93# im_offset_idx = deviation in ion mobility (each side) in idx units
94# nr_peaks = number of peaks to create
95def addMS1Precursor(sp, fda, mz, im_idx, base_intensity, im_offset_idx=2, nr_peaks=10):
96 for i in range(nr_peaks):
97 p = Peak1D()
98 p.setMZ(mz)
99 p.setIntensity(base_intensity+ (i-5))
100 sp.push_back(p)
101
102 fda.push_back( (im_idx - im_offset_idx + i*im_offset_idx)/500)
103
104
105########### 1. Create MS1 spectra #####################

Callers 1

Calls 3

Peak1DFunction · 0.50
setMZMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected