Astrophotography · PixInsight · Pipeline notes

Taming the Pelican, with PixInsight and Claude Code: a four-panel, five-filter IC 5070 mosaic, from WBPP to a seamless master

Eight sessions, four panels, five filters, 1,176 sub-exposures and one persistent problem: bright stars sitting exactly on panel borders. This is the complete walkthrough, from the moment WeightedBatchPreprocessing finished to the final RGB, Hα and OIII masters, including what went wrong and how it was fixed.

The result: the HOO merged with the RGB, with stars screened on top, IC 5070 Pelican Nebula hover or tap for annotations
The result: HOO built in linear space, merged with the RGB (30 %, more around the brightest stars), noise reduction before the merge, hot pixels repaired, then curves, histogram and unsharp mask by hand, and the stars screened on top (saturation ×1.4). Shown rotated 180° so that the Pelican reads the right way up; the data files keep the original orientation. This is the image as it stands for this field. One day I hope to include it in a larger mosaic in which the North America Nebula and the Pelican Nebula images are merged. Hover over the image (or tap it, or press the button) to see it annotated: PixInsight’s coordinate grid with RA/Dec labels, the named stars and IC 5070 from its catalogues, north and east arrows, a 10′ scale bar and a red ellipse around the part of the nebula that looks like the Pelican (as I read it, in this orientation).
The finished image with a photograph of the Moon laid on it at the same angular scale: the Moon covers about half the width of the field
How big is it? The Moon laid on the image at the same angular scale. The Moon (about 31′ across, from the mean apparent diameter) fills a little more than half the width of the field, which is about 57′ × 58′, or 1.8 × 1.9 Moons. The Moon is the author’s own photograph (a large mosaic of the nearly full Moon, 25 September 2026, 98 % lit, waxing), scaled by its measured limb diameter using the LunarAtlas limb fit. On that date the Moon’s apparent diameter, from the LunarAtlas ephemeris, was between 30.7′ and 31.6′, so the 31.1′ used here is within about 1.5 %.

Hidden things in the Pelican

A wide-field picture like this one holds more than the shapes everybody sees. I took the plate solution of the image, converted the catalogue positions of known objects in this part of the sky into pixel positions, looked at each spot, and read the papers behind them. Everything below sits inside this frame, and each position was checked on the picture. Where a statement is my own reasoning and not from a paper, it says so.

The finished image with four numbered markers: HH 555, HH 563 to 565, V2492 Cyg, and MHO 3400
Four things in this frame that have names, numbered as in the cards below. Positions from the plate solution of the image and the catalogue coordinates in SIMBAD; image rotated 180° like the others.
A dark tendril whose tip carries a small bright arc, marked HH 555
1 · a jet in a dark tendril

HH 555: twin jets from a hidden newborn star

The long dark tendril left of the bright red arc ends in a tiny bright arc. That is where the Herbig-Haro object HH 555 sits, at RA 20h51m19.6s, Dec +44°25′36″ (SIMBAD, from Bally & Reipurth 2003): the catalogue position falls on the tip. HH 555 is a bipolar jet that comes out of the tip of an “elephant trunk” pushing into the nebula from the molecular cloud next to it. Both beams bend toward the west, which the discoverers attributed to a side wind.

A later paper simulated it (Kajdić & Raga 2007) and concluded that HH 555 is most likely an irradiated jet from a highly embedded protostar: the glow comes from the jet being lit by the nebula’s hot stars, not from a bright star. Their models are for a star 1 pc away emitting 5×1048 ionizing photons per second, and show that the incident flux strongly changes how the jet looks.

Seen in this image: the tendril and the small bright arc at its tip, which is where the catalogue puts HH 555 (the embedded source of the jet is hidden). I cannot pick out the two jet beams themselves at this scale, and I did not check which part of the arc is the jet and which is the irradiated edge of the tendril.

Sources: Bally & Reipurth 2003, AJ 126, 893; Kajdić & Raga 2007 (arXiv:0708.3054); SIMBAD.

Below the bright rim: two small pink bow-shaped glows marked HH 564 and HH 563, a very faint spot marked HH 565, and the protostar position
2 · bow shocks

HH 563, 564 and 565: a chain of bow shocks

Below the bright rim of the cloud, two small pink, bow-shaped glows sit exactly at the catalogue positions of HH 564 and HH 563 (SIMBAD). Together with HH 565 they form what Bally & Reipurth describe as a chain of three roughly evenly spaced bow shocks that traces a bent flow coming out of the southern rim of the Pelican molecular cloud. The likely driver is the Class I protostar IRAS 20489+4406, marked at the rim. Class I means a young star still wrapped in its infalling envelope.

Seen in this image: HH 564 and HH 563 are clearly visible as small pink arcs. HH 565 is only a very faint speck at its position.

Sources: Bally & Reipurth 2003, AJ 126, 893 (abstract); positions from SIMBAD.

A small red wedge-shaped nebula with the positions of V2492 Cyg and HH 570 marked at its top
3 · a star that erupted in 2010

V2492 Cyg: the young star that flared up

At the top of a small red wedge of nebulosity in the lower part of the frame, at RA 20h51m26.2s, Dec +44°05′24″, sits V2492 Cyg, also known as PTF 10nvg and IRAS 20496+4354. In 2010 the Palomar Transient Factory caught it suddenly brightening by roughly five magnitudes (Covey et al. 2011, as summarised in later papers), a very young Class I star waking up. Before that it was faint, around 18–19 in the red. Its brightness has kept changing since: Hillenbrand et al. (2013) found further brightenings and dimmings in 2011 and 2012, with prolonged faint states, and a quasi-periodic signal of about 220 days that they interpret as changes in the dust in front of the star. Forbidden emission lines show a jet, and millimetre maps show an extended CO outflow.

It does not fit the textbook classes neatly. Papers compare it to EX Lupi-type outbursts (a star flaring when more gas falls onto it) and to extinction-driven stars such as UX Orionis. A second eruptive star in this complex, HBC 722, flared in 2010 as well, but it lies off to the east, outside this frame (Kóspál et al. 2011).

The pictured wedge lies at V2492 Cyg’s position, next to the catalogue positions of the Herbig-Haro objects HH 570 and HH 569, which Bally & Reipurth tie to a parallel outflow possibly driven by IRAS 20496+4354. I did not check which part of the wedge is which object.

Sources: Hillenbrand et al. 2013 (arXiv:1208.2066); Kóspál et al. 2011 (arXiv:1011.4009); Covey et al. 2011, AJ 141, 40 (read as search-result summaries only); Bally & Reipurth 2003; SIMBAD.

A dark and red boundary region with the position of MHO 3400 marked, where the outflow is invisible in this image
4 · you cannot see this one

MHO 3400: an outflow that only shows in the infrared

In the upper right, at the edge of the glow, is the position of MHO 3400, an X-shaped outflow that Bally et al. (2014) found in near-infrared images of molecular hydrogen at 2.12 µm. MHO stands for Molecular Hydrogen emission-line Object. In the same survey they identified more than 50 outflows from young stars across the North America and Pelican nebulae, with hundreds of individual shocks, and they describe the dust clumps they come from as among the most active star-forming sites in the solar neighbourhood.

Seen in this image: nothing in particular. Hydrogen at 2.12 µm is invisible to a visible-light camera. It is here as a reminder of how much of the star formation in this view is hidden.

Sources: Bally et al. 2014, AJ 148, 120 (abstract, arXiv:1409.6762); SIMBAD.

5 · two stars that are not part of it

The two brightest stars are in front of the nebula

The two bright stars in the frame, 57 Cyg (upper left) and 56 Cyg (lower right), look like they belong to the nebula. They do not. Their Gaia DR3 parallaxes (SIMBAD) put them far closer than the nebula:

TypeParallaxDistanceCompared with the nebula
57 Cyg (HD 199081)B5 V, spectroscopic binary5.81 masabout 172 pcabout 4.6 times closer
56 Cyg (HD 198639)A6 V24.23 masabout 41 pcabout 19 times closer
The Pelican complexH II regionabout 800 pc

