How to process a comet in PixInsight: the complete workflow
- Jeremy Likness

- 1 day ago
- 3 min read
Comets are stunning celestial visitors, but they present a unique challenge in astrophotography: they move across the sky during your imaging session at a different rate than the stars. If you stack your frames normally, the comet smears into a streak. If you align against the comet, the stars smear. This guide shows you how to create a clean image with sharp stars and a crisp comet using PixInsight.

Overview of Steps
Weighted Batch Preprocessing
Star Extraction
Comet Alignment
Comet Integration
Post-Processing
Everything here is demonstrated in the video: How to Process a Comet in PixInsight.
1. Weighted Batch Preprocessing
Start by calibrating and integrating your data. You can use WBPP or do it manually.
Manual Calibration Workflow:
Integrate bias frames → master bias per ISO/Gain.
Integrate dark frames → master dark per exposure and ISO/Gain.
Calibrate darks with master bias.
Calibrate dark flats with calibrated darks.
Integrate dark flats → master dark flat.
Calibrate flats with master dark flat.
Integrate flats → master flat.
Calibrate lights: subtract master dark, divide by master flat.
Optionally apply cosmetic correction.
Debayer (de-mosaic) lights.

Star-align (register) lights.
Integrate registered lights.

Result: A star-aligned image with perfect stars—but a smeared comet. Call this "star-integrated".

2. Star Extraction
Next, isolate the stars. Use StarXTerminator or StarNet++ to create a star-only image. Save it as stars.fits or .xisf.
💡 Tip: If the comet’s bright core sneaks into the star image, use CloneStamp to remove it. We want only stars here.

3. Comet Alignment
Run CometAlignment on the registered frames:
Load the registered frames.
Mark the comet nucleus in the first frame.
Mark the nucleus in the last frame. PixInsight calculates positions for intermediate frames.

In the Subtract section, specify the star image and choose Stars Aligned. This removes stars from each frame, leaving just the comet. Residual star ghosts will average out during stacking.

Result: Comet-aligned frames with minimal star trails.
4. Comet Integration
Use ImageIntegration on the comet-aligned frames. You’ll get the comet plus some edge noise from cropping.

Now blend the stars back using PixelMath:
~(~$T*~stars)Here $T is the integrated comet image. This formula smoothly reintegrates stars.
Result: A clean image with sharp stars and a crisp comet.

5. Post-Processing
Treat the image like any deep-sky object:
Dynamic Crop
Automatic Background Extraction
Dynamic Background Extraction
Plate-solve if needed
Spectrophotometric Color Calibration
BlurXTerminator
EZ Soft Stretch
Curves, noise reduction, and masks to enhance comet detail
Final Result: A stunning comet image with pinpoint stars—no streaks, no trails.

The same technique benefitted me when I photographed the comet 12P/Pons-Brooks as it passed the bright star Hamal. This is "The Devil's Diamond."

In summary
Use WBPP or manual calibration for clean star stacks.
Extract stars early for subtraction during comet alignment.
CometAlignment + PixelMath = smooth integration.
Finish with standard post-processing for best results.


Comments