# Astro Image Stacker (align & stack) > Calibrate, align and stack astro frames with sigma clipping; download a 32-bit FITS. Upload a ZIP of 2–16 light frames (FITS, PNG, TIFF or JPEG, up to 1 megapixel each), optionally with darks/, flats/ and bias/ folders. The stacker builds calibration masters, detects stars, aligns frames by triangle matching, combines them with mean, median, kappa-sigma or winsorized rejection and returns a linear 32-bit FITS, a stretched 16-bit PNG and a registration report. Lumina Astro Lab runs the same pipeline on your device for larger sessions. Part of usefulweb.site (https://usefulweb.site/). Part of [Lumina](https://lumina.usefulweb.site/) (ownerApp: lumina). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://luminaimagestacker.usefulweb.site/ (interactive tool at https://luminaimagestacker.usefulweb.site/tool) - JSON API: POST https://luminaimagestacker.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://luminaimagestacker.usefulweb.site/api/v1/tool) - OpenAPI: https://luminaimagestacker.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://luminaimagestacker.usefulweb.site/mcp - tool `lumina_image_stacker` ## Inputs - frames (file, required): ZIP of frames (lights; optional darks/, flats/, bias/ folders) - Files inside darks/, flats/ or bias/ folders (or FITS IMAGETYP DARK, FLAT, BIAS) are used for calibration; everything else is a light frame. - method (select): Stacking method - kappa (number): Rejection kappa (σ) - register (boolean): Align frames on their stars - model (select): Transform - interpolation (select): Resampling - weights (select): Frame weights - gradient (integer): Background gradient removal (polynomial degree, 0 = off) - bayer (select): Bayer pattern of raw one-plane data - stretch (select): Preview stretch ## Method - Calibration: bias, dark and flat frames are combined per pixel with a median. The master flat minus the master bias is divided by its median; each light becomes (light − master dark) ÷ normalised flat, or light − master bias without darks. Darks are not scaled, so they must match the light exposure. Raw one-plane frames with a Bayer pattern are debayered (bilinear) after calibration. - Registration: stars are detected as in the star detector. Triangles of the 20 brightest stars are compared by their side ratios; a seeded RANSAC search fits a similarity transform to each matching triangle and keeps the one most stars agree with (within 2.5 pixels); least squares on mutual nearest neighbours refines it. The reference is the frame with the most stars. Frames are resampled bicubically or bilinearly; pixels outside a frame are left empty and do not count. - Stacking: frames get an additive background normalisation to the reference. Kappa-sigma rejects samples farther than κ standard deviations from the per-pixel median; winsorized clipping first winsorizes at 1.5 σ to estimate σ robustly. The noise reduction compares the background noise of the registered frames with the stack; √N is the ideal for N frames with independent noise. - Outputs: a linear 32-bit floating-point FITS (unstretched, for further processing) and a 16-bit PNG with the selected display stretch. Limits: 16 frames, 1 megapixel per frame, 12 million light samples.