The distances are 1/parallax without a zero-point correction (my calculation from the SIMBAD values). For the nebula: about 796 ± 25 pc from Gaia DR2 (Kuhn et al. 2020), as quoted in later papers; a different Gaia analysis (Evitts et al. 2020) gives about 870 pc.

So 56 Cyg, a nearby white star about 41 parsecs away, happens to sit in front of a nebula some twenty times farther. 57 Cyg is a close pair of B stars in front of it.

Something I noticed (my reasoning, not from a paper): the teal glow around 57 Cyg in this picture is OIII light. A B5 star is far too cool to ionise doubly-ionised oxygen, which needs much hotter stars, and 57 Cyg is a foreground star besides. So the glow is probably not powered by it. The star may simply sit in front of OIII emission from the nebula, or the glow may have another cause. I cannot decide that from this data.

6 · the missing light source

The stars that light the nebula are not in the picture

The Pelican glows because hot young stars ionise its hydrogen. Kuhn et al. (2020) name the two known O-type stars of the complex as 2MASS J20555125+4352246 and HD 199579. Both lie east of this frame, outside it (SIMBAD and the object name: 2MASS J20555125+4352246 at RA 20h55m51s, Dec +43°52′; HD 199579 at RA 20h56m35s, Dec +44°55′). Damiani et al. (2017) name the O5 star as the likely ionising source of the region. The dark pillars and tendrils in the picture are what is left of cloud material that the ionising radiation has not yet eaten away.

What I see (consistent with what the papers describe, but my own observation): the HH 555 tendril ends in a bright arc at its tip that points toward the lower left in this view, which is east and south, roughly toward the O star at +43°52′ (HD 199579 lies north-east, so it is less well aligned). That is what pillars sculpted by a distant ionising source do: they point at it.

Sources: Kuhn et al. 2020 (arXiv:2006.08622); Damiani et al. 2017, A&A 602, A115 (arXiv:1702.05999); coordinates of the O star from the object name.

7 · how big it really is

The picture is about 13 parsecs wide

At 796 pc, the 57′ width of this frame is a bit over 13 parsecs, about 43 light-years. IC 5070 itself, about 80′ across according to the catalogue, is roughly 18 parsecs or 60 light-years, and it continues beyond the frame. These are my own arithmetic from the angular size and the Gaia distance; with 870 pc they would be about 9 % larger.

8 · a nursery in the middle of a burst

Hundreds of unborn and newborn stars

The Spitzer survey of the North America and Pelican nebulae (Guieu et al. 2009) selected more than 1,600 young stellar objects over 9 square degrees, about a third in eight clusters in and around the dark cloud LDN 935; the optical ones suggest a typical age of a few million years. An X-ray study (Damiani et al. 2017) found more than 700 X-ray sources, with young-star ages of roughly 1–10 million years. Kuhn et al. (2020) used Gaia to separate the young stars into at least six spatial and motion groups, three of which are expanding at 0.3–0.5 km/s per parsec, up to about 8 km/s, and conclude that the nearly free-fall collapse of a turbulent molecular cloud is the most likely way this association formed.

Sources: Guieu et al. 2009 (arXiv:0904.0279); Damiani et al. 2017; Kuhn et al. 2020; Bally et al. 2014.

Sources

What these pages cannot tell: the jet lengths of HH 555 and the distance the 2003 and 2007 papers assumed were not in the abstracts I could read, so they are not quoted here. Distances for the nebula differ between studies (about 800 to 870 pc). I read abstracts, not full papers, and the positions on the image are good to a few pixels (the catalogue positions are good to arcseconds).

Captured 4 August – 11 October 2026 · ZWO ASI533MM Pro · 250PDS · Astronomik Deep Sky RGB + 6 nm Hα/OIII · processed in PixInsight 1.9.5

1,176calibrated light frames in WBPP
≈22 htotal integration
4 × 5panels × filters = 20 masters
0.65″/pxcommon mosaic scale
5288×5376final cropped mosaic (px)

Light frames and integration time per filter

Bars show integration time; each label gives the number of frames and the time. The coloured dot only echoes the filter.

0 h 2 h 4 h 6 h 8 h R: 297 frames of 30 s = 2 h 28 mR297 frames · 2 h 28 m G: 282 frames of 30 s = 2 h 21 mG282 frames · 2 h 21 m B: 304 frames of 30 s = 2 h 32 mB304 frames · 2 h 32 m H: 150 frames of 180 s = 7 h 30 mHα150 frames · 7 h 30 m O: 143 frames of 180 s = 7 h 09 mOIII143 frames · 7 h 09 m

The same, for each of the four panels (arranged like the mosaic)

Each tile is one panel, placed where it sits in the finished image (shown rotated 180°, like the other images), over a dimmed copy of its part of the result. Bar length is integration time.

Panel 4top left of the mosaicR, panel 4: 59 frames of 30 s = 30 mR59 frames · 30 mG, panel 4: 48 frames of 30 s = 24 mG48 frames · 24 mB, panel 4: 53 frames of 30 s = 26 mB53 frames · 26 mH, panel 4: 37 frames of 180 s = 1 h 51 mHα37 frames · 1 h 51 mO, panel 4: 33 frames of 180 s = 1 h 39 mOIII33 frames · 1 h 39 m Panel 3top right of the mosaicR, panel 3: 77 frames of 30 s = 38 mR77 frames · 38 mG, panel 3: 76 frames of 30 s = 38 mG76 frames · 38 mB, panel 3: 75 frames of 30 s = 38 mB75 frames · 38 mH, panel 3: 49 frames of 180 s = 2 h 27 mHα49 frames · 2 h 27 mO, panel 3: 43 frames of 180 s = 2 h 09 mOIII43 frames · 2 h 09 m Panel 2bottom left of the mosaicR, panel 2: 92 frames of 30 s = 46 mR92 frames · 46 mG, panel 2: 90 frames of 30 s = 45 mG90 frames · 45 mB, panel 2: 101 frames of 30 s = 50 mB101 frames · 50 mH, panel 2: 33 frames of 180 s = 1 h 39 mHα33 frames · 1 h 39 mO, panel 2: 33 frames of 180 s = 1 h 39 mOIII33 frames · 1 h 39 m Panel 1bottom right of the mosaicR, panel 1: 69 frames of 30 s = 34 mR69 frames · 34 mG, panel 1: 68 frames of 30 s = 34 mG68 frames · 34 mB, panel 1: 75 frames of 30 s = 38 mB75 frames · 38 mH, panel 1: 31 frames of 180 s = 1 h 33 mHα31 frames · 1 h 33 mO, panel 1: 34 frames of 180 s = 1 h 42 mOIII34 frames · 1 h 42 m
Show everything as a table
FilterPanel 1Panel 2Panel 3Panel 4TotalSub
R69 · 34 m92 · 46 m77 · 38 m59 · 30 m297 · 2 h 28 m30 s
G68 · 34 m90 · 45 m76 · 38 m48 · 24 m282 · 2 h 21 m30 s
B75 · 38 m101 · 50 m75 · 38 m53 · 26 m304 · 2 h 32 m30 s
Hα31 · 1 h 33 m33 · 1 h 39 m49 · 2 h 27 m37 · 1 h 51 m150 · 7 h 30 m180 s
OIII34 · 1 h 42 m33 · 1 h 39 m43 · 2 h 09 m33 · 1 h 39 m143 · 7 h 09 m180 s
All1,176 · 22 h 00 m

The kit and the software

Computer
Mac mini (Mac16,10), Apple M4, 10 cores (4 performance + 6 efficiency), 24 GB, macOS 27.0.1 (26A434), Metal 4
PixInsight
1.9.5 “Lockhart” (arm64), V8 script engine for the headless runs
Preprocessing
Weighted Batch Preprocessing 3.1.0 (from its log); ImageSolver 6.5.0 (from the astrometric solution metadata)
RC Astro
BlurXTerminator AI model 4, NoiseXTerminator model 3.1, StarXTerminator model 11 (RC Astro module signed 2026-09-08)
Calibration data
Gaia DR3/SP spectra (gdr3sp-1.0.0, 20 XPSD files) for SPFC; MARS DR1 1.1.1 and MARS-u01 1.0.1 for MGC
Other PixInsight tools
SPFC, MGC, SPCC, StarAlignment, ImageIntegration, LocalNormalization, GradientMergeMosaic, MosaicByCoordinates: part of PixInsight 1.9.5; the individual module versions cannot be read from the command line and are not listed
Scripting
Python 3.14.5, NumPy 2.5.2, SciPy 1.18.1, Pillow 12.3.0, Matplotlib 3.11.1
Telescope and camera
250PDS, ZWO ASI533MM Pro, gain 105, offset 70, −15 °C
Filters
Astronomik Deep Sky R, G, B; 6 nm Hα (656.30 nm) and OIII (500.70 nm)

1. The data

The target is IC 5070, the Pelican Nebula, shot as a four-panel mosaic with a mono camera. Every panel has five filters: Astronomik Deep Sky R, G, B (30 s subs) and 6 nm Hα (656.30 nm) and OIII (500.70 nm) at 180 s. The camera ran at gain 105, offset 70 and −15 °C. The plate solutions give an image scale of about 0.65″/px. (The focal length and pixel size written in the FITS headers are not used here: they do not agree with the camera’s specification.) Data were collected over eight sessions, each with its own flats (mostly taken with the Flat Wizard).

These are the frames that actually went into WBPP, counted from the WBPP log:

FilterPanel 1Panel 2Panel 3Panel 4TotalSub lengthIntegration
R6992775929730 s2 h 28 m
G6890764828230 s2 h 21 m
B75101755330430 s2 h 32 m
Hα31334937150180 s7 h 30 m
OIII34334333143180 s7 h 09 m
All1,176≈22 h

Calibration inputs: 1,010 flat frames across the sessions, plus a master bias and 23 master darks (10 s to 1200 s) prepared beforehand.

2. Frame review before WBPP

Before WBPP, every light frame went through a small home-made review tool (a Python script that reads each FITS file and computes HFR, FWHM, star count, roundness, ADU statistics and an overall quality score from 0 to 100). It builds a panel × session matrix so a weak session stands out immediately, and a local review page lets me preview a frame and mark it for deletion.

A faster alternative to Blink (but less detailed)PixInsight’s Blink is the classic way to cull subs, but with a thousand frames it means flipping through them one by one. The review tool does the culling pass differently: the numbers are measured once and cached, a whole panel/filter group is shown as one grid of thumbnails with the same stretch, and the scores tell me which tiles deserve a closer look. Bad frames can be ticked and deleted in bulk. For me it makes the first pass much quicker than Blink. It is not a replacement for it: Blink is still the better tool for studying a single frame closely, and the thumbnails here are small.

The tool can also calibrate with darks and flats, so the frames are judged on what WBPP will actually see rather than on raw data. Pointed at the folder with the master bias and master darks, it matches each light to the dark of the same exposure time, builds a master flat from each session’s own flats (a night’s flats only ever calibrate that night’s lights), subtracts and divides, and measures the calibrated frame. The “Cal” column in the tables says what was applied (D+F means dark and flat), and calibrated copies can optionally be saved. In the viewer a Raw / Calibrated toggle switches between the sensor data and the calibrated frame, which makes hot pixels, dust shadows and flat-field problems visible before any batch run.

Screenshot of the FITS light frame report: a table of quality scores per panel, filter and session
The Panel × Session quality matrix from the review tool. Each cell is the average quality score for that panel, filter and session; the right-hand columns show total frames and exposure at the time of the report.

Clicking a filter row opens every frame of that panel and filter across all sessions as a thumbnail grid, all stretched with the same settings, so a drifting, trailed or cloud-affected sub is obvious next to its neighbours. Each tile shows the quality score, the median HFR (the “A2.85” figure) and the star count.

Review tool thumbnail grid of 31 H-alpha frames of panel 1 with quality scores and star counts
Panel 1, Hα, 180 s: all 31 frames across sessions at a glance, each tagged with quality score, HFR, star count and session.

Opening a single frame shows a live auto-stretched preview with its histogram and numbers, and the Delete button moves the file to a _deleted folder instead of erasing it, so a rejection can be undone.

Review tool single-frame viewer showing an H-alpha sub with histogram, quality, HFR, FWHM, roundness and elongation
The single-frame viewer: stretch controls, histogram, quality 85 (“good”), HFR 1.68, FWHM 2.87 px, 222 stars, roundness 82 % and an elongation check that tells tracking drift apart from coma.

The review state file records 94 frames marked as deleted (R 29, G 35, B 17, H 5, O 8). That matches exactly the difference between the frame counts in the report (326 R, 317 G, 321 B, 155 H, 151 O) and the frame counts WBPP received, so the review step happened before WBPP and its rejects never reached calibration.

3. What WBPP did

The WBPP log (Weighted Batch Preprocessing 3.1.0, PixInsight 1.9.5) covers 128 calibration groups, 20 registration groups, 20 local-normalisation groups and the final integrations. By the log timestamps the whole run took about 43 minutes. The settings, as recorded in the log:

StageWhat happened
FlatsEach group of flats (per filter and session) was calibrated with the master bias and integrated into a master flat: 39 master flats in total. Integration used Winsorized sigma clipping with multiplicative normalisation.
Light calibrationEvery light frame was calibrated with the master dark matched automatically to its exposure time and the master flat for its filter and session. Light output pedestal: auto. No cosmetic correction appears in the log. Grouping was by filter, exposure, session and panel.
Reference framesWBPP picked one best reference frame per panel, and in all four cases it was a 30 s R frame. All five filters of a panel are registered to that same frame, which is why the five masters of a panel line up with each other.
RegistrationStarAlignment in Register/Match mode, automatic interpolation, no distortion correction.
Local normalisationLocal Normalization for every panel/filter group against its own reference (scale 752 px), producing the LN_Reference_Light_* files that stayed in the master folder.
IntegrationImageIntegration: average combination, Winsorized sigma clipping (σ low 3.42, σ high 2.73, cutoff 5), additive normalisation with scaling, local rejection normalisation, and PSF signal weighting.
AutocropThe 20 masters were auto-cropped to the area covered by all frames of each panel: masterLight_BIN-1_3008x3008_EXPOSURE-…_FILTER-…_PANEL-n_autocrop.xisf. One example: 3008×3008 became 2915×2905 (crop window (26,41)x(2941,2946)).
The starting point for everything below20 autocropped master lights (5 filters × 4 panels), each a mono linear image of roughly 2,900×2,900 px, already plate-solved. I ran BlurXTerminator in Correct Only mode on all of them first, and kept an untouched copy in autocrop_backup/.

4. Everything after WBPP, at a glance

WBPP masters→BXT correct-only→ SPFC→MGC→BXT full→ Reproject to one canvas→Star-edge masks→Gradient merge→Crop→ RGB combine→BXT→Plate solve→SPCC→ Starless + stars→NXT (HOO, RGB)→Linear HOO + RGB blend→Stretch→Hot pixels→Stars screened on

Orange steps were scripted and run headless in PixInsight by Claude Code; the other steps were done by hand in the PixInsight GUI. Each stage wrote to its own folder, so nothing was ever overwritten.

StageFolderKey settings
SPFC + MGCspfc_mgc/Gaia DR3/SP, MARS DR1, Astronomik curves, 6 nm H/O
BlurXTerminatorbxt_full/Defaults, Correct Only off
Registrationregistered/One shared 5884×5884 canvas at 0.65″/px
Star masksregistered_masked/Black discs around border stars
Gradient mergemosaic_final/GradientMergeMosaic, average, shrink 0, feather 10
Cropmosaic_final_cropped/5288×5376, same crop for all five
Mastersmasters/RGB.xisf, H.xisf, O.xisf
Final mergematrix2/v2/NXT on linear HOO and RGB, 30 % RGB blend, sky 0.125, hot pixels fixed, stars screened on (see sections 14–17)

5. SPFC and MGC

Spectrophotometric Flux Calibration compares the measured star fluxes in each panel against Gaia DR3/SP spectra, so it needs to know what each filter and the sensor actually pass. For the broadband panels I used the built-in Astronomik Deep Sky R/G/B transmission curves and the Sony IMX533 quantum-efficiency curve. For Hα and OIII I used narrowband mode with the exact centre wavelengths (656.30 and 500.70 nm) and a 6 nm bandwidth.

