Skip to main content

SolarViewer - A comprehensive tool for visualizing and analyzing solar radio images

Project description

๐ŸŒž SolarViewer

A comprehensive Python toolkit for visualizing and analyzing solar radio images

Python 3.7+ PyPI version License: MIT GitHub stars

Features โ€ข Installation โ€ข Quick Start โ€ข CLI โ€ข Documentation โ€ข Contributing


โœจ Features

SolarViewer is a feature-rich desktop application designed for solar physics research. It supports FITS and CASA image formats with specialized tools for radio astronomy.

๐Ÿ”ญ Multiple Viewer Modes

Viewer Description
Standard Viewer Full-featured multi-tab interface with comprehensive analysis tools, including helioprojective coordinate support
Napari Viewer Lightweight, fast viewer for quick visualization

๐Ÿ“Š Analysis & Visualization

  • Statistical Analysis โ€” Detailed statistics for images and selected regions
  • 2D Gaussian Fitting โ€” Fit Gaussian profiles to radio sources
  • Elliptical Ring Fitting โ€” Model ring-shaped emission features
  • Region Selection โ€” Rectangle and ellipse tools for region-of-interest analysis
  • Multiple Colormaps โ€” Choose from scientific colormaps with linear, log, sqrt, and custom stretches
  • Stokes Parameters โ€” Full polarization support (I, Q, U, V, L, Lfrac, Vfrac, PANG)

๐ŸŒ Data Access & Downloads

  • Helioviewer Browser โ€” Browse and download images from NASA's Helioviewer API with time-series playback
  • Solar Data Downloader โ€” Download data from SDO/AIA, IRIS, SOHO, GOES SUVI, STEREO, and GONG
  • Radio Data Downloader โ€” Access solar radio observation archives
  • Solar Activity Viewer โ€” Browse solar events (flares, CMEs, active regions) with real-time data

๐ŸŽฌ Video Creation

  • Time-lapse Videos โ€” Create MP4 videos from image sequences
  • Contour Overlays โ€” Overlay radio contours on EUV/optical base images
  • Custom Annotations โ€” Add timestamps, colorbars, and min/max plots
  • Preview Mode โ€” Real-time preview before rendering

๐Ÿ”ง Advanced Tools

  • LOFAR/SIMPL Support โ€” Calibration table visualizer, dynamic spectra viewer, pipeline log viewer
  • Coordinate Transformations โ€” Convert between RA/Dec and helioprojective coordinates
  • Phase Center Tool โ€” Shift image phase centers for radio interferometry data
  • Export Options โ€” Export to FITS, CASA image, PNG, and region files

๐Ÿ“ฆ Installation

Prerequisites

  • Python 3.7 or higher
  • pip package manager
  • CASA data directory: The ~/.casa/data folder must exist for CASA to work properly. Create it with:
    mkdir -p ~/.casa/data
    

Note: No other manual installation is required โ€” all dependencies are installed automatically via pip.

Install from PyPI

pip install solarviewer

Install from Source

git clone https://github.com/dey-soham/solarviewer.git
cd solarviewer
pip install -e .

Dependencies

View core dependencies
Package Version Purpose
PyQt5 โ‰ฅ5.15.0 GUI framework
matplotlib โ‰ฅ3.5.0 Plotting and visualization
numpy โ‰ฅ1.20.0 Numerical operations
astropy โ‰ฅ5.0.0 FITS handling, coordinates
scipy โ‰ฅ1.7.0 Scientific computing
sunpy โ‰ฅ5.0.0 Solar physics tools
casatools โ‰ฅ6.4.0 CASA image support
casatasks โ‰ฅ6.4.0 CASA tasks
napari โ‰ฅ0.4.16 Fast image viewer

๐Ÿš€ Quick Start

Launch the Viewer

# Standard viewer
solarviewer
# or
sv

# Open a specific file
solarviewer path/to/image.fits

# Fast Napari viewer
solarviewer -f path/to/image.fits

LOFAR Tools

viewcaltable       # Calibration table visualizer
viewds             # Dynamic spectra viewer
viewlogs           # Pipeline log viewer

Other Tools

viewsolaractivity  # Solar events browser
heliobrowser       # Helioviewer browser

๐Ÿ’ป Command Line Interface

Standard Viewer (solarviewer / sv)

solarviewer [OPTIONS] [IMAGEFILE]

Options:
  -f, --fast    Launch fast Napari viewer
  --light       Start with light theme
  -v, --version Show version and exit
  -h, --help    Show help message

๐Ÿ“š Documentation

User Interface Overview

Standard Viewer Controls

File Controls

  • Open Directory โ€” Load a folder of solar radio images
  • Open FITS File โ€” Load a single FITS file
  • Export Figure โ€” Save current view as image
  • Export as FITS โ€” Export data as FITS file

