Skip to content
Markus Noga edited this page Jun 25, 2020 · 4 revisions

Welcome to the nightlight wiki!

Processing Pipeline

Stacking

Stacking operates on a set of input files to produce a monochrome output stack for a single color channel. If there is enough main memory, it uses one large batch. Otherwise, the list of input files is split into random batches of the largest size that will fit into memory. Use -stMemory 8000 to e.g. assign 8000 MiB of memory for stacking.

The pipeline for stacking has four main phases: preprocessing, reference frame selection, postprocessing and stacking.

Preprocessing

Preprocessing operates on a batch of files in parallel. It encompasses:

  • Load file
  • Subtract master dark if given via -dark filename.fits
  • Divide by master flat if given via -flat filename.fits
  • Extract a single color channel, if this is a color filter array (CFA) File from a one-shot color (OSC) camera. Via ``-cfa RGGB -debayer R`, using the values for your camera and the desired channel
  • Cosmetic correction of bad pixels which are more than N standard deviations, also called sigma, away from the local median. Via -bpSigLow 3.0 -bpSigHigh 5.0. Pick the values which work for your camera.
  • Histogram peak location and scale detection (for normalization later).
  • Star detection and half-flux radius calculation (for image alignment later).
  • Background extraction. Currently experimental, via -backGrid 128 to specify the grid spacing.
  • You can optionally store the results of Preprocessing by providing a filename pattern like -pre pre%04d.fits, which will save to pre0000.fits, pre0001.fits and so on.

Reference frame selection

This is a global step. Nightlight picks the frame with the highest quotient of number of stars divided by average half-full radius (HFR).

Post-processing

Post-processing again works on batches of files in parallel.

  • Histogram normalization to the reference frame
  • Image alignment to the reference frame, also called registration. Result is two linear equations transforming image to reference frame coordinates.
  • Image projection to the reference frame. This uses the equation to project all pixels.
  • Results can again be stored to disk with a filename patter like -post post%04d.fits

Stacking

  • Choice of algorithm
  • Choice of weights.
  • Results are written to out.fits, or whatever is given via -out result.fits
Clone this wiki locally