Skip to content

ep150de/sdo-data-fetcher

Repository files navigation

🌞 SDO Data Fetcher

Python 3.7+ License: MIT NASA SDO

A powerful Python application to fetch real-time solar images from NASA's Solar Dynamics Observatory (SDO). Get the latest solar data in seconds with support for all AIA wavelengths and HMI instruments!

SDO AIA 171 SDO AIA 304

✨ Features

  • πŸ”΄ Live Data - Fetches the latest SDO observations (updated every 12 seconds!)
  • 🌈 11 Wavelengths - All AIA channels (94Γ… - 1700Γ…) plus HMI magnetogram
  • πŸ“Š Auto Metadata - Each image includes JSON metadata with observation details
  • ⚑ Fast & Reliable - Direct from NASA servers, downloads in 1-2 seconds
  • 🎯 CLI & Python API - Use from command line or integrate into your code
  • πŸ“¦ Batch Downloads - Get multiple wavelengths simultaneously
  • πŸ”¬ Space Weather Ready - Perfect for monitoring solar activity

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/ep150de/sdo-data-fetcher.git
cd sdo-data-fetcher

# Install dependencies
pip install -r requirements.txt

Basic Usage

# Get the latest AIA 171Γ… image (default)
python sdo_fetcher_v2.py

# Get a specific wavelength
python sdo_fetcher_v2.py --source AIA_304

# Download multiple wavelengths
python sdo_fetcher_v2.py --multiple

# List all available sources
python sdo_fetcher_v2.py --list

πŸ“‘ Available Data Sources

Source Wavelength Temperature Best For
AIA_94 94 Γ… ~6 MK Hot flare plasma
AIA_131 131 Γ… ~10 MK Flaring regions
AIA_171 171 Γ… ~0.6 MK Quiet corona, coronal loops ⭐
AIA_193 193 Γ… ~1.5 MK Active regions
AIA_211 211 Γ… ~2 MK Active regions
AIA_304 304 Γ… ~0.05 MK Prominences, filaments
AIA_335 335 Γ… ~2.5 MK Active regions
AIA_1600 1600 Γ… - Upper photosphere
AIA_1700 1700 Γ… - Temperature minimum
HMI_Continuum Visible - Solar surface
HMI_Magnetogram - - Magnetic fields

πŸ’‘ Usage Examples

Command Line

# Monitor solar activity
python sdo_fetcher_v2.py --source AIA_193

# Space weather check
python sdo_advanced_examples.py  # Choose option 3

# Download full comparison set
python sdo_advanced_examples.py  # Choose option 1

Python Code

from sdo_fetcher_v2 import SDOFetcher

# Initialize fetcher
fetcher = SDOFetcher(output_dir="solar_images")

# Download latest image
metadata = fetcher.get_latest_image_direct(source="AIA_171")

if metadata:
    print(f"Image saved: {metadata['filepath']}")
    print(f"Observation time: {metadata['last_modified']}")

# Download multiple wavelengths
sources = ["AIA_171", "AIA_193", "AIA_304", "HMI_Magnetogram"]
results = fetcher.download_multiple(sources)

πŸŽ“ Advanced Features

The sdo_advanced_examples.py script includes:

  1. Multi-wavelength comparison sets - Download complementary wavelengths for analysis
  2. Active region monitoring - Track solar flares and active regions
  3. Space weather quick check - Rapid assessment tool
  4. Prominence monitoring - Track eruptions and filaments
  5. Continuous monitoring - Automated periodic downloads
  6. Monitoring daemon generator - Create long-running monitoring scripts
python sdo_advanced_examples.py

πŸ“‚ Output Structure

sdo_data/
β”œβ”€β”€ SDO_AIA_171_20260206_123456.jpg    # Solar image
β”œβ”€β”€ SDO_AIA_171_20260206_123456.json   # Metadata
β”œβ”€β”€ SDO_AIA_304_20260206_123457.jpg
└── SDO_AIA_304_20260206_123457.json

Each JSON file contains:

  • Source and wavelength information
  • Exact observation timestamp
  • Download metadata
  • Direct image URL

πŸ”¬ About NASA's SDO

The Solar Dynamics Observatory is a NASA mission launched in February 2010 to study the Sun's atmosphere and magnetic activity. It provides:

  • πŸ›°οΈ 24/7 observations from geosynchronous orbit
  • πŸ“Έ 4K images every 12 seconds in 10 wavelengths
  • 🧲 Magnetic field measurements of the Sun's surface
  • β˜€οΈ Real-time space weather monitoring
  • πŸ“Š Over 20 million images captured since launch

Learn more at sdo.gsfc.nasa.gov

πŸ“– Documentation

πŸ› οΈ Requirements

  • Python 3.7+
  • requests library (installed via requirements.txt)

🀝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests
  • Improve documentation

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Acknowledgments

  • NASA/SDO and the AIA, EVE, and HMI science teams for providing open access to solar data
  • Helioviewer Project for API access and tools
  • All solar physics researchers and space weather forecasters

πŸ”— Useful Links


Made with β˜€οΈ for solar physics research, education, and space weather monitoring

If you find this tool useful, please ⭐ star this repository!

About

🌞 Real-time NASA Solar Dynamics Observatory (SDO) data fetcher - Download live solar images in all wavelengths

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages