PixInsight Script · Version 1.1.0

LinearPatternCorrection

Detect defective rows or columns, inspect the selected-line model, and subtract the corresponding pattern in one continuous PixInsight workflow.

PixInsight 1.9.4+ Pure PJSR No Python macOS and Linux
PixInsight interface

Detection, inspection and subtraction in one window

The selected-defect mask updates from the detection controls, while subtraction settings and bright-structure protection remain available in the same interface.

BB Linear Pattern Correction 1.1.0 interface showing defect detection, subtraction settings, bright-structure protection and the selected-defect mask
One interface

Why this script exists

PixInsight normally separates linear pattern correction into two scripts. LinearDefectDetection creates a table of defective lines, then LinearPatternSubtraction reads that saved table and builds the correction. LinearPatternCorrection joins those operations without asking you to save and reload an intermediate file.

1

Detect

Find complete or partial defective rows and columns with PixInsight's standard detection engine.

2

Inspect

Review the exact selected-defect mask or the line model while detection parameters are adjusted.

3

Subtract

Send the selected lines directly to the standard subtraction engine and apply the correction to the open image.

New in 1.1

Bright-structure protection

A galaxy core, a broad arm, or another extended bright feature can resemble a partial line to the detector. Version 1.1 checks the surrounding band and rejects partial-line candidates dominated by real extended signal.

Complete defective rows and columns are never rejected by this protection. The option is enabled by default and can be disabled for diagnostic comparisons.

Live model controls

  • Selected-defect mask showing the exact retained segments
  • Line-model view with display-only stretching
  • Automatic recalculation after a one-second pause
  • Manual update mode for very large images
  • Detected-lines-only or whole-pattern correction
  • Optional background preview selection

Default detection values

Parameter Default
Layers to remove 8
Rejection limit 3
Entire-line threshold 4
Partial-line threshold 4
Image shift 50

Default subtraction values

Parameter Default
Layers to remove 9
Rejection limit 3
Global rejection 3

If no background preview is selected, the script evaluates a 3 by 3 grid and uses its lowest-median region. A clean manual preview is preferable when the target fills most of the frame.

Typical workflow

  1. Open the image to correct.
  2. Optionally create a preview over representative background.
  3. Launch Script > BB-Astro > LinearPatternCorrection.
  4. Choose rows or columns and adjust detection parameters.
  5. Inspect the selected-defect mask or line model.
  6. Choose selected defects or the entire pattern.
  7. Select the background preview if one was created.
  8. Click Apply correction.

Requirements

  • PixInsight 1.9.4 or later
  • An open main image view
  • Standard LinearDefectDetection and LinearPatternSubtraction engines
  • No external Python environment

The script delegates detection and subtraction to PixInsight's installed engines and adds the unified interface, compatibility adapters and protection layer.

Install from PixInsight

Available from the BB-Astro repository

Add the repository once, check for updates, apply LinearPatternCorrection, and restart PixInsight. The package is available for macOS and Linux.

Installation guide View source