sgibb / MALDIquant

Quantitative Analysis of Mass Spectrometry Data
https://strimmerlab.github.io/software/maldiquant/
60 stars 25 forks source link

Avoid division by zero in `calibrateIntensity` #51

Closed sgibb closed 9 years ago

sgibb commented 9 years ago

Currently calibrateIntensity can completely destroy spectra by accepting a scaling factor that equals zero. That results in an empty spectrum (in fact all intensities are Inf and isEmpty returns TRUE). This should not happen and the user should be informed by a warning.