Commit 8b35b91c authored by Yan's avatar Yan
Browse files

Fix of DRL error in case of zero-intensity spectra

parent fbfb9e08
......@@ -62,8 +62,9 @@ def get_intensity(row, ptable, dtable, ds):
startm = floatize(ptable, row, 1)
endm = floatize(ptable, row, 2)
massargs = dt.argsubselect(ds['masses'], startm, endm)
nonzero_tic = list(map(lambda x: max(x, 1), ds['chrom_dat'][1]))
intensity = (np.sum(
ds['matrix'].T[massargs].T, axis=1)) / ds['chrom_dat'][1]
ds['matrix'].T[massargs].T, axis=1)) / nonzero_tic
return intensity
Supports Markdown
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