starsolve for PixInsight
========================

Blind plate solving and annotation for PixInsight using the local starsolve
solver. Solves the active view, writes the astrometric solution into the view
and renders an annotated copy in a new window (RA/Dec grid, constellation
figures, deep-sky objects and named stars).

Everything runs on your own computer. Nothing is uploaded.


Install
-------

1. Extract this folder somewhere you keep PixInsight extras, for example:

      Linux / macOS :  ~/PixInsight/starsolve
      Windows       :  C:\PixInsight\starsolve

2. In PixInsight, open  Script > Feature Scripts...  and click  Add , then
   choose the  starsolve.js  file in this folder. (You can instead add the whole
   folder.) The script appears under  Script > Astrometry > starsolve .

3. The star database, starsolve.ssdb, must be available. If it is not already in
   the data/ folder of this package, download it (118 MB) from the starsolve
   website and put it in  data/  next to starsolve.js. The script's dialog also
   has a  Download  button that fetches it for you, and you can point the script
   at a copy anywhere on your disk; the path is remembered.


Use
---

1. Open an image (FITS, XISF, or any other format PixInsight reads).
2. Run  Script > Astrometry > starsolve .
3. Check the solver folder, the star database and the layers you want, then
   click  Solve & Annotate .

The active view gets the astrometric solution (visible in the ImageSolver
status bar and usable by PixInsight's own tools), and an annotated copy opens
in a new window named  <image>_starsolve .


Layout
------

  starsolve.js                 The PixInsight script.
  starsolve.svg                Its icon.
  bin/linux/                   astap_cli, starsolve   (64-bit Linux)
  bin/windows/                 astap_cli.exe, starsolve.exe  (64-bit Windows)
  bin/macos/                   astap_cli, starsolve   (64-bit macOS)
  data/starsolve.ssdb          The star database (if bundled).
  data/catalogs.bin            Deep-sky and star-name catalogues for the overlay.


Notes
-----

* The solver is blind: it needs no starting position or scale.
* Best for fields from about 1 degree to over 100 degrees across. At long focal
  lengths (roughly over 1000 mm, a field narrower than about 1 degree) it may
  not solve every frame.
* Windows and macOS may warn about an unsigned program; allow it to run.
* Missing library on Linux? The script clears LD_LIBRARY_PATH for the solver so
  PixInsight's bundled libraries are not used by it.