Straight after SPFC, each image went through MultiscaleGradientCorrection with the MARS DR1 database and the MARS filter matching the data: R, G, B, Hα, OIII. Because the camera is mono, each file is treated as a single gray channel with its own filter.

Sanity checkAll 20 files ran without errors. The image medians moved by less than 0.5 % through SPFC and MGC (for example H panel 1 went from 0.001359 to 0.001358) and there were no NaN or negative-going pixels, so the data stayed linear and well-behaved. I only verified that the steps ran and stayed sane; I did not dig into what else SPFC stores.
Two gotchas(1) A fresh headless PixInsight does not know your Gaia database: the XPSD files have to be registered for the session through the Gaia process before SPFC will run. (2) In narrowband mode SPFC still wanted a transmission curve for the gray channel. A simple 6 nm trapezoid centred on the line made it run.

6. BlurXTerminator, full

The earlier Correct Only pass fixed the optics; this second pass is the full deconvolution with default settings (sharpen stars 0.50, sharpen non-stellar 0.50, automatic PSF). One trap for scripters: the process’s own scripted default has correct_only = true, so it must be switched off explicitly or you silently get another Correct Only run.

7. Registration onto one canvas

All the panels were already plate-solved, so instead of matching stars I reprojected every image with the engine behind the MosaicByCoordinates script. The important detail is that all 20 images went through a single run, so the output canvas, scale and rotation are computed once and are identical for every filter: 5884×5884 px at 0.65″/px. Each image is placed on that canvas in its own file, and the five filters overlay pixel for pixel.

A first GradientMergeMosaic run on these tiles produced five mosaics that looked seamless at a glance. Zooming in told another story.

8. The bright-star border problem

In the first mosaics, bright stars at the edge of a panel had left dark holes, dark shadows and one-sided bright smears. The cause is simple once you see the data: at one join, Panel 1 ended right through a bright star’s core, while Panel 2 held the whole star about 100 px inside its own edge. The merge algorithm works on image gradients, and a star truncated by a tile edge is a violent gradient step.

Two crops of the R mosaic at a panel join, the top one with dark shadows beside two bright stars, the bottom one clean
R mosaic at the Panel 1/Panel 2 join. Top: before masking, with a dark shadow to the left of the bright pair and a dark smear beside the smaller star. Bottom: after masking the clipped copy of each star.

The fix, in three steps

  1. Scan every tile edge. Bright stars were detected on the union of all tiles, with a threshold scaled to brightness, and each star’s halo disc was tested against every tile’s valid region. The scan found 55 locations across the five filters where an edge cuts through a bright star’s halo. An early version with a fixed brightness cutoff missed fainter stars, so the threshold had to come down.
  2. Fill with black. Where a neighbouring panel contains the whole star, the clipped copy gets a black disc (radius roughly 60–80 px, scaled to the star’s brightness). Zero counts as “no data” to the merge, so the clean copy fills in. This is the same idea as eroding the tile edge, but over a much larger area than the merge’s own 1 px edge shrink.
  3. Shrink the edge by 0 px. A second, separate artifact looked like a dark wedge at the left edge between two panels. There was no star there at all: the two panels overlap by only 6–18 px, and the default one-pixel edge shrink erodes that strip away at the corner.
Grid of crops from the B mosaic comparing merge settings; the default shrink shows a dark wedge, shrink 0 does not
The same two spots in the B mosaic under five merge settings (top row: the left-edge wedge; bottom row: a star at a panel join). With the default shrink the wedge appears; with shrink 0 (and with overlay mode) it vanishes.
What did not workA more aggressive variant that blanked every duplicate halo wherever two panels overlap thinly made things worse: large black areas appeared where the blanked region ended. The final recipe only masks a clipped copy when another panel holds the whole star.

I then compared the final result at ten different star locations on the B mosaic (the pair at the join, the left-edge wedge and several other panel joins), and the corners of the R and B mosaics. All were clean. I checked six locations on R and ten on B; G, H and O use exactly the same recipe, but I looked at them at lower magnification only.

9. Final mosaics and crop

Stars on the outer border of the mosaic have no neighbouring panel to take over, so they cannot be masked. Instead, all five mosaics were cropped to one common rectangle that lies at least 160 px inside the valid data everywhere, which removed every outer-border star on the list. The crop is x 376–5664, y 224–5600, leaving 5288×5376 px, with no pixels at or near zero left in any of the five.

R mosaic
R
G mosaic
G
B mosaic
B
H-alpha mosaic
Hα
O-III mosaic
OIII

The five cropped mosaics, each given its own gentle midtones stretch (the same kind of automatic screen stretch PixInsight applies, with a target background of about 22 %); the stretch is for viewing only and the data are still linear. There are no visible seams or brightness steps between the panels. The red filter shows the Hα nebulosity too, because its passband includes 656 nm.

10. RGB, H and O masters

The next steps were done by hand in the PixInsight GUI on the cropped mosaics: RGB combination, a default BlurXTerminator pass, a plate solve (the mosaic had no astrometric solution of its own, and cropping drops any that exists), and SpectroPhotometric Color Calibration. The results are saved in output/masters/ as RGB.xisf, H.xisf and O.xisf (the last two with BlurXTerminator applied), all 5288×5376 px. These are ready for further integration.

Stretched preview of the H-alpha master
Hα master (quick stretch).
Stretched preview of the OIII master
OIII master (quick stretch). Fainter and flatter than Hα, as expected for this region.

11. Two paths that meet again

From here the data naturally splits in two. The broadband channels carry the colour and the star shapes; the narrowband channels carry the faint nebular detail. They are best processed separately and only joined late, once each has been brought to a comparable state. Below is the plan from this point; the first attempts at all three merge options are kept at the end of this post, under Paths not taken, since the real iterative work picks up again right after this plan.

Path A · broadband RGB

  1. R + G + B combined, BlurXTerminator, plate solve, SPCC done
  2. Check for residual gradients and colour casts
  3. Linear noise reduction
  4. Split stars from background (starless + stars)
  5. Stretch the starless image

Path B · narrowband Hα and OIII

  1. BlurXTerminator on each done
  2. Continuum-subtract: remove the broadband light that is also in the narrowband
  3. Linear noise reduction
  4. Split stars from background
  5. Balance the two against each other, stretch each starless image
Merge Narrowband detail blended into the colour image, with the natural RGB stars put back at the end

Why the two paths can be combined so easily

RGB, H and O are all exactly 5288×5376 px on the same canvas and the same crop, because every filter went through one registration run. No further alignment is needed; a quick blink of the three is enough to confirm it. Also, the narrowband data are much deeper than the broadband data: about 7.5 h of Hα and 7.2 h of OIII against about 2.5 h per colour channel. That is the argument for letting the narrowband provide the detail and the broadband provide colour and stars.

An overlap to handle first

The Astronomik R filter passes the 656 nm Hα line, and the G filter passes most of the 501 nm OIII line. If Hα is simply added to the red channel, the nebula’s red light is counted twice and the stars get boosted too. The fix is continuum subtraction: scale the broadband channel to the narrowband one using the stars (which are in both) and subtract it, leaving only the pure emission. PixInsight ships a ContinuumSubtraction script and an NBRGBCombination script for this kind of work, along with NBtoRGBStars.

Three ways to merge, and what I would pick

