Skip to content

read_sdss_spectrum

Read an SDSS-format spectrum (spec-*.fits) into ctx.spectrum.

Category Input / output
Backend astropy - wraps the domain-standard astropy implementation
Version 1.1.0
Reads -
Writes spectrum

Reading loglam-based spectra is the one big gap of the generic FITS reader — this algorithm closes it. Compatible with SDSS DR9 through the current DR (the COADD HDU layout has been stable since DR9).

Parameters

Parameter Default Required Description
path None yes Local path or http(s) URL of an SDSS spec-*.fits file.

Use it

from spectro_kernel import run_algorithm

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

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

References

  • York et al. 2000, AJ, 120, 1579 — Sloan Digital Sky Survey overview.
  • Smee et al. 2013, AJ, 146, 32 — SDSS BOSS spectrograph and data format.
  • Bolton et al. 2012, AJ, 144, 144 — DR9 spectroscopic data release documenting the spec-*.fits layout.
  • read_ascii_spectrum - Read a 1D spectrum from a two- or three-column text file.
  • read_echelle_fits - Read a multi-order échelle FITS file into ctx.spectra.
  • read_fits - Read a 1D spectrum from a FITS file (local path or http(s) URL).
  • read_votable_spectrum - Read a 1D spectrum from a VOTable file (the IVOA Virtual Observatory format).