Astronomical Field of View (FOV) & Image Scale Calculator for Astrophotography
π The Journey Behind Accdc Accdc (Astronomy CCD Calculator) has been an evolving project built out of passion for astronomy and technical precision.
I started building this app in 2009 and over the years, the application has gone through multiple iterations across different environments and languages. It initially gained widespread adoption across the astronomy community in its Java-based releases (notably v4.8) distributed as a portable, cross-platform tool on major software portals like SourceForge and Softpedia. Even back then, it pioneered integrating optical calculations with real sky survey downloads directly from the NASA SkyView (DSS) engine.
π A Renewed Vision: The Modern Python & Qt6 Era After a period of evolution and refining requirements, Accdc has been completely rebuilt from the ground up to push accuracy, speed, and user experience even further.
Accdc is an open-source desktop application built with Python 3 and PySide6 (Qt6) designed for amateur astronomers and astrophotographers. It helps you accurately simulate, plan, and visualize how deep-sky objects (nebulae, galaxies, star clusters) fit into your telescope and camera sensor frame.
Beyond optical formulas, Accdc queries astronomical databases (SIMBAD / NED via Astroquery) and local high-precision catalog databases (.dat), automatically fetching real sky survey imagery (STScI Digitized Sky Survey - DSS). It projects an interactive sensor field-of-view (FOV) rectangle over the sky background, complete with real-time rotation, pan/drag offsets, optical flips, smooth zooming, hardware management, and ASCOM telescope control.
This new architecture represents a full commitment to delivering a modern, robust, and extensible tool built for the modern astrophotographer.
ποΈ 1. Panel (Main Workspace & FOV Visualizer)
Main control area for setting optical parameters (focal length, aperture, CCD pixel size), querying target coordinates, rendering real-time DSS background imagery, dynamic sensor FOV overlays, image rotations, and ASCOM slew execution.
π 2. Catalogs (Local Astronomical Datasets)
Quick selector for deep-sky targets from local astronomical catalog files (Messier, NGC, IC, Barnard, Caldwell, SAO, Lynds, etc.) with exact coordinate resolution.
π 3. Historic (Search Log & Query Recall)
Log of all previous target queries. Double-clicking any historical record automatically reloads all optical and target parameters directly into the main Panel.
π 4. Network (Real-Time Community Sharing)
Live feed connected to Firebase Realtime Database showing target queries shared by other astrophotographers globally. Includes right-click features to export community hardware setups into your own local database.
π 5. Instruments (Equipment Profiles Management)
Custom inventory manager to add, edit, reorder, and persist your telescopes (aperture, focal length) and CCD/CMOS cameras (pixel sizes, matrix resolution).
π 6. Night Planner (Nightly Visibility Planner)
Automated visibility planner that queries all local astronomical catalogues and returns every deep-sky object currently above your configurable minimum altitude. Each result shows real-time moon angular separation, meridian transit time, and transit altitude β allowing you to quickly identify the best targets for the current night from your exact location.
βοΈ 7. Settings (User Profile, Location & ASCOM Alpaca Configuration)
Configuration panel for observatory latitude/longitude (used by the Night Planner), network participation, username, country selection, ASCOM / Alpaca and INDI telescope server connection details (IP address and port). ASCOM and INDI connections are mutually exclusive and enforce each other automatically.
-
Real-Time Optical Calculations:
- Image Scale in arcseconds per pixel.
- Field of View in arcminutes and degrees.
- Telescope focal ratio.
-
Interactive FOV Sky Visualizer:
- Automatic download and caching of DSS sky survey images for any celestial target.
- Interactive sensor rectangle overlay rendered accurately to scale.
- Sensor camera rotation angle adjustment (0Β° to 360Β°).
- Horizontal & Vertical flips (Flip H / Flip V) to match optical trains (refractors, diagonals, Newtonians).
- Drag-and-drop panning and mouse-wheel zoom on the sky canvas.
-
Equipment Management:
- Save and organize telescope profiles (aperture, focal length).
- Save and organize CCD / CMOS camera profiles (resolution width/height, pixel size in
$\mu\text{m}$ ).
-
Target Search & Coordinate Resolution:
- Fast search by catalog identifier or common name (e.g., M31, NGC 7000, Horsehead Nebula).
- Automatic resolution of Right Ascension (RA) and Declination (Dec).
-
Target History & Network Sync:
- Local history log of recently queried celestial targets.
- Network tab providing community sync of observations and target queries using Firebase Realtime Database.
-
Night Planner:
- Automatic scan of all local catalogues (Messier, NGC, IC, Barnard, Caldwell, etc.) against the observer's configured location.
- Filters objects above a configurable minimum altitude at the current time.
- Displays moon angular separation, meridian transit time, and transit altitude for every listed object.
- Refreshes automatically whenever the observer location is saved in Settings.
-
Observatory Location:
- Latitude and Longitude input fields in Settings, persisted to
data/settings.json. - Used by the Night Planner for precise Alt/Az visibility calculations via Astropy.
- Latitude and Longitude input fields in Settings, persisted to
-
ASCOM / INDI Mutual Exclusion:
- Enabling ASCOM automatically disables INDI and vice versa, preventing conflicting telescope connections.
- Core Language: Python 3.10+
- GUI Framework: PySide6 (Qt 6)
- Astronomy Libraries: Astropy & Astroquery
- Image Processing: Pillow (PIL)
- Cloud Synchronization: Firebase Realtime Database REST API
git clone https://github.com/ruirigel/accdc.git
cd accdc# Windows (PowerShell)
python -m venv .venv
.\.venv\Scripts\Activate.ps1
# Linux / macOS
python3 -m venv .venv
source .venv/bin/activatepip install --upgrade pip
pip install -r requirements.txtpython -m ui.main_windowAccdc can be compiled into a standalone, single-file executable using PyInstaller.
Note
Important: PyInstaller creates binaries native to the operating system it runs on (it is not a cross-compiler). To build a Windows .exe, compile on Windows. To build a Linux binary, compile on Linux. To build a macOS .app, compile on macOS.
To automate multi-platform builds without needing separate machines, see the GitHub Actions CI/CD section below.
On Windows, run PyInstaller using the provided .spec file:
# Activate your virtual environment first
.\.venv\Scripts\activate
# Build using the spec configuration
pyinstaller main_window.specThe output standalone executable main_window.exe will be located in the dist/ folder, complete with the embedded application icon (assets/logo.ico).
Install the required system libraries for Qt6 and OpenGL:
sudo apt update
sudo apt install -y build-essential libgl1-mesa-dev libglib2.0-0 libxcb-xinerama0 libxcb-cursor0# Activate your virtual environment
source .venv/bin/activate
# Build executable
pyinstaller --clean -y \
--name "accdc" \
--windowed \
--collect-all core \
--collect-all ui \
ui/main_window.pyThe resulting binary accdc will be generated in dist/.
(Optional) You can wrap the resulting binary into a portable .AppImage using appimagetool.
Convert the icon to Apple ICNS format (assets/logo.icns), or omit the icon parameter:
# Activate virtual environment
source .venv/bin/activate
# Build application bundle
pyinstaller --clean -y \
--name "Accdc" \
--windowed \
--collect-all core \
--collect-all ui \
--icon="assets/logo.ico" \
ui/main_window.pyThis generates a native macOS application bundle dist/Accdc.app.
(Optional) To create a .dmg installer disk image, install create-dmg:
brew install create-dmg
create-dmg --volname "Accdc Installer" "dist/Accdc.dmg" "dist/Accdc.app"The easiest way to generate binaries for Windows, Linux, and macOS simultaneously is using a GitHub Actions workflow.
Create a file named .github/workflows/build.yml in your repository:
name: Build Cross-Platform Binaries
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
artifact_name: accdc-windows.exe
build_cmd: pyinstaller main_window.spec
binary_path: dist/main_window.exe
- os: ubuntu-latest
artifact_name: accdc-linux
build_cmd: pyinstaller --clean -y --name accdc --windowed --collect-all core --collect-all ui ui/main_window.py
binary_path: dist/accdc
- os: macos-latest
artifact_name: accdc-macos.zip
build_cmd: |
pyinstaller --clean -y --name Accdc --windowed --collect-all core --collect-all ui ui/main_window.py
ditto -c -k --keepParent dist/Accdc.app dist/accdc-macos.zip
binary_path: dist/accdc-macos.zip
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install System Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-glx libxcb-xinerama0 libxcb-cursor0
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build Executable
run: ${{ matrix.build_cmd }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.binary_path }}Whenever you push a tag (e.g. v20261105) or trigger the workflow manually from GitHub's Actions tab, GitHub will spin up Windows, Linux, and macOS virtual machines, build the binaries, and make them available for download automatically!
accdc/
βββ assets/ # Application icons and branding assets
βββ core/ # Business logic, optical formulas & network queries
β βββ ascom.py # ASCOM / Alpaca connection and telescope control
β βββ calculator.py # Optical math (scale, FOV, focal ratio)
β βββ firebase_sync.py# Firebase network logging and status verification
β βββ observer.py # Alt/Az visibility calculator (Astropy-based)
β βββ query.py # Astronomical coordinates query, DSS image fetching & catalogue visibility scan
β βββ storage.py # Persistence for instruments, settings, favourites and logs
β βββ version.py # Application version definition
βββ data/
β βββ favorites.json # User-saved favourite deep-sky objects
β βββ instruments.json# Default instrument database (telescopes & sensors)
β βββ *.dat # Local catalogue files (Messier, NGC, IC, BSL, Caldwell, etc.)
βββ ui/
β βββ main_window.py # PySide6 GUI interface implementation
βββ .gitignore # Git exclusion rules
βββ create_release.py # Automated release versioning helper
βββ main_window.spec # PyInstaller Windows build specification
βββ requirements.txt # Production dependencies
βββ README.md # Project documentation
This project is open-source software licensed under the MIT License.
Developed by Rui Branco (@ruirigel). Contributions, bug reports, and suggestions are welcome via GitHub Issues!
