spectrochempy.PeakFindingResult#
- class PeakFindingResult(peaks, properties=None, *, sample_index=None, sample_position=None, sample_height=None, analysis_dims=None, parameters=None)[source]#
Structured result returned by
find_peaks.- Parameters:
peaks (NDDataset, PeakTable or None) – Dataset containing identified peak positions and heights for 1D results; a
PeakTablefor 2D results.properties (dict or None) – Peak properties returned by
scipy.signal.find_peaks.
Notes
The object is intentionally dependency-light. It exposes Python-native table helpers and does not require pandas.
Text and HTML displays summarize the number of peaks and selected analysis dimensions, followed by a preview of
table.Attributes Summary
Return the rendered history for the result.
Return detached history entries for the result.
Return a dependency-light tabular view of the detected peaks.
Methods Summary
to_csv(path, *[, delimiter])Write peak information to a CSV file.
to_dict()Return peak information as a list of dictionaries.
Attributes Documentation
- peaks#
- properties#
- sample_index#
- sample_position#
- sample_height#
- analysis_dims#
- parameters#
- history#
Return the rendered history for the result.
- history_entries#
Return detached history entries for the result.
- table#
Return a dependency-light tabular view of the detected peaks.
Methods Documentation
- to_csv(path, *, delimiter=',')[source]#
Write peak information to a CSV file.
- Parameters:
path (str or pathlib.Path) – Destination path.
delimiter (str, default=’,’) – CSV delimiter.
- Returns:
pathlib.Path – The written path.
- to_dict()[source]#
Return peak information as a list of dictionaries.
Each dictionary contains
index(the row identifier), refinedpositionandheight, available discrete sample fields, plus any per-peak properties whose length matches the number of detected peaks. Values keep their native units when they are unit-bearing quantities.
Examples using spectrochempy.PeakFindingResult