Welcome to TerraLab
TerraLab is an astrophysical mapping engine that unites terrestrial topography with precision astronomical rendering. Unlike conventional planetariums, TerraLab calculates the real horizon based on Digital Elevation Models (DEM) and estimates dynamic stellar visibility using satellite light pollution data (DVNL).What TerraLab Does
TerraLab doesn’t just draw stars—it calculates what you can actually see from an exact point on Earth, considering:Real Terrain Horizons
Generates 360° horizon profiles via raycasting over topographic meshes (ICGC/Copernicus DEM)
Light Pollution Analysis
Scans Day/Night Visible Lights satellite data to assign Bortle class and real stellar magnitude limits
Precision Celestial Mechanics
Integrates Gaia star catalog and DE421 ephemerides for sub-arcsecond positioning accuracy
Core Features
Horizon Engine (Raycasting)
TheHorizonBaker projects thousands of rays from the observer’s position toward the horizon:
- Depth Bands: Uses logarithmically distributed depth bands to avoid aliasing and enable realistic atmospheric gradients between near and distant mountains
- Earth Curvature Correction: Each ray applies curvature correction for mountains beyond 100km:
- Multi-Quality Modes: 10 to 80 depth bands for performance vs. quality trade-offs
Visibility Model (DVNL → SQM → Bortle)
Converts satellite radiance into human-detectable sky quality:- Gaussian Convolution with to simulate zenith light reaching an SQM (Sky Quality Meter)
- Empirical Formula:
- Bortle Classification: Industrial zones reach Bortle 9, while mountain peaks achieve Bortle 1 ()
Star Catalog Integration
- Gaia Mission Data: High-precision stellar positions, proper motions, and photometry
- DE421 Ephemerides: NASA/JPL planetary positions for solar system objects
- Visual Magnitude Engine: Dynamic magnitude limits based on local light pollution
Quick Links
Installation
Install TerraLab and download required data files
Quick Start
Get up and running with your first astronomical visualization
Technical Philosophy
Design Decisions:
- Python + PyQt5: Chosen for rapid iteration and NumPy’s vectorized celestial calculations
- CRS Awareness: Engine handles metric projections (EPSG:8857) for precise geographic coordinates
- Human Eye Focal Length: Calibrated projection where zoom=1.0 corresponds to actual human vision (36mm full-frame equivalent)
Data Sources
TerraLab builds on world-class scientific datasets:| Data Type | Source | Description |
|---|---|---|
| Topography | ICGC, Copernicus (ESA) | Digital elevation models for terrain analysis |
| Stars | Gaia Mission (ESA) | Precise stellar positions and photometry |
| Ephemerides | NASA/JPL | DE421 planetary and lunar positions |
| Light Pollution | Earth Observation Group | DVNL satellite radiance measurements |
Next Steps
Ready to start exploring the night sky with real terrain?Install Dependencies
Follow the installation guide to set up Python packages