"""Extract chromatograms and integrate them with a simple peak-shape model."""

from pathlib import Path

import emzed

peaks = emzed.io.load_table(Path("data") / "peaks.table")
chromatograms = emzed.extract_chromatograms(peaks)

integrated = emzed.quantification.integrate_chromatograms(
    chromatograms,
    "linear",
    show_progress=False,
)

print("columns:")
for name in integrated.col_names:
    print(f"  - {name}")
print()

# Format None makes these columns invisible in printed tables and
# emzed_gui inspectors; data is kept and formats can be changed back later.
integrated.set_col_format("peakmap", None)
integrated.set_col_format("chromatogram", None)
integrated.set_col_format("model_chromatogram", None)
print(integrated)
