Skip to content

export_hdf5

Export ctx.spectrum to an HDF5 file.

Category Export
Backend numpy - implemented here on top of numpy primitives
Version 1.0.1
Reads ctx.spectrum (a Spectrum1D)
Writes exports.hdf5

Parameters

Parameter Default Required Description
path None - Destination file path; null keeps the result in memory only.

Use it

from spectro_kernel import run_algorithm

output = run_algorithm("export_hdf5", ctx, {
    "path": None
})
spectro run export_hdf5 --input spectrum.fits \
  --param path=none
{
  "tool": "export_hdf5",
  "arguments": {
    "session_id": "<session_id>",
    "params": {
      "path": null
    }
  }
}

Every algorithm is an MCP tool of the same name; describe_algorithm returns this page's metadata as JSON.

References

  • HDF5 — The HDF Group
  • h5py — https://www.h5py.org/
  • export_csv - Export ctx.spectrum to a CSV file.
  • export_fits - Export ctx.spectrum to a FITS file.
  • export_fits_bess - Export ctx.spectrum as a BeSS / ARAS-compliant FITS image.
  • export_votable - Export ctx.spectrum to a VOTable file (IVOA exchange format).