spectrochempy.PeakFindingResult๏ƒ

class PeakFindingResult(peaks, properties=None, *, sample_index=None, sample_position=None, sample_height=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

sample_index

sample_position

sample_height

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๏ƒ
sample_index๏ƒ
sample_position๏ƒ
sample_height๏ƒ
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), refined position and height, 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