Dark Window

Your deep sky companion

Stretching your stacked image in Siril

A freshly stacked image looks almost black, and the picture is hiding in it. Stretching brings it out. This guide shows what the controls in Siril do, what happens when you go too far, and how many stretches to use, with a demo you can play with.

Why a stack looks black

Your camera records light in proportion to how much arrives. In a deep-sky image almost all the pixels are dim: the sky background and the faint nebula sit down near black, and only the stars are bright. The histogram shows this as one tall hump crammed against the left edge.

Stretching is a re-mapping of brightness. It spreads those crowded dark values apart and leaves the bright end mostly alone, so faint detail comes up to where your eyes can see it. It does not add any information. It only reveals what the stack already holds, which is why a clean, well-calibrated stack stretches so much better than a noisy one.

In Siril you will see the stack in a stretched display most of the time. That is a preview only. Until you apply a stretch tool, the data in the file is still linear.

Before you stretch

Some steps need linear data, so do them first. In Siril they are in the Image Processing menu.

Try it

// Try it: stretch a made-up stack

This is a pretend stacked image: a nebula, stars and a faint glow, still linear. Press a Watch button to see the sliders move the way they do in Siril’s Histogram Transformation window, or drag them yourself.

Pick a Watch button, or move the sliders below.
Stretches applied: 0
highlights 1.00 →00.35
Input: the image before the stretch you are setting up, zoomed to the left part of the scale as Siril lets you do. Red = shadows. Dashed = midtones (the input that becomes 50% gray). Yellow = highlights.
blackwhite
Output: what you get. The dotted lines mark 10% and 30%, a good range for the sky. Heights use a square-root scale so small features show.
Jump to:
Still too dark: the detail is there but not visible yet.
  • Sky level: 4%
  • Clipped to black: 0.0%
  • Newly burned to white: 0.0%

The image and its numbers are made up for this demo, and the sliders use the same midtone formula as Siril’s Histogram Transformation, so the shapes you see are realistic. Real data will differ in the details.

The stretch tools in Siril

Siril has four ways to stretch. They are all in the Image Processing menu, and they all do the same basic job. The difference is how much control you get.

Menu names and options can change between Siril versions. This page follows Siril’s current documentation (1.4). Check the dialog on your own copy if a label looks different.

Using the histogram sliders

  1. Shadows (the black point). Slide it to the right until it sits just below the left foot of the sky hump. Siril’s auto-stretch places it about 2.8 sigma below the peak, which is a good place to start. Watch the clipped-pixels percentage and keep it very small.
  2. Midtones. This is the main control. Slide it left to brighten, and lower numbers mean a stronger stretch. It never clips anything by itself. Stop when the sky has moved off the left edge and the faint detail is just visible.
  3. Highlights. Usually leave it at 1.0. Pulling it down brightens everything and burns the top end to white.
  4. Use the toolbar. The log view and the X zoom make the crowded left part of the histogram easier to read. If you set a region of interest (ROI), the histogram will not show the effect on the preview, so clear the ROI before judging the result.
  5. Apply. Nothing changes in the image until you click Apply. Then look at the new histogram and decide whether to go again.

What overstretching does

Use the “Jump to” buttons in the demo above to see each of these on the pretend image. A stretch that is slightly too far looks fine on a phone screen and falls apart on a large one.

How to tell you have gone too far: the hump of the sky sits past about a third of the way across, the clipped percentage is more than a fraction of a percent, stars look like soft discs, or the nebula’s bright area has no texture left.

One stretch or several?

// The short answer

Do several small stretches, usually two to four, and look at the result after each one. Stop when the sky sits at roughly 10 to 25 percent and the faint detail is visible.

Honestly, the math is the same: stretching the midtones twice by a little each time gives about the same curve as stretching once by a lot. The benefit of going in steps is not a better formula. It is that you stay in control.

  • You re-measure the histogram after each one, so you do not guess how far to go.
  • You can stop at the first sign of noise, bloating stars or clipping, and undo just that step.
  • You can use different tools for different jobs: a gentle GHS or histogram stretch first, a small one with the highlights protected next, then Curves for contrast.
  • You can reduce noise or adjust color between steps, when it is easiest to see.

Siril’s documentation takes the same approach for GHS: early stretches should be gentle, with the symmetry point just left of the main peak, a fairly high b value of about 6 or more and only a small increase in D. Then repeat with small adjustments rather than one big one.

One stretch is fine for a quick look, to check that a stack worked or that a target is there. For the version you will share, take it in steps.

A simple recipe

  1. Crop, remove the gradient and color-calibrate. Save a linear FITS copy.
  2. First stretch (gentle). In Histogram Transformation, set the shadows just below the sky hump and lower the midtones until the sky is about 8 to 10 percent. Or use GHS with SP just left of the peak, b of about 6 or higher and a small D. Apply.
  3. Look at the image and the histogram. Check the clipped percentage and the stars.
  4. Second stretch (small). Measure again, since the hump has moved. Lift the midtones a little more, and if the stars are swelling, lower HP in GHS to protect them. Apply.
  5. Optional third. A last small lift. Stop as soon as the faint detail is visible and the sky is a dark gray.
  6. Finish with Curves for contrast and color saturation. Save the result as a new file.

Questions

Why is my stacked image almost completely black?
Stacked data is linear: the brightness values are proportional to the light collected, and in a deep-sky image nearly all of the pixels are very dark. Your screen needs those values spread out to show them, and that spreading is a stretch. Siril's viewer can show a temporary auto-stretch so you can see the image, but that does not change the data until you apply a stretch.
Should I stretch once or several times?
Several small stretches, usually two to four. Mathematically, repeated midtone stretches add up to one big one, so the advantage is control. You can stop and look after each one, re-measure the histogram, protect the stars and the bright core, and avoid pushing past the point where the image falls apart. A single large stretch is quick, but if it goes too far you have to undo it and start again.
What should the histogram look like when I'm done?
A common target is a clear gap between the left edge and the sky's hump, with the hump sitting roughly 10 to 25 percent of the way across for a dark-gray sky. The bright end should have only a small tail of stars, with no pile-up against the right edge. These are guidelines, not rules, and your taste and the target both matter.
Is the Auto-stretch button good enough?
It is a useful way to see what is in the data, and Siril's own documentation says it is rarely advisable to use as it is. It tends to stretch strongly in one step. Use it for a preview, or as a starting point you then adjust.
Which is better, Histogram Transformation, Asinh or GHS?
None is better in every case. Histogram Transformation is the easiest to learn. Asinh is fast and keeps star color. GHS gives the most control over where the stretch happens and how much to protect the shadows and stars. Many people start with Histogram Transformation, then move to GHS as they want more control.
Do I stretch before or after removing stars?
Star removal tools such as StarNet usually work best on linear or lightly stretched data, so check the tool's own instructions. If you stretch the starless image and the stars separately, you can push the nebula hard without bloating the stars, and then put them back together. This is an advanced step, so get comfortable with one image first.
Can I fix an overstretched image?
Not fully. If you saved a linear copy, go back to it and stretch again more gently. If you only have the stretched file, you can darken the sky with the shadows slider or Curves, but clipped stars and burned cores cannot be recovered, and noise that was boosted stays.

See where stretching fits in the whole processing workflow. Still planning the shoot? Read the histogram guide for exposure, or the calibration frames guide.

Support Dark WindowFree, no ads. A tip covers hosting and keeps updates coming.