Skip to content
 
 

Repository files navigation

PhotoPolarAlign

License: Unlicense

A python utility to help align any equatorial telescope by imaging the Celestial Pole region.

Forked from Themos Tsikas https://github.com/ThemosTsikas/PhotoPolarAlign Inspired by Dave Rowe https://web.archive.org/web/20210126061304/http://www.considine.net/aplanatic/align.htm

📖 Table of Contents

Overview

PhotoPolarAlign (PPA) is Python utility that can be used to Polar Align any Equatorial Telescope setup. It works by capturing images of the celestial pole region in two orientations, plate solving their positions, and calculating the error. Users can adjust the telescope and retest for fine alignment.

Forked from the original https://github.com/ThemosTsikas/PhotoPolarAlign.git

Features

✔️ Graphical User Interface (GUI)

✔️ Supports Nova API & Local Plate Solving

✔️ Provides Alignment Error

✔️ Works with Any Camera Setup

✔️ Works in Both Hemispheres

✔️ Telescope only needs to be within 25 Degrees of Either Celestial Pole

What it Doesn't Do

Take Pictures with Your Camera

Automatically Align your Telescope

Point you to a Celestial Object

Installation

In the Releases tab on the right, go to the latest version and download the program for your computer type.

Or run the source

For NixOS
  1. Clone this repository
git clone https://github.com/SudoWatson/PhotoPolarAlign.git &&
cd PhotoPolarAlign
  1. Enter development shell
nix develop ./nix
  1. Run
python PPA.py

Setup

On first startup, a settings page will appear. This can be reaccessed at any time by going to Files > Settings. If you have internet access when you are imaging, you can use https://nova.astrometry.net to plate solve your images online. If not, you'll have to install a local plate solver on your device.

Nova
  • Create an account on https://nova.astrometry.net
  • In the top navigation bar, go to "API"
  • In the middle in green text is your API key. Copy this, and paste it in the PPA settings where it asks for your nova key
Local Plate Solving

Plate solving in local mode runs much faster than Nova (online) and does not require any internet connection. There are several local plate solvers you can use, currently the documentation is written for just Astrometry.net on Linux/MaxOS/WSL, and All Sky Plate Solver for Windows.