OptionHowGood forWatch out for
1. Boost the RGB channelsIn linear data: R′ = R + a·Hαcs, G′ = G + b·Ocs, B′ = B + c·Ocs, then stretchNatural colour, stars stay as they areNeeds good continuum subtraction; do not re-run SPCC afterwards, it would undo the boost
2. Bicolour starless blendStarless Hα → red, starless OIII → green and blue (“HOO”), then blended with the starless RGBMaximum nebula contrast and detailColours are false and Hα-dominant; OIII is weak here, so it must be scaled up to show
3. Narrowband as luminanceUse Hα (or an Hα+OIII mix) as the lightness of the RGBCleanest detail and noiseColour can look washed out or shifted; the deep Hα tends to dominate
Recommended plan
  1. Make the starless / stars split for all three images (RGB, Hα, OIII) while still linear, using StarXTerminator or StarNet2. The G and B previews above show noticeably fatter star halos than R, so keeping the RGB stars separate also lets them be treated on their own.
  2. Build the nebula from option 1 first (the natural-colour version), with continuum-subtracted Hα and OIII, and option 2 (the HOO starless version) as a contrast layer.
  3. Stretch the starless nebula images individually (Generalized Hyperbolic Stretch or the arcsinh stretch), matching their backgrounds, then blend with PixelMath or a mask: roughly “RGB nebula, strengthened with HOO where the narrowband signal is strong”, with weights chosen by eye.
  4. Add the RGB stars back on top with a screen blend, ~((~starless) * (~stars)), after stretching the stars lightly so they stay small and keep their colour.
  5. Finish with saturation and contrast curves, light noise reduction on the starless layer, and a final check at 100 % along the old panel seams.

The blending weights, the stretch and the colour choices are artistic decisions, so those will be done by eye in PixInsight. The mechanical parts are another matter: the star removal, the continuum subtraction and the scaling of the channels to a common level can be scripted and run in a batch like the earlier stages, which makes it quick to try several variants. The first attempt at each option is kept at the end of this post, under Paths not taken; the weights and the choice of option were still a starting point there. The next section picks up the real work.

12. Second round: the way I usually do it

The first drafts (kept at the end of this post, under Paths not taken) were stretched too hard: the black was black, and no sky is that black. For the second round I changed two things, and both come from how I normally work in PixInsight.

  1. A gentle stretch with the sky at about 0.15. Each narrowband image is stretched only as far as needed, with the dark areas lifted to a background of 0.15 instead of being clipped to black.
  2. Stars stretched by the same amount as the RGB image. I auto-stretch the linear RGB in PixInsight, note the settings, and go back to the linear image. StarXTerminator then splits off the stars, and that stars image is stretched with exactly those settings. Here that was a linked auto-stretch with shadows at 0.000387 and midtones at 0.00034, the amount STF gives this RGB (median 0.0005). The stars are merged into the nebula image afterwards with a screen blend.

Option 2 again: HOO, gently stretched, with a few star variants

Hα goes to red, OIII to green and blue, as before, but the stretch is now a gentle midtones stretch on starless images that were first brought to a sky level of 0.15. The two narrowband channels share one curve, with OIII scaled up by 1.8 so the weak line shows. I also blend a little Hα into the blue channel (15 %, not too much), which warms the nebula slightly. Below are four versions that differ only in star colour: the stars image from the linear RGB, stretched by the STF amount, with its colour saturation raised in steps.

HOO with natural star colour
A · natural star colour (saturation ×1.0)
HOO with stars saturation 1.5
B · stars saturation ×1.5
HOO with stars saturation 2.0
C · stars saturation ×2.0
HOO with stars saturation 2.6
D · stars saturation ×2.6

The star colours are all small differences at this scale, so here are two bright stars at 100 % for each version:

Close-ups of two bright stars for the four saturation versions
Two bright stars at 100 %, versions A to D from left to right. More saturation brings out the blue of the star rims and the colours in the diffraction spikes; the white cores stay white because they are saturated.

Option 1 again: RGB boosted, but gentle

RGB boosted with continuum-subtracted Halpha and OIII, gently stretched, sky at 0.15
The same boost as in the experiment (continuum-subtracted Hα into red, OIII into green and blue), now with the same gentle stretch, the sky lifted to 0.15 and the stars stretched by the RGB’s own auto-stretch.
SettingValueWhat it does
Sky level0.15The 2nd-percentile level of each image is lifted to 0.15 after stretching (measured: 0.153 in HOO, 0.173 in the RGB boost)
Nebula medianabout 0.27 (HOO), 0.34 (RGB boost)Result of a gentle midtones stretch aimed at a pre-lift median of 0.235
Hα into blue (HOO)15 %Warms the nebula slightly
OIII scale (HOO)×1.8Brings up the weak OIII line relative to Hα
Star stretchSTF of the RGB, linkedShadows 0.000387, midtones 0.00034
Star saturation×1.0 to ×2.6Colour of the stars image scaled around its luminance

Background level: 0.10, 0.125 or 0.15

0.15 can be a little bright, so here are three background levels side by side. The top row is the HOO (option 2) and the bottom row the RGB boost (option 1), at 0.10, 0.125 and 0.15 from left to right. Everything else is identical, including the stars, which are stretched with the linked auto-stretch applied as a histogram transformation.

Six images: HOO and RGB boost, each at sky level 0.10, 0.125 and 0.15
Sky level 0.10, 0.125 and 0.15 (left to right). Top: HOO. Bottom: RGB boost. Measured sky levels: 0.104, 0.128, 0.153 for the HOO and 0.100, 0.125, 0.150 for the RGB boost.

The narrowband boost raises the dark areas of the RGB image a little, so its lift was corrected for that; without the correction the RGB boost sat about 0.02 above its target.

Checking the stars against the stretched RGB

For the stars I followed the usual routine exactly. The linear RGB gets an automatic, linked STF; PixInsight reports shadows 0.00038690 and midtones 0.00034430 (my own calculation gave the same numbers). StarXTerminator splits off the stars, and the same values are applied to the stars image as a histogram transformation. The halo-reduction option makes no difference to the stars image: both extractions came out identical.

The brightest star: full stretched RGB, stars only with default extraction, stars only with aureole removal
The brightest star at 100 %. Left: the complete linear RGB with the STF applied. Middle and right: only the stars image with the same STF applied, extracted with default settings and with aureole removal switched on (identical).

The stars-only version is not brighter than the star in the stretched RGB; its average value in rings around the core is lower (0.63 against 0.79 at the centre, 0.31 against 0.67 at 40 px). What is different is the colour: without the neutral sky behind it, the halo of the stars-only image is a saturated blue ring with a white core, and it ends sooner.

What I see

The first versions are in output/merge2/, and the background variants (option2_HOO_bg0.100…0.150, option1_RGBboost_bg0.100…0.150) and a 0.125 version with more saturated stars are in output/merge3/, together with the stars image from the default extraction. The merge2 files are: the four HOO versions (option2_HOO_userstyle_A…D), option1_RGB_boost_gentle, the StarXTerminator stars image, the STF-stretched stars image and params.json. They are 32-bit XISF in the original orientation, with full-size JPEGs.

13. Third round: the same recipe, in the right order

The second round still had two weaknesses: the stars looked overexposed, and then, once that was fixed, there were far too few of them. The order that works is the one I normally use:

  1. Build the HOO in linear space. Hα goes to red, OIII to green and blue, and a little Hα (15 %) is mixed into the blue channel. The OIII is scaled up by 1.8, because the line is weak.
  2. Blend in some RGB, still linear. The starless RGB, scaled to the HOO level, is mixed in at 0 % or 30 %, which makes the colours more natural.
  3. Stretch that composite with one linked stretch, so it looks natural and the colours keep their relations. The dark areas are lifted to a background of 0.125.
  4. Prepare the stars. Stretch the stars image, then apply SCNR (green, average neutral, luminance preserved) to remove the green cast.
  5. Add the stars with a screen blend, combine(starless, stars, op_screen()), as the last step.
Linear HOO, no RGB blended in, stretched stars screened on top
Pure HOO (0 % RGB).
Linear HOO with 30 percent RGB blended in, stretched stars screened on top
30 % RGB blended in: more natural colour, and a blue glow around the bright stars.

These previews were made by taking every third pixel, without any smoothing, so that faint stars are not averaged away.

Why the stars looked overexposed

The auto-stretch (STF) is strong: with midtones of 0.00034, every star pixel above about 0.03 linear is mapped to nearly white. The brightest star only peaks at 0.08 linear, so it was not clipped in the data; the stretch clipped it, and about 3,800 pixels ended up pure white. That is acceptable next to an equally hard-stretched RGB, but once the nebula underneath is stretched more gently, every star becomes glaring. The stars need a stretch that keeps the highlights: a colour-preserving arcsinh with the white point at 0.2 linear leaves the bright stars with visible colour (about 410 pure-white pixels remain, which are stars that are genuinely saturated in the data).

Why there were too few stars

My stretched version showed about half the stars of the stretched RGB. The cause was a shadows clip. In the full RGB every star sits on a sky level of about 0.0005, so the STF shadows value of 0.000387 lies below the sky and clips nothing that matters. In the stars-only image the sky is zero, so the same clip removes every star whose own peak is fainter than 0.000387, which is most of the faint ones. The StarXTerminator stars image did contain them. With no shadows clip on the stars image and a strong arcsinh (k = 2000) the stars are back: 8,889 stars brighter than 0.30 in the stars image, against 10,638 for the full STF stretch.

The same field: the stretched RGB, and merges with arcsinh strength 150, 600 and 2000
The same 500×500 px field. Left: the STF-stretched RGB. Then the merge with the arcsinh star stretch at strength 150, 600 and 2000 (no shadows clip): the faint stars come back as the strength goes up, while the bright stars stay unclipped.

Why a blue star turned green

The brightest star is blue in the stretched RGB, but in the pure HOO it sits in a teal-green glow. The H and OIII images were made starless before the merge (StarXTerminator, then NoiseXTerminator), and the star itself, its spikes and its core are gone. What remains is a smooth, round brightening of the OIII centred on the star, about 10 % above the sky and fading out by about 150 px. It is not in the Hα. StarXTerminator’s aureole removal made no difference at all (identical numbers), so it is not leftover halo that can be removed; it is in the data.

In the HOO the OIII feeds both green and blue, so that glow shows up as teal. Measured as hue around the star (120° is green, 180° teal, 210° blue): the stretched RGB is 196–207°, the pure HOO is 176–189°, and the HOO with 30 % RGB blended in is 195–203°. So the RGB blend brings the hue back, and letting the RGB take over more strongly around the brightest stars (a soft disc of about 90 px, 90 % RGB in the middle) gives 197–204°.

The brightest star: stretched RGB, pure HOO, 30 percent RGB blend, and RGB taking over near bright stars
The brightest star at 100 %. From left to right: the stretched RGB, the pure HOO (green-teal glow), 30 % RGB blended in everywhere, and the RGB taking over only near the brightest stars (covers 0.4 % of the frame).

The saturation near the star is still higher than in the RGB (about 0.42 against 0.18–0.30), and the white core is smaller, because the stars are stretched with an arcsinh that protects the highlights rather than the STF.

Files: output/merge4/ has the linear-order HOO with 0 % and 30 % RGB; the versions ending in _SCNR_noclip are the current ones, and HOOlinear_RGBlocalblend_starsK2000_SCNR_noclip is the one with the RGB taking over near the bright stars. The earlier versions in that folder had the shadows clip and are missing the faint stars. output/merge3/RGB_stars_default.xisf is the stars image.

14. Fourth round: a matrix to review

The merged image was good, but it was still missing the last finishing steps on the starless nebula. The order I use is: starless HOO (stretched) → NoiseXTerminator → a very gentle unsharp mask → and only then the slightly saturated stars on top. Instead of choosing the settings blind, I prepared a matrix of 27 full-frame images to review: three NXT strengths (none, 0.4, 0.7) × three unsharp-mask amounts (none, 0.10, 0.20) × three star saturations (×1.0, ×1.4, ×1.8). A review page with 100 % crops sits next to the images in output/matrix/.

Decision: no unsharp mask

I measured the noise in a dark patch of sky (the standard deviation of the image minus a slightly blurred copy) for the combinations that matter:

VersionFine noiseMean sky level
no NXT, no USM0.01800.149
NXT 0.4, no USM0.01050.149
NXT 0.7, no USM0.00610.148
NXT 0.4, USM 0.100.04040.184
NXT 0.7, USM 0.200.02740.172
The same dark patch of sky with five different NXT and unsharp mask settings, contrast stretched
The same 500×500 px dark patch at 100 %, contrast-stretched to make the texture visible. From left to right: no NXT; NXT 0.4; NXT 0.4 + USM 0.10; NXT 0.7; NXT 0.7 + USM 0.20. NXT cleans the sky; the unsharp mask puts the speckle back and more.

Even a very gentle unsharp mask turned the sky into salt-and-pepper speckle, made the noise about four times higher than with NXT alone, and also lifted the sky from 0.149 to 0.17–0.18, away from the 0.15 target. It was left out. (If sharpening is wanted later, it would have to be done through a luminance mask that protects the dark sky.)

NXT strength and star saturation

A star field with no NXT, NXT 0.4 and NXT 0.7
A star field at 100 %, stars at ×1.4. Left to right: no NXT, NXT 0.4, NXT 0.7. Noise falls steadily; NXT 0.7 is the smoothest but starts to soften the finest nebula texture.
The brightest star with star saturation 1.0, 1.4 and 1.8
The brightest star at 100 % (NXT 0.4, no USM). Star saturation ×1.0, ×1.4 and ×1.8: more saturation brings out the blue of the star rims and the colour of the diffraction spikes.

Review matrix: output/matrix/index.html. The 27 full-frame JPEGs are in output/matrix/full/, named nxtNN_usmNN_satNN (NXT ×100, USM ×100, saturation ×10). Since the unsharp mask is dropped, the useful ones are the nine with usm0.

15. Fifth round: noise reduction once, and hot pixels

A correctionThe matrix in the previous section applied noise reduction twice: NoiseXTerminator had already been run at 0.6 on the linear starless H, O and RGB, and then ran again on the stretched HOO. The intention was a single NXT pass on the HOO image only. This round redoes the chain correctly, so the NXT numbers in the previous section are not comparable with the ones here.

The order now is:

  1. Starless H and OIII from StarXTerminator, with no noise reduction.
  2. Starless RGB: NXT (denoise 0.90, detail 0.15, one iteration), then hot pixel detection and repair. This RGB is blended in at the bright stars, as before (RGB blend still in).
  3. Linear HOO (H→R, OIII→G+B, 15 % H into blue, OIII ×1.8) with the RGB blended in, one linked stretch, sky at 0.125.
  4. NXT on the stretched HOO (denoise 0.90, detail 0.15, one iteration), then hot pixel detection and repair.
  5. Stars-only image: arcsinh stretch (no shadows clip), SCNR, hot pixel detection, saturation.
  6. Screen the stars on top. No unsharp mask anywhere.

How the hot pixels are handled. A pixel counts as hot when it is brighter than its brightest neighbour by more than six times the local noise (and, for the stars-only image, also more than 2.5 times that neighbour and brighter than 0.03). Only those pixels are replaced, by the median of their eight neighbours; nothing else in the image is smoothed. The data turned out to be very clean:

ImageHot pixels fixed (R / G / B)
Starless RGB, after NXT (linear)a few per channel (7 in B)
Stars-only image, stretched5 / 8 / 23
HOO with 30 % RGB, after NXT5 / 4 / 8
Pure HOO, after NXT5 / 18 / 22

Out of 28 million pixels per channel, that is a few dozen at most, so WBPP (with its darks and rejection) had already removed nearly all of them. The detector is conservative on purpose: lowering the threshold from six to three times the noise would flag 61 pixels, and to two times the noise 1,116, most of which are noise peaks rather than hot pixels.

The current result: HOO with local RGB blend, NXT once on the HOO, hot pixels fixed, stars screened on top
The result of this chain (RGB blended in at the bright stars, star saturation ×1.4), rotated 180° and shown without smoothing.

Files: output/matrix2/ has six full-frame JPEGs (local30_sat10/14/18 and pureHOO_sat10/14/18, in full/), the matching crops, and the 32-bit XISF files final_local30_sat14.xisf and final_pureHOO_sat14.xisf. The NXT values were set explicitly because a fresh headless PixInsight remembers the settings of the last run, so its “defaults” are not stable.

16. Sixth round: noise reduction before the merge

