Skip to content

Parikshith-S/OrionPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OrionPy 🐍

Python License Build CI

OrionPy is a Python-based workflow to process astronomical FITS images, starting with the Orion Nebula (M42). It provides tools to load, calibrate, stretch, and combine stacked FITS frames into stunning grayscale and RGB composites. The workflow balances scientific accuracy with astrophotography aesthetics.


Output Image

One of the output image


Features

  • Load and visualize FITS files
  • Apply multiple stretch methods:
    • Logarithmic
    • Arcsinh (asinh)
    • Histogram equalization
  • Combine multi-filter FITS images (R, V, B) into RGB composites
  • Save outputs as PNG for quick previews or publication
  • Pre-configured for Ruff linting, pre-commit hooks, and GitHub Actions CI

Installation

  1. Clone the repository
git clone https://github.com/Parikshith-S/OrionPy.git
cd OrionPy
  1. Install Poetry (if not installed)
pip install poetry
  1. Install dependencies
poetry install
  1. Activate Poetry shell (optional)
poetry shell

Usage

  1. Place your FITS files inside data/M42/:

M42

  1. Run the processing script
poetry run python src/process.py
  1. Outputs will appear in the output/ folder:
  • Grayscale previews per channel:
    • M42_red_log.png, M42_green_asinh.png, etc.
  • Color composites:
    • M42_rgb_asinh.png, M42_rgb_log.png, M42_rgb_hist.png

Example Output

RGB Composite (Arcsinh Stretch):

Grayscale Previews:

  • Red channel:
  • Green channel:
  • Blue channel:

Replace the image paths above with actual screenshots from your /output folder.


Linting & Pre-Commit

This project uses Ruff for linting and formatting, and pre-commit hooks for code quality.

  • Install hooks:
poetry run pre-commit install
  • Manually check all files:
poetry run pre-commit run --all-files

CI/CD

The repo is pre-configured with GitHub Actions to run:

  • Ruff lint and formatting checks
  • Pytest unit tests

Lincense

MIT License Β© Parikshith-S

About

OrionPy 🐍 – Turning raw telescope data into cosmic wonders.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages