The problem with traditional stretching
When you stack astronomical images, the result is a linear image: most of the information is concentrated in the dark values, and the image appears almost black. Stretching (histogram stretching) is the step that reveals details by redistributing tones.
The problem is that traditional methods (histogram transformation, curve adjustment) tend to destroy star colors. The more you stretch, the more stars saturate and turn white. Nebulae lose their nuances. You spend time correcting downstream what a better algorithm could have preserved from the start.
This is exactly the problem that VeraLux HMS solves.
What is VeraLux?
VeraLux is a script suite created by Riccardo Paterniti, available for free for Siril (under the GPL-3.0 license). It consists of two main modules:
HyperMetric Stretch (HMS)
The heart of VeraLux. HMS treats each pixel as a vector in a 3D color space. Instead of stretching the three channels (R, G, B) independently, it separates luminance (light intensity) from chromaticity (color direction).
The hyperbolic stretch is applied only to luminance. Chromaticity is preserved mathematically. Result: stars retain their natural hue (blue, yellow, orange...) even with an aggressive stretch.
Sensor calibration
VeraLux does not settle for a generic luminance formula (the classic 0.21R + 0.72G + 0.07B). The script includes a database of quantum efficiency (QE) per sensor model. You select your sensor (Sony IMX585, IMX662...), and HMS adapts its calculations accordingly.
If your sensor is not listed, the Rec.709 formula is used as a fallback, which is still much better than a traditional stretch.
Key parameters
VeraLux HMS is designed to be simple. In practice, a few parameters are enough:
| Parameter | Role | Recommended value |
|---|---|---|
| Processing Mode | "Ready-to-Use" for an aesthetic result, "Scientific" for mathematical precision | Ready-to-Use |
| Target Background | Sky black level after stretch | 0.12 – 0.15 |
| Protect b | Star highlight protection | Adjust based on stellar density |
| Color Grip | 1.0 = pure vector preservation; < 1.0 = blend with scalar method | 1.0 |
In practice
- Process your image normally in Siril: stacking, gradient removal, optionally deconvolution
- Apply Siril's spectrophotometric calibration (SPCC)
- Launch VeraLux HMS (the image must be linear at this stage)
- Then refine with curves and saturation on the stretched image
The order matters: VeraLux only works on linear data. If you stretch first and apply VeraLux afterward, the results will be inconsistent.
StarComposer: recombining stars properly
The second module of VeraLux, StarComposer, is aimed at those who work in "starless" mode (image without stars). After removing the stars to process the nebula separately, you need to put them back, and that is often where things go wrong.
StarComposer recombines a linear star mask with the stretched image. Its strengths:
- Auto-Stretch Stars: automatically calculates the intensity needed for the linear stars to match the stretched image
- LSR (Low Signal Rejection): reduces sensitivity to nebulosity residuals captured in the star mask
- Healing: corrects purple or green halos around recombined stars
The key tip: recombine the stars right after the first stretch, before aggressive contrast and saturation adjustments. If you wait too long, the reinserted stars no longer blend in naturally.
VeraLux vs. other methods
| Method | Strength | Limitation |
|---|---|---|
| Histogram Transformation | Fast, simple | Destroys stellar colors (considered obsolete) |
| GHS (Generalized Hyperbolic Stretch) | Total control over the curve | Steep learning curve, time-consuming |
| VeraLux HMS | One-click result, colors physically preserved | Fewer fine-tuning options |
How to install it
VeraLux is available in the official Siril script repository. From Siril 1.4:
- Open the script manager (*Scripts* > *Manage scripts*)
- Search for "VeraLux"
- Install. That is all.
The script then appears in the *Scripts* menu of Siril, ready to use.
Our opinion
VeraLux HMS is probably the most significant advancement for Siril users since the arrival of GPU stacking. In a single step, it solves a problem that many compensated for with dozens of minutes of manual retouching.
If you process with Siril and have not yet tried VeraLux, make it your priority. Your stars will thank you.
Official repository: gitlab.com/free-astro/siril-scripts