Display Controls

  • Colormap โ€” Choose visualization colormap
  • Stretch โ€” Linear, log, sqrt, power-law options
  • Gamma โ€” Adjust power-law exponent
  • Min/Max โ€” Manual or auto display range

Region Tools

  • Rectangle/Ellipse Selection โ€” Select regions for analysis
  • Export Region โ€” Save as CASA region file
  • Export Sub-image โ€” Extract region as new image

Analysis Tools

  • Fit 2D Gaussian โ€” Gaussian source fitting
  • Fit Elliptical Ring โ€” Ring model fitting
  • Image Statistics โ€” Full image statistics
  • Region Statistics โ€” Selected region statistics

๐Ÿ—๏ธ Project Structure

solarviewer/
โ”œโ”€โ”€ solar_radio_image_viewer/
โ”‚   โ”œโ”€โ”€ main.py                 # Entry point
โ”‚   โ”œโ”€โ”€ viewer.py               # Standard viewer
โ”‚   โ”œโ”€โ”€ helioprojective.py      # Coordinate conversions
โ”‚   โ”œโ”€โ”€ helioprojective_viewer.py
โ”‚   โ”œโ”€โ”€ helioviewer_browser.py  # Helioviewer API browser
โ”‚   โ”œโ”€โ”€ napari_viewer.py        # Fast viewer
โ”‚   โ”œโ”€โ”€ video_dialog.py         # Video creation UI
โ”‚   โ”œโ”€โ”€ create_video.py         # Video rendering
โ”‚   โ”œโ”€โ”€ noaa_events/            # Solar events browser
โ”‚   โ”œโ”€โ”€ solar_data_downloader/  # SDO/AIA, IRIS, etc.
โ”‚   โ”œโ”€โ”€ radio_data_downloader/  # Radio data archives
โ”‚   โ”œโ”€โ”€ solar_context/          # Real-time solar data
โ”‚   โ”œโ”€โ”€ from_simpl/             # LOFAR/SIMPL tools
โ”‚   โ”œโ”€โ”€ utils.py                # Utility functions
โ”‚   โ””โ”€โ”€ styles.py               # UI themes (light/dark)
โ”œโ”€โ”€ setup.py
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ README.md

๐Ÿค Contributing

Contributions are welcome! Whether you're fixing bugs, adding features, or improving documentation, we appreciate your help.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.


๐Ÿ™ Acknowledgments

This project builds on the excellent work of the solar physics and radio astronomy communities:

Core Libraries

  • SunPy โ€” Solar physics data analysis in Python
  • Astropy โ€” Core astronomy library for FITS, coordinates, and units
  • CASA โ€” Common Astronomy Software Applications for radio astronomy
  • Napari โ€” Fast n-dimensional image viewer

GUI & Visualization

  • PyQt5 โ€” Python bindings for Qt GUI framework
  • Matplotlib โ€” Publication-quality plotting
  • NumPy โ€” Fundamental package for scientific computing
  • SciPy โ€” Scientific algorithms and mathematics

Data Sources & APIs

  • Helioviewer โ€” NASA/ESA solar image browser and API
  • SolarMonitor โ€” Real-time solar activity monitoring
  • NOAA SWPC โ€” Space Weather Prediction Center solar event data
  • SDO/AIA โ€” Solar Dynamics Observatory
  • JSOC โ€” Joint Science Operations Center for SDO data
  • VSO โ€” Virtual Solar Observatory

Community

  • The solar physics group at the National Centre for Radio Astrophysics for feedback and testing

๐Ÿ‘จโ€๐Ÿ’ป Author

Soham Dey โ€” sohamd943@gmail.com โ€” @dey-soham


Built with โค๏ธ for solar physics research

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solarviewer-1.1.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solarviewer-1.1.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file solarviewer-1.1.0.tar.gz.

File metadata

  • Download URL: solarviewer-1.1.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for solarviewer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3589197fd553b7aeefcbaa9817929b01086a047cba9ed4dc3eebdd8d8c1abb27
MD5 f463423f33eb9e19fde57312effcb060
BLAKE2b-256 cc65b4b7b2f8fc4c99fac3c37ee6490f1d56d85793ec231c18b878ae3c750b15

See more details on using hashes here.

File details

Details for the file solarviewer-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: solarviewer-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for solarviewer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3f9ff5cecc448cfc39f2607760745cf747f00219867e8bdcdd35b7e097385e9
MD5 5d68617c96ecb2a244f573036f1c4985
BLAKE2b-256 2ac43cf74165fb0c84ec0ecfc4af9b51bc4c5f76b9fb029738598f59149be760

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page