modifinder.Spectrum.update
- Spectrum.update(peaks=None, peaks_json=None, mz=None, intensity=None, precursor_mz=None, precursor_charge=None, _adduct=None, adduct=None, ms_level=None, instrument=None, ms_mass_analyzer=None, ms_dissociation_method=None, spectrum_id=None, peak_fragment_dict: dict | None = None, ignore_adduct_format=False, **kwargs)[source]
Update the Spectrum object with the given values.
- Parameters:
peaks (list) – A list of peaks in the form of [[mz1, intensity1], [mz2, intensity2], …].
peaks_json (str) – A json string of peaks.
mz (list) – A list of m/z values.
intensity (list) – A list of intensity values.
precursor_mz (float) – The precursor m/z value.
precursor_charge (int) – The precursor charge.
adduct (str) – The adduct.
ms_level (int) – The ms level.
instrument (str) – The instrument used.
ms_mass_analyzer (str) – The mass analyzer used.
ms_dissociation_method (str) – The dissociation method used.
spectrum_id (str) – The spectrum id.
keep_top_k (int) – If not None, only keep the top k peaks.
peak_fragment_dict (dict) – A dictionary mapping peaks to fragments
ignore_adduct_format (bool) – If True, if the adduct format is not recognized, it will not throw an error.
**kwargs – Additional keyword arguments.