spectrochempy.PeakFindingResult

class PeakFindingResult(peaks, properties=None)[source]

Structured result returned by find_peaks.

Parameters:
  • peaks (NDDataset or None) – Dataset containing identified peak positions and heights.

  • 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.

Attributes Summary

peaks

properties

table

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
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, position, height, and 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