Getting Started

Install BB-Astro PixInsight Scripts

Install BB-Astro scripts on macOS or Linux. The repository automatically selects the release compatible with your PixInsight version.

Current release

PixInsight 1.9.4 and V8 support

The scripts have been ported to PixInsight's V8 JavaScript runtime. They run natively on Apple Silicon and remain supported on Linux. Legacy packages are still available automatically for older PixInsight installations.

Current

PixInsight 1.9.4+

V8 releases for macOS Apple Silicon, macOS Intel and Linux x64.

  • LAcosmic1.1.1
  • DeepCosmicRay2.2.1
  • CosmeticCorrection2.2.0
  • LinearPatternCorrection1.1.0
  • StripeField0.2.6
Automatically retained

PixInsight 1.8.0 to 1.9.3

Historical JavaScript releases for Linux x64 and Intel Mac. No manual package selection is required.

  • Same repository URL
  • Version selected by PixInsight
  • No V8 code installed on a legacy core
What changed in July 2026: V8-compatible interfaces, Apple Silicon support, Linux release routing and updated event processing without the deprecated processEvents() warning. LinearPatternCorrection 1.1.0 adds a unified live defect workflow with bright-structure protection. StripeField 0.2.6 adds a reusable PixInsight process icon and keeps the signed quality-control model.

Which scripts need what

Script Does Needs Python
CosmeticCorrection Hot and cold pixel removal on the active view No
LinearPatternCorrection Live linear defect detection and pattern subtraction No
StripeField Oriented row-bias field modeling for linear Hubble mosaics Yes
LAcosmic Cosmic ray removal, L.A.Cosmic (van Dokkum 2001) Yes
DeepCosmicRay Cosmic ray removal, deep learning (Zhang & Bloom 2020) Yes

Three steps, about five minutes. If you only want CosmeticCorrection or LinearPatternCorrection, you are done after step 2.

LAcosmic, DeepCosmicRay and StripeField drive Python through a shell wrapper, so they run on macOS and Linux. CosmeticCorrection and LinearPatternCorrection are pure PJSR and need no Python.

1Add the repository

In PixInsight, open Resources > Updates > Manage Repositories, click Add..., and paste this URL:

https://bb-astro.github.io/BB-Astro_Repository/

Click OK. You only ever do this once.

2Install the scripts

Go to Resources > Updates > Check for Updates. The BB-Astro scripts appear in the list. Select the ones you want, click Apply, then restart PixInsight.

They land under Script > BB-Astro.

PixInsight Script Menu Location

PixInsight will tell you about updates from now on. To check by hand: Resources > Updates > Check for Updates.

The scripts do not appear after updating PixInsight

PixInsight may still be using a cached repository manifest. Use this exact sequence:

  1. Open Resources > Updates > Reset Updates.
  2. Restart PixInsight.
  3. Open Resources > Updates > Check for Updates.
  4. Apply the BB-Astro updates and restart once more.

3Let the script set up Python

Skip this if you only installed CosmeticCorrection or LinearPatternCorrection.

Open an image first, then launch LAcosmic, DeepCosmicRay or StripeField.

The BB-Astro scripts operate on the active image. If no image is open, there is nothing to process and the interface will not start.

Each one checks its Python environment before opening. If it is missing, it asks whether to build it. Click Set up now and watch the progress in the PixInsight Console. You can abort from there. There is nothing to type and no Terminal involved.

LAcosmic and StripeField install their scientific Python packages without a neural-network runtime. DeepCosmicRay downloads about 850 MB, almost all of it PyTorch, so give it a few minutes on a normal connection. Once the script says Setup complete, launch it again if its dialog does not open automatically.

I would rather run it from a Terminal

Same script, run by hand:

bash /Applications/PixInsight/src/scripts/BB-Astro/install_lacosmic.sh bash /Applications/PixInsight/src/scripts/BB-Astro/install_deepcr.sh bash /Applications/PixInsight/src/scripts/BB-Astro/install_stripefield.sh

On Linux the path is /opt/PixInsight/src/scripts/BB-Astro/ by default. Add --yes to skip the prompts.

Why not just pip3 install?

Because it does not work, and that is not a matter of taste.

Homebrew and most Linux distributions mark their Python as externally managed (PEP 668) and refuse to install anything into it. The packages have to live in a virtual environment, which is what the setup script creates, under ~/.bb-astro.

DeepCosmicRay adds a second constraint: it needs Python 3.10 or 3.11, and both ends are hard. PyTorch requires 3.10 or later. deepcr is published as source only, and its build script breaks on 3.12 and above. So a plain pip3 install deepcr on a current system Python fails outright. The setup script finds a suitable interpreter, and can fetch a standalone CPython 3.11 through uv if you have it.

If it cannot find one, install it and run the setup again:

macOS

brew install python@3.11

Debian / Ubuntu

sudo apt install python3.11 python3.11-venv

Did it work?

The script tells you when it opens: the Console shows Python OK followed by the interpreter it will use. If the dialog opens, you are set.

To check from a Terminal without launching PixInsight:

bash /Applications/PixInsight/src/scripts/BB-Astro/run_deepcr.sh --probe

It prints the interpreter that would actually run, or explains what is missing. The same probe is available through run_lacosmic.sh and run_stripefield.sh.

When something goes wrong