An interactive solar system visualization tool with support for stellar neighborhood mapping and Hertzsprung-Russell diagrams.
A comprehensive Python application that visualizes the solar system using data from the JPL Horizons system, combined with stellar visualization capabilities using Hipparcos and Gaia data. The tool allows users to:
-
Visualize and animate solar system objects:
- Planets, dwarf planets, and their major moons
- Asteroids and comets
- Space missions and their trajectories
- Sun's structure from core to heliopause
-
Create stellar visualizations:
- 3D maps of the stellar neighborhood
- Distance-based visualizations up to 100 light-years
- Magnitude-limited views of visible stars
- Hertzsprung-Russell diagrams
- Messier object visualizations
- Real-time 3D visualization of celestial objects using NASA JPL Horizons data
- Interactive plots with customizable views and scales
- Solar system animation capabilities (hours/days/weeks/months/years)
- Detailed visualization of the Sun's structure from core to Oort Cloud
- Stellar neighborhood mapping up to 100 light-years
- Hertzsprung-Russell diagrams for stellar classification
- Support for both distance-based and apparent magnitude-based star plotting
- Integration of Messier objects (nebulae and star clusters)
- Interactive camera controls and notable star navigation
- Click-to-copy star names and detailed hover information
- Comprehensive data caching system for improved performance
- Python 3.8 or higher
numpy>=1.24.0
pandas>=2.0.0
plotly>=5.18.0
astropy>=5.3.4
astroquery>=0.4.6
kaleido>=0.2.1 # Required for saving static images
tk>=0.1.0
python-dateutil>=2.8.2
requests>=2.31.0
ipython>=8.12.0
scipy>=1.11.0
- Clone this repository:
git clone https://github.com/tonylquintanilla/palomas_orrery.git
cd palomas_orrery
- Install required packages:
pip install -r requirements.txt
- Run the main program:
python palomas_orrery.py
- Using the Interface:
- Select celestial objects from the scrollable menu
- Choose a center object (default: Sun)
- Set the date and time for visualization
- Select scale options (Auto or Manual)
- Generate different types of visualizations:
- Solar System 3D plots
- Stellar neighborhood 3D plots (distance or magnitude based)
- Hertzsprung-Russell diagrams (2D)
The program handles data from two major catalogs with different photometric systems:
-
Hipparcos Catalog:
- Uses the Johnson-Cousins photometric system
- Directly provides standard V magnitudes (Vmag)
- Provides B magnitudes for B-V color index calculation
- Traditional system used in most historical astronomical observations
-
Gaia Catalog:
- Uses its own three-band photometric system:
- G (broad band covering most visible light)
- BP (Blue Photometer)
- RP (Red Photometer)
- V magnitudes must be estimated using the transformation:
V = G - (-0.0257 - 0.0924*(BP-RP) - 0.1623*(BP-RP)**2 + 0.0090*(BP-RP)**3)
- Estimation is accurate to within a few hundredths of a magnitude for most stars
- Uses its own three-band photometric system:
-
Magnitude-based Selection (Default):
- Hipparcos catalog: Used exclusively for stars with Vmag ≤ 4.0
- Gaia catalog: Used exclusively for stars with Vmag > 4.0
- This prevents duplicate stars and ensures optimal data quality
-
Distance-based Selection:
- Follows the same separation logic as magnitude-based selection
- Hipparcos for bright stars (Vmag ≤ 4.0)
- Gaia for fainter stars (Vmag > 4.0)
- Selection based on parallax measurements
-
Data Acquisition:
- Hipparcos data fetched first with appropriate magnitude/distance constraints
- Gaia data fetched with complementary constraints
- Data cached in VOTable format for future use
-
Catalog Processing:
- Hipparcos stars:
- Bright stars (Vmag ≤ 1.73)
- Mid-range stars (1.73 < Vmag ≤ 4.0)
- Gaia stars:
- Faint stars (Vmag > 4.0)
- Hipparcos stars:
-
Star Properties:
- Properties fetched from SIMBAD database
- Cached in PKL format
- Includes:
- Spectral types
- B-V colors
- Object classifications
- Additional notes for notable stars
-
Magnitude Conversion:
# Gaia G magnitude to Johnson V magnitude conversion V = G - (-0.0257 - 0.0924*(BP-RP) - 0.1623*(BP-RP)**2 + 0.0090*(BP-RP)**3)
-
Magnitude Standardization:
- All magnitudes standardized to
Apparent_Magnitude
column - Used consistently across all visualization modes
- Facilitates proper star selection and display
- All magnitudes standardized to
-
Temperature Estimation:
- Primary: B-V color index when available
- Secondary: Spectral type
- Uses interpolation for missing data
- Required for both HR diagrams and 3D visualizations
-
Distance Calculations:
- Parallax to distance conversion
- Error handling for uncertain measurements
- Light-year conversion factor: 3.26156
The program creates and uses several data cache files:
hipparcos_data_magnitude.vot
(~193KB)gaia_data_magnitude.vot
- ~1.2MB for magnitude 4 (default)
- Up to ~292MB for magnitude 9
hipparcos_data_distance.vot
(~30KB)gaia_data_distance.vot
(~9.4MB)
star_properties_magnitude.pkl
(~12MB)star_properties_distance.pkl
(~1MB)
Note: Files are created on first run and reused in subsequent sessions.
-
Initial Load:
- First run: 2-5 minutes for data fetching
- Subsequent runs: 5-10 seconds from cache
- Cache updates: Weekly recommended
-
Memory Usage:
- Magnitude limit 4: ~100MB
- Magnitude limit 6: ~500MB
- Magnitude limit 9: ~2GB
-
Visualization Response:
- Interactive updates: <100ms
- Animation frames: 200-500ms
- Plot generation: 2-5 seconds
-
Missing Star Data:
- Check cache files are not corrupted
- Verify SIMBAD connection
- Confirm magnitude/distance limits
-
Visualization Issues:
- Clear browser cache
- Check plotly.js loading
- Verify screen resolution settings
-
Performance Problems:
- Reduce number of selected objects
- Lower animation frame count
- Use manual scaling for large distances
-
Code Style:
- Follow PEP 8
- Use type hints
- Document complex algorithms
-
Testing:
- Unit tests for core functions
- Integration tests for data pipeline
- Performance benchmarks
-
Documentation:
- Update README for new features
- Document API changes
- Maintain version history
- Solar system positions: JPL Horizons System
- Stellar data:
- Object properties: SIMBAD database
- Messier objects: SEDS Messier Database
This project is licensed under the MIT License with Non-Commercial Use Restriction.
-
Free for Non-Commercial Use
- Academic research
- Personal projects
- Educational purposes
- Non-profit organizations
-
Commercial Use Requires Permission
- Contact author for commercial licensing
- Written permission required
- Separate terms may apply
-
Attribution Requirements
- Must credit original author
- Must indicate modifications
- Must include license notice
-
Data Source Attributions Required
- NASA/JPL-Caltech for Horizons data
- ESA for Hipparcos data
- ESA/Gaia/DPAC for Gaia data
- CDS, Strasbourg, France for SIMBAD data
This software incorporates several open-source libraries:
- NumPy (BSD 3-Clause)
- Pandas (BSD 3-Clause)
- Plotly (MIT)
- Astropy (BSD 3-Clause)
- Astroquery (BSD 3-Clause)
For commercial licensing inquiries, contact: Tony Quintanilla (tonyquintanilla@gmail.com)
See LICENSE.txt for complete terms.
Created by Tony Quintanilla with assistance from ChatGPT, Claude and Gemini AI assistants. Updated February 17, 2025.