After looking at the comparison I settled on the HOO with the RGB blended in. One more change to the order: NoiseXTerminator goes on the HOO before it is merged with the RGB, and the RGB already has its own NXT. That also matches how NXT is meant to be used, on linear data. The final chain:

  1. Starless H and OIII (StarXTerminator, no noise reduction).
  2. Build the linear HOO (H→R, OIII→G+B, 15 % H into blue, OIII ×1.8) and run NXT on it (denoise 0.90, detail 0.15, one iteration).
  3. Starless RGB: NXT with the same settings, then hot pixel repair.
  4. Merge: the RGB is blended into the denoised HOO (30 %, up to 90 % around the brightest stars), then one linked stretch to a sky level of 0.125.
  5. Hot pixel detection on the stretched result.
  6. Stars-only image: arcsinh stretch, SCNR, hot pixel detection, saturation ×1.4.
  7. Screen the stars on top. No unsharp mask, and no second NXT pass.
Top: NXT after the stretch. Bottom: NXT on the linear HOO before the merge
Top: the previous order (NXT after the stretch). Bottom: NXT on the linear HOO before the merge. Left: a nebula region. Right: the OIII glow around the brightest star, at 100 %.

Measured on the same dark patch of sky (fine-scale noise, as before), the two orders come out about equal: 0.0049 for NXT after the stretch and 0.0055 for NXT before the merge. So the order is not a big difference in noise. In 100 % crops the nebula looks equally smooth in both; the one visible difference is the OIII glow around the brightest star, which has a fine speckled texture in the old order and is smoother in the new one. I kept it because the denoising now happens on linear data, as intended, and because it is the order I normally work in.

Hot pixels: 5 / 8 / 23 on the stars (R / G / B) and 7 / 0 / 1 on the stretched merge, so the merge needed very little repair.

The current result: NXT on the linear HOO, merged with the NXT RGB, hot pixels fixed, stars screened on top
The current result, rotated 180°, stars saturation ×1.4, shown without smoothing.

Files: output/matrix2/v2/ has the full-frame JPEGs (local30_sat10/14/18 and pureHOO_sat10/14/18), the crops, and the 32-bit XISF files final_local30_sat14.xisf and final_pureHOO_sat14.xisf. The linear HOO before and after NXT is output/matrix2/hoo_linear.xisf and hoo_linear_nxt.xisf.

17. Seventh round: separating star luminance and colour

An idea to improve the star colour: treat the luminance and the colour of the stars separately, the way an LRGB image is built.

  1. Make a luminance version of the stars (kept sharp, never blurred).
  2. Make a colour version (the colour ratios R/Y, G/Y, B/Y).
  3. Blur the colour slightly with a Gaussian (sigma 1.5 px; flux-weighted, so the faint halo of a star does not bleed its colour outwards).
  4. Raise the saturation a tiny bit (×1.25 around grey).
  5. Reduce greens and purples: SCNR on green (average neutral, amount 0.8) and a purple/magenta reduction that lifts green towards the lower of red and blue (amount 0.6); the colour is renormalised so it carries no brightness.
  6. Recombine the colour with the original sharp luminance.
  7. Screen the result onto the HOO/RGB image as before.

The idea is sound, and it is standard practice. Two remarks: the blur must only touch the colour, never the luminance, or the stars soften; and the reduction of purple needs its own step, because SCNR on green does nothing about magenta fringes. The hue of the star pixels that carry colour shows what changed:

StarsGreenPurple / magentaBlueOrange / red
Previous stars (SCNR + saturation ×1.4)0.0 %3.4 %44.4 %51.9 %
Luminance/colour recipe0.0 %1.3 %45.9 %52.7 %
Top: previous stars. Bottom: the luminance/colour recipe. Three regions: the brightest star, a star field, a dark area
Top: previous stars (saturation ×1.4). Bottom: the luminance/colour recipe. Left: the brightest star with its diffraction spikes. Middle: a star field. Right: a dark nebula region. All at 100 %, shown with plain pixel enlargement.

What changes: the purple tinge on the diffraction spikes largely disappears, and the spikes become cleaner blue and orange. The purple share of the star pixels with colour drops from 3.4 to 1.3 %. The greens were already gone after SCNR. The stars stay as sharp as before, since the luminance is unchanged. The differences are subtle in the star field and at this scale; the diffraction spikes of the brightest star are where it shows. Not yet decided: whether to adopt it, and the exact values (blur sigma, saturation, purple amount).

Files: output/matrix2/v3_starcolour/ (final_local30_yourrecipe_stars.xisf, the full-frame JPEGs and the comparison image); script docs/scripts/03_hoo_rgb_merge/starcolour.py.

18. Eighth round: adjustments by hand on the starless image

Before the stars go back on, the starless HOO+RGB image (output/adjust/HOORGB_starless_stretched.xisf, stretched, NXT on the linear data, hot pixels repaired) was adjusted by hand in PixInsight. This is the one stage that is not scripted. The order was: curves, then histogram, then unsharp mask.

PixInsight dialogs: UnsharpMask, CurvesTransformation and HistogramTransformation on the HOORGB starless image
The three process dialogs as they were used on HOORGB_starless_stretched.
StepSettingsEffect
1. CurvesTransformation, RGB/K (all channels together)A curve with 7 points, gently S-shaped. Read from the screenshot, approximately (input → output): 0 → 0, 0.12 → 0.10, 0.30 → 0.31, 0.42 → 0.455, 0.63 → 0.66, 0.75 → 0.73, 1 → 1Slightly darker lows, brighter mid-tones (about +0.03 around 0.4–0.6), and the top end held back so the bright red arc does not clip
2. HistogramTransformation, RGB/KShadows 0.02531646 (56,124 pixels = 0.197 % clipped), highlights 0.97215190 (28,836 pixels = 0.101 % clipped), midtones 0.48930481Moves the black point up and the white point down a little for more contrast, and a very slight mid-tone lift
3. UnsharpMaskStdDev 1.30, amount 0.76, target Lightness (CIE L*), deringing off, dynamic range extension offSharpens the lightness only, so colours are not touched

The curve points are read off a screenshot, so they are approximate; the histogram and unsharp-mask values are exact. The saved result of these three steps is what the stars will be screened onto.

The stars added, and what the adjustment did to the noise

The adjusted starless image was saved over the original file; a backup copy is output/adjust/HOORGB_starless_adjusted_BACKUP.xisf. The stars were then screened on with combine(starless, stars, op_screen()), in four versions: the previous stars at saturation ×1.0, ×1.4 and ×1.8, and the luminance/colour version. The results are in output/adjust/final/ (32-bit XISF, original orientation, plus rotated JPEGs and a crop comparison).

Measured against the version before the hand adjustments:

BeforeAfter
Sky level (2nd percentile of lightness)0.1430.104
Fine-scale noise, dark sky patch0.00360.0141
Fine-scale noise, glow around the brightest star0.00440.0140
Pixels at the white limit0.051 %0.051 %
Glow around the brightest star, before and after the hand adjustments, enlarged
The same 200×200 px area of the OIII glow, enlarged 3× without smoothing. Left: before the hand adjustments. Right: after curves, histogram and unsharp mask. The contrast is stronger and the filaments in the glow are more visible, but the grain is about three times higher.

So the unsharp mask (amount 0.76, sigma 1.3) brings out structure and also amplifies the noise by about a factor of three to four; it is no posterisation, since the file has hundreds of thousands of distinct levels. The sky level also moved from about 0.14 to 0.10. Possible ways to keep the sharpness and lose some of the grain: a lower amount (for example 0.3–0.4), a larger sigma, or a lightness mask so that the smooth sky and glow are protected. The versions without any unsharp mask are still available.

Two things to watch (before the result was checked): the histogram step clips 0.2 % of the pixels in the shadows and 0.1 % in the highlights, and the sky level drops from the 0.125 it was built at. And the unsharp mask here is much stronger (amount 0.76, sigma 1.3) than the 0.10–0.20 tried earlier on the whole frame, which already put speckle into the dark sky. This time it is applied to the lightness of an image that already has NXT and a contrast curve, and the speckle may behave differently, so the dark sky is worth checking at 100 % before the stars are added.

19. Decision log

Astrophotography is a matter of experimenting, so here is every decision taken since WBPP, with the reason.

