PixelMath
PixelMath applies a formula to every pixel. Images are referenced by their IDs. This lets you combine channels into colour images, blend images or recombine stars with a screen blend.
Purpose
| Task | Example |
|---|---|
| combine channels into a colour image | HOO, SHO |
| build or blend luminances | maximum or weighted sum |
| recombine stars | screen formula |
| subtract signal | continuum subtraction |
Principle
- An expression such as
L * 0.6 + Ha * 0.4is evaluated for every pixel; image names stand for the pixel values of that image (values 0–1). - Important operators and functions:
+ − * /,max(),min(),med()(median of an image),~x(inversion,1 − x). - All images involved must have the same dimensions.
Parameters
| Section | Effect | Typical choice |
|---|---|---|
| RGB/K expression | one formula for all channels | Use single RGB/K expression enabled when all channels are treated alike |
| R / G / B | separate formulas per channel | for colour combinations |
| Symbols | variables, e.g. s = 1.0 | for adjustable factors |
| Destination | Replace target image or Create new image (with ID, colour space) | see below |
| Rescale result | normalises the result to 0–1 | usually off |
Operation
- Enter the expression, replace image IDs with the actual names.
- Choose the destination; for Create new image set ID and colour space (RGB or greyscale).
- Apply to the target image (drag the triangle onto it) or execute globally.
Typical applications
Narrowband palettes
Create new image, colour space RGB.
| Palette | R | G | B |
|---|---|---|---|
| HOO | Ha | OIII | OIII |
| HOO with blend | Ha | Ha*0.3 + OIII*0.7 | OIII |
| SHO | SII | Ha | OIII |
- OIII emits at 496/501 nm, between green and blue; in G and B it gives the perceptually natural teal. A share of Ha in G (0.2–0.4) shifts Ha areas towards yellow/orange and creates more natural transitions; higher shares weaken the separation.
- SHO is strongly greenish at first (Ha in G); the palette only emerges with Removes an excess of one colour, usually green, by limiting that channel to the level of the other two – a correction of colour errors or a deliberate creative tool. Open fundamentals →.
- For SHO, ChannelCombination is sufficient too (R = SII, G = Ha, B = OIII).
Building or blending a luminance
| Purpose | Expression |
|---|---|
| each structure from the brightest channel | max(A, B_LF) |
| softer, less noisy | A*0.6 + B_LF*0.4 (weights sum to 1) |
| blend luminance with the colour image’s L* | Luminance * 0.7 + ColourImage_L * 0.3 |
Match levels first: A luminance built from existing channels, so that structure and colour can be processed separately and merged again with LRGBCombination. Open fundamentals →.
Recombining stars
~((~Starless) * (~(Stars * s)))
Symbols: s = 1.0Screen blend 1 − (1 − a)·(1 − b); destination Replace target image on a duplicate. Details: Splits an image into a starless image and a star image, so that nebula and stars can be processed separately and recombined at the end with a screen blend. Open fundamentals →.
Subtracting the continuum
Ha - q * (R - med(R))Removes stars and continuum from an Ha image by subtracting the red channel; q matches the signal strengths. Works only if stars have the same profile in both images: AI-based deconvolution for linear data – corrects star shapes, makes stars smaller and sharpens nebula structure. Open fundamentals →.
What a good result looks like
Typical errors
| Observation | Cause | Remedy |
|---|---|---|
| Error “unknown symbol” | image ID misspelled | check IDs |
| Result black or white | rescale or value range | rescale off, check the expression |
| Astrometric solution missing | Create new image | Replace target image on a duplicate |
max() always picks the same channel | levels not matched | LinearFit first |
| Grey result instead of a colour image | colour space greyscale | colour space RGB |
When to use it – and when not
| Good for | Better another tool |
|---|---|
| any pixel-by-pixel calculation | simple channel combination → ChannelCombination |
| palettes, luminances, screen recombination | combining luminance and colour image → Replaces the brightness of a colour image with a separate luminance – structure and sharpness from the luminance, colour from the colour image. Open fundamentals → |
HaLRGB workflow · Narrowband workflow (HOO/SHO) · OSC workflow with a quad band-pass filter · Synthetic luminance