matchms.filtering.metadata_processing.correct_charge module¶
- matchms.filtering.metadata_processing.correct_charge.correct_charge(spectrum_in: Spectrum) Spectrum [source]¶
Correct charge values based on given ionmode.
For some spectrums, the charge value is either undefined or inconsistent with its ionmode, which is corrected by this filter.
- Parameters:
spectrum_in – Input spectrum.