Linux/MacOS Astrometry.net provides a downloadable software for doing plate solving on Linux and MacOS systems, as well as potentially Windows Subsystem for Linux (WSL).
  1. Download astrometry.net: apt install astrometry.net (MacOS use brew) The installation will create the config file astrometry.cfg in the /etc directory

  2. Download the star index files for the size of images you will be taking. These files contain landmarks of celestial objects to determine where your photo is in the sky. The index files are specific to the FOV your images cover in the sky. Smaller FOVs will need more landmarks and thus larger file sizes. Use this website to determine what files you will want: https://astrometrynet.readthedocs.io/en/latest/readme.html

  3. Move the index files to the directory: /usr/share/astrometry

  4. Launch PPA.py

  5. Open Photo Polar Align ‘Setting’ window

  6. Fill out the following settings in ‘Local Solver Configuration’:

  • shell: /bin/bash --login -c “%s”

  • scale: Commonly 1 or 2 (do some testing if you wish, or set to 1 if you don't wish)

  • configfile: /etc/astrometry.cfg

  • scale_units: arcsec/pix

  • scale_low and scale_hi: These define the lower and upper limits of the arcsec/pix value and allow you to reduce any platesolver measurement errors (you can get arcsec/pix value for your specific photographic setup reading it in Nova solving output)

  • extra: You can apply more advanced options. Options available are documented at https://manpages.debian.org/testing/astrometry.net/solve-field.1.en.html

  1. Click 'Ok': the PPA.ini file will be saved in the config directory (usually ~/.config/PPA).
Windows
  1. Install the ASPS software from: https://www.astrogb.com/astrogb/All_Sky_Plate_Solver.html It will create its ~/astrometry/data directory where, through a specific function, it will allow to select the necessary index files and downloading these from the Internet.

  2. the configfile is 'backend.cfg'

  3. Launch PPA.py

  4. Open Photo Polar Align ‘Setting’ window

  5. Put the following data in ‘Local Solver Configuration’:

  • shell: C:/Users/<user>/AppData/Local/Astrometry/bin/bash --login -c "%s"

  • scale: Commonly 1 or 2 (do some testing if you wish, or set to 1 if you don't wish)

  • configfile: /etc/astrometry/backend.cfg

  • scale_units: arcsec/pix

  • scale_low and scale_hi: These define the lower and upper limits of the arcsec/pix value and allow you to reduce any platesolver measurement errors (you can get arcsec/pix value for your specific photographic setup reading it in Nova solving output)

  • extra: -p You can apply more advanced options. Options available are documented at https://manpages.debian.org/testing/astrometry.net/solve-field.1.en.html We use the "-p" option to avoid the warning: FITSFixedWarning: The WCS transformation has more axes (2) than the image it is associated with (0) [astropy.wcs.wcs] related to output: "solve-field.c:327:plot_source_overlay Plotting command failed" Windows doesn't have "plotxy" function (it is Linux environment only), but the function is not necessary for us.

  1. Click 'Ok': the PPA.ini file will be saved in the PhotoPolarAlign directory.

Usage

  • First, roughly align your telescope with the Celestial Pole region visible in your cameras view from 2 angles, roughly 90 degrees apart.
  • Take 2 images: The first vertically, and the second roughly 90 degrees clockwise horizontally. Do not move your telescope's RA/DEC. Get the images onto your computer with PPA installed.
  • Open PolarPhotoAlign
  • The top part of the interface contains three buttons for uploading your images.
  • The two camera buttons on the left are used to input the two initial calibration images you just took (vertical camera for the vertical image, horizontal for horizontal).
    • "Solved!" in red means the image has yet to be solved.
  • Use the "nova" or "local" button next to each to run the respective plate solving method (they are grayed out if that mode is not configured to run).
    • You can watch the terminal to view the status of the solve request. You cannot do anything in the UI until this request finishes.
    • Do not go to your submission in https://nova.astrometry.net to attempt to view it's status, as that will close the connection with the program. If you want to view the status of your submission, you can go to the API link that PPA puts into the terminal.
    • "Solved!" in green means the image has been solved.
  • Once the two calibration images are solved:
    • Click "Find Celestial Pole" to compute and display the alignment error in DD:MM:SS.
    • An image will display showing where you are pointed as compared to the actual Celestial Pole.
    • The error in DD:MM:SS will display for each axis.
  • Manually adjust your telescope's ALT/AZ to improve your error.
  • You can check your new alignment:
    • Take a single new image and load it using the rightmost button.
    • Solve it using the same plate solving method.
    • Click "Show Improvement" to see the new error.
    • Repeat this step until your error is small enough

Building

For testing changes to the program or building the source to run on hardware that don't have installation binaries, you can easily download and run the source code.

  1. Make sure you have Python 3 installed on your device
  2. Clone this repository
git clone https://github.com/SudoWatson/PhotoPolarAlign.git &&
cd PhotoPolarAlign
  1. Install TKinter if it does not come with your Python installation
apt install python3-tk
  1. Create a Virtual Environment
python -m venv --system-site-packages .venv &&
source .venv/bin/activate
  1. Install Required Python Packages:
pip install -r requirements.txt
  1. Run
python PPA.py

Or, on NixOS:

  1. Clone this repository
git clone https://github.com/SudoWatson/PhotoPolarAlign.git &&
cd PhotoPolarAlign
  1. Enter development shell
nix develop ./nix
  1. Run
python PPA.py

To build the application:

  1. pip install pyinstaller
  2. pyinstaller --onefile --add-data "assets:assets" PPA.py
  3. Result will be in ./dist/ folder

About

A python utility to help align equatorial telescopes by imaging the Celestial Pole region.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages