matchms.filtering.filter_utils.derive_precursor_mz_and_parent_mass module¶
- matchms.filtering.filter_utils.derive_precursor_mz_and_parent_mass.derive_parent_mass_from_precursor_mz(spectrum: Spectrum, estimate_from_adduct: bool) float | None [source]¶
Use the precursor mz, charge and adduct information to compute the mass of the case compound.
- Args:
spectrum (SpectrumType): Spectrum with metadata. estimate_from_adduct (bool): Whether to include adduct parsing or not.
- Returns:
float: Parent compound neutral mass.