FITS Astronomy Table & Image Reader

tools/fits-astronomyFormat Readers

Read bounded pixel windows from astronomical FITS images into SQL and Parquet.

Reads .fits image arrays from NASA, ESA, and ESO archives using scientific.fits@1.0.0. Extracts exact band_id and native x, y, width, height pixel windows into typed SQL and Parquet tables.

Use in chatRead band_id SCI over window x=120, y=240, width=64, height=64 from this .fits file using scientific.fits@1.0.0, summarize flux stats in DuckDB SQL, and publish as Parquet.

What FITS Astronomy Table & Image Reader does

FITS Astronomy Table & Image Reader pulls pixel arrays from observatory FITS files cleanly using astropy without custom scripts. Recipes specify band_id and an exact native image window (x, y, width, height) so image cutouts become structured pixel rows.

Extracted pixel tables run through DuckDB SQL for background subtraction or regional stats before serving. Researchers and agents query FITS outputs via SQL, Parquet/CSV/JSON downloads, REST APIs, and MCP.

Input & output example

Extracts bounded native pixel windows from FITS bands into SQL rows.

FITS image HDU window

file: jwst-cutout.fits | band_id: 'SCI'
window: x=120, y=240, width=64, height=64

Extracted pixel rows

band_idxyflux_value
SCI12024014.82
SCI12124015.19

How it works

  1. 1

    Point to an HTTPS FITS image file

    Link the .fits archive URL from NASA MAST, ESA, or ESO with application/fits or octet-stream framing.

  2. 2

    Pin band_id and pixel window in scientific.fits

    Set band_id and exact native x, y, width, and height bounds in scientific.fits@1.0.0.

  3. 3

    Aggregate pixels and serve tables

    Compute flux summaries or background stats in DuckDB SQL and publish via Parquet export, REST API, and MCP.

Try with an agent

Pre-loads FITS Astronomy in chat

Extract a FITS cutout window into a queryable table

Read band_id SCI over window x=120, y=240, width=64, height=64 from this .fits file using scientific.fits@1.0.0, summarize flux stats in DuckDB SQL, and publish as Parquet.

Compare pixel regions across telescope filters

Pull matched pixel windows from two FITS exposures with scientific.fits@1.0.0 and join pixel coordinates in DuckDB SQL.

Common use cases

  • Extracting bounded astronomical image cutouts from NASA, ESA, and ESO FITS files
  • Running SQL photometry and pixel-level statistics over telescope exposures
  • Joining image pixel measurements across bands in DuckDB SQL
  • Serving clean Parquet snapshots and REST APIs over observatory cutouts

Details

Identifier
fits-astronomy
Inputs
.fits (application/fits) · Image HDU windows
Outputs
Typed pixel rows · Parquet & REST API
Dataset delivery
Parquet · CSV · JSON · SQL · REST API · MCP

Frequently asked questions

What parameters does scientific.fits@1.0.0 require?

Specify band_id and an exact native pixel window (x, y, width, height) in reader decode_options.

Which library powers scientific.fits@1.0.0?

The worker uses astropy to decode pinned FITS bands safely within configured size and window limits.

Can I query extracted FITS pixel rows via DuckDB SQL and Parquet?

Yes. Extracted FITS rows become standard typed Parquet and SQL tables with REST API and MCP access.

Related tools