AlanRace / SpectralAnalysis

Software for the analysis and interactive exploration of spectral imaging data
https://alanrace.github.io/SpectralAnalysis/
Apache License 2.0
29 stars 9 forks source link

Peak filtering by signal-to-noise #19

Closed adamjtaylor closed 4 years ago

adamjtaylor commented 4 years ago

Is your feature request related to a problem? Please describe. Currently, picked peaks can be filtered by a set peak number or a peak threshold. In both cases, peaks that are visibly noise can be picked and taken through to subsequent analysis.

Describe the solution you'd like Peak picking by a signal-to-noise ratio would allow for peaks to be filtered by a dynamic threshold ensuring that noise is not erroneously picked.

Describe alternatives you've considered As a first pass, the non-zero median can be used as a rough noise estimation. A peak threshold of 3 times the non zero median has proved useful in several DESI negative ion mode tissue imaging experiments from Q-ToF platforms.

Subsequently, more robust noise estimation metrics could be employed. Notably, noise varies across the mass range so a fixed noise threshold estimated from the whole mass range can miss good peaks in the low mass and pick noise in the high mass. Rolling window approaches may be considered,

Additional context I have a working example of thresholding on a multiple of the non-zero median of a spectrum that I can add a pull request for. image image