Skip to content

export_fits

Export ctx.spectrum to a FITS file.

Category Export
Backend astropy - wraps the domain-standard astropy implementation
Version 1.0.0
Reads ctx.spectrum (a Spectrum1D)
Writes exports.fits

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_fits", ctx, {
    "path": None
})
spectro run export_fits --input spectrum.fits \
  --param path=none
{
  "tool": "export_fits",
  "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

  • astropy.io.fits
  • FITS Standard 4.0 — Pence et al. 2010, A&A 524, A42
  • export_csv - Export ctx.spectrum to a CSV file.
  • export_fits_bess - Export ctx.spectrum as a BeSS / ARAS-compliant FITS image.
  • export_hdf5 - Export ctx.spectrum to an HDF5 file.
  • export_votable - Export ctx.spectrum to a VOTable file (IVOA exchange format).