mertisreader v0.0.5
  • Home
  • Tutorials
  • API
  1. mertisreader

On this page

  • mertisreader
    • Installation
    • Quickstart
    • What You Can Do
    • Learn More
  • Report an issue

mertisreader

mertisreader

mertisreader reads ESA BepiColombo MERTIS data from plain Python. It loads instrument data packs, assembles frames and wavelength grids, exposes metadata, and validates PDS4 labels — without requiring the original notebook-based workflow.

Installation

Use a Python virtual environment or conda environment, then install the package:

pip install mertisreader

While the migration is in progress, an editable install from the repository is also supported:

python -m pip install -e .

Quickstart

import pathlib
import mertisreader as mr

input_path = pathlib.Path(
    "data/bcmer_tm_all_START-20200409T000000_END-20200410T000000_CRE-20240717T132010-ParamEventBootSciHK-short/cal"
)

reader = mr.MERTISDataPackReader(
    input_dir=input_path,
    output_dir="/tmp",
    log_level="INFO",
)

reader.data_collector()
reader.data_assembler()

See the Getting Started tutorial for a full, executable walkthrough including lazy loading.

What You Can Do

  • Read MERTIS data packs — MERTISDataPackReader collects, inspects, and assembles calibration and science data in a few calls.
  • Load large datasets lazily — LazyArray and LazyCSVLoader keep I/O deferred until data is explicitly materialized.
  • Validate PDS4 labels — validate_pds4_label and helpers extract and check metadata from PDS4 XML labels.
  • Work with frames directly — utilities for RAW axis-order normalization, frame dimensions, interpolation targets, and frame assembly.

Learn More

  1. Follow the Getting Started tutorial for a short guided walkthrough.
  2. Explore the other Tutorials: example workflow, core reader, lazy loading, frame utilities, and PDS4 validation.
  3. Open the API Reference for the generated function and class docs.
  4. Try the example notebook in examples/read_merstis_test.ipynb.
  • Report an issue