-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
Moreover, it seems useless, because the value is always false?
spectra-processing/src/xyObject/xyObjectBestPoints.ts
Lines 64 to 89 in 525db22
| let selected = points | |
| .filter((point) => point.x >= from && point.x <= to) | |
| .map((point) => { | |
| return { | |
| point, | |
| monoisotopic: false, | |
| }; | |
| }); | |
| selected = selected.sort((a, b) => { | |
| if (a.monoisotopic && !b.monoisotopic) return -1; | |
| if (b.monoisotopic && !a.monoisotopic) return 1; | |
| return b.point.y - a.point.y; | |
| }); | |
| const toReturn: PointWithClose[] = []; | |
| if (selected.length === 0) return []; | |
| const minY = selected[0].point.y * threshold; | |
| peakLoop: for (const item of selected) { | |
| if (item.point.y < minY) { | |
| if (item.monoisotopic) { | |
| continue; | |
| } else { | |
| break; | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
No labels