DecisionWhy
Check every panel edge for bright stars, mask the clipped copy, merge with edge shrink 0Truncated stars and a thin overlap produced dark holes and a wedge at the panel joins
Crop all five mosaics to one rectangle 160 px inside the dataStars on the outer border cannot be masked; a common crop keeps the filters aligned
Process RGB, H and OIII separately, merge lateRGB carries colour and stars; narrowband carries detail and is much deeper
Option 2 (HOO with RGB stars) as the main route, option 1 as a variationBest nebula contrast; the natural-colour boost is kept as a comparison
Build the HOO in linear space (H→R, OIII→G+B, 15 % H into B, OIII ×1.8), blend in 30 % RGB, then one linked stretchKeeps colour relations; separate stretches had made the OIII dominate
Sky background at about 0.125 (0.10–0.15 compared)No real sky is pure black; 0.15 was slightly bright
Stars from the linear RGB with StarXTerminator, stretched on their own with an arcsinh, no shadows clip, SCNR appliedThe STF stretch clipped bright stars; its shadows clip deleted the faint ones from a stars-only image; SCNR removes the green cast
RGB takes over locally around the brightest starsThe OIII glow around the star made a blue star look green
Stars added last with a screen blendMatches the usual workflow and keeps the stars independent of the nebula stretch
NoiseXTerminator on the linear HOO and on the starless RGB, each before they are merged; no second pass and no unsharp maskNXT cleans the sky; even a very gentle USM added speckle and lifted the sky level; running NXT twice was a mistake that was corrected
Hot pixel detection after NXT, on the HOO, the starless RGB and the stars-only imageConservative detector: only isolated outliers are replaced, nothing is smoothed
RGB blended into the HOO (30 %, more around bright stars) rather than pure HOONeutral sky instead of a green-teal cast, and a more natural colour around the bright stars; chosen from the side-by-side comparison
Hand adjustments on the starless HOO+RGB before the stars: curves (gentle S), histogram (shadows 0.0253, highlights 0.9722, midtones 0.4893), unsharp mask (sigma 1.3, amount 0.76, lightness)Contrast and sharpness are matters of taste and done by eye; stars are added only afterwards
Star colour: separate luminance and colour, blur the colour slightly, trim greens and purples (tested, adoption open)Cleaner diffraction spikes and fewer purple fringes without softening the stars
Annotated version of the result shown on mouse-over: PixInsight AnnotateImage grid and catalogue labels, plus my own label boxes, north/east arrows and a 10′ scale barLets the reader find the stars and the nebula; the blog shows it on hover, tap or button
A red ellipse on the annotated image marking where the Pelican shape is (outlined by the author on a screenshot; centre and size taken from it)The nebula is named after a shape that is hard to see in a wide, rotated field; the marker shows the reader where to look
Size comparison with the full Moon, as a separate figureGives the reader a feeling for the field (about 57′ × 58′, 1.8 Moons wide); kept off the annotated image on purpose
A section on hidden objects found by converting catalogue positions (SIMBAD) to pixel positions with the plate solution, checking each on the image, and reading the papersGives the reader something to look for, and avoids claims that cannot be verified: only objects whose positions were verified are shown; statements that are my own reasoning are marked as such
Images shown rotated 180°So that the Pelican reads the right way up

Not yet decided and left open on purpose: NXT strength (0.4 or 0.7), star saturation (×1.0, ×1.4 or ×1.8), and whether to fix the brightness step along the panel join.

Still open: the star saturation (×1.4 is used for now), the slight brightness step along the join between the top and bottom panels, and the strong teal OIII glow around the brightest star on the left.

20. Lessons for scripting PixInsight

21. Caveats and what’s next

The next stage is the finishing: final colour and contrast adjustments on the merged image, a decision on the panel seam and the OIII glow, and an export. The files to start from are listed at the end of section 17.

22. Paths not taken

These did not make it into the final pipeline, but they are worth keeping: the very first exploratory round, before the real iterative process (rounds 2 onward) took over, and a list of smaller options that were tried or considered and set aside. Nothing here is part of the workflow above.

The three merges: first drafts

Astrophotography is a matter of experimenting. These were the first attempts at each merge option, kept here as they were; they were stretched much harder than I like, and the next section redoes two of them the way I normally work.

All three options were built from the same ingredients, so they can be compared fairly. The starless/stars split was done with StarXTerminator (with aureole removal switched on for the RGB, to take the big halos out of the starless image), followed by NoiseXTerminator at 0.6 on each starless layer, while the data were still linear. The continuum factors were measured from the stars themselves, about 6,000 unsaturated star pixels: Hα/R = 0.395 and OIII/G = 0.484. Stars were stretched separately and lightly, then screen-blended back on top of every variant.

Option 1 · RGB boosted with continuum-subtracted narrowband

Option 1: RGB image with Halpha and OIII added to the red, green and blue channels
Hα (continuum-subtracted) added to red, OIII to green and, a little less, to blue, in linear data, then one colour-preserving stretch. The colours stay natural: red Hα glow, brown dust, blue stars.

Option 2 · HOO starless blend with RGB stars

Option 2: bicolour image with Halpha as red and OIII as green and blue, with RGB stars
Starless Hα as red, starless OIII as green and blue, with both channels sharing one stretch curve and the OIII scaled up by 1.8 so it shows. The nebula is deeper red with teal accents. The first version stretched each channel on its own and came out almost entirely cyan, which overstated the weak OIII.

Option 3 · Narrowband as luminance, RGB for colour

Option 3: RGB colour with the lightness replaced by a narrowband mix
The lightness is 70 % narrowband (a 75/25 Hα/OIII mix) and 30 % RGB, with the colour taken from the RGB. It has the most contrast and the finest detail, and it shifts towards magenta in the mid-tones.
Colour sourceDetail sourceLook
1RGB, plus narrowband addedRGB + Hα/OIII boostNatural, red glow, brown dust
2False colour: Hα→R, OIII→G,BHα and OIIIDeep red with teal accents, darkest sky
3RGBHα/OIII luminanceMost contrast, magenta-leaning

What I saw, and what still needed work

All intermediate and final files are in output/merge/: the starless and stars images, the three results as 32-bit XISF (option1_RGB_boost.xisf, option2_HOO_starless_RGBstars.xisf, option3_NB_luminance.xisf) with full-size JPEGs, and a small JSON file with the weights used.

What was tried or considered, and not chosen

OptionWhy it was not chosen
Reproject the panels with StarAlignment in union modeUnion modes only work on open views, not on files, so the plate solutions were used instead
The default GradientMergeMosaic edge shrink (1 px)It erased the thin overlap and left a dark wedge at the left edge
An aggressive mask that blanked every duplicate halo where panels overlap thinlyIt left large black areas where the blanked region ended
Option 3, narrowband as luminanceMost contrast and detail, but the colour leaned magenta; not developed further after the first draft
The first HOO, with each channel stretched on its ownIt came out almost entirely cyan because the weak OIII was stretched as hard as the Hα
A hard stretch with a black skyThe black was too black; no sky is that dark
Sky at 0.15 as the only targetJudged slightly bright, so 0.10 and 0.125 were compared (0.125 is currently used)
Stretching the stars with the full STF of the RGBClipped about 3,800 pixels in the bright stars’ cores
Reusing the STF shadows clip on the stars-only imageIt deleted most of the faint stars, because that image has no sky level
Aureole removal in StarXTerminator as a fix for the star problemsIt made no difference to the stars image; the problem was elsewhere
Using aureole removal on the narrowband to remove the glow around the left starNo change either; the OIII glow is in the data
A gentle unsharp mask (0.10 and 0.20)Added speckle to the sky and lifted its level; noise rose about fourfold
Stretching the stars with a gentler midtones curve (S2)Kept the highlights but lost the faint stars; the arcsinh handled both better
Doing the narrowband blend at 0 % RGB everywhereThe pure HOO leaves the bright stars sitting in a teal glow; kept as a comparison only

Not yet decided and left open on purpose: NXT strength (0.4 or 0.7), star saturation (×1.0, ×1.4 or ×1.8), and whether to fix the brightness step along the panel join.