Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŒ Exoplanet Explorer - NASA Kepler AI Analysis Platform

Python FastAPI TensorFlow Three.js License Platform

Advanced AI-Powered Exoplanet Discovery with Interactive 3D Universe

Discover distant worlds using NASA Kepler data and machine learning

Open in GitHub Codespaces Deploy with Docker

๐Ÿš€ Quick Start Guide

๐Ÿ“‹ Prerequisites

Requirement Minimum Recommended Check Command
Python 3.8 3.9+ python --version
RAM 2GB 4GB+ systeminfo | find "Memory" (Win)
free -h (Linux)
Storage 2GB 5GB+ df -h (Linux)
Get-PSDrive C (Win)
Browser Chrome 70+ Chrome 90+ chrome://version/
GPU Optional NVIDIA GPU
(CUDA support)
nvidia-smi

โšก Installation & Setup

1. Clone and Setup

Option A: Standard Clone (Recommended)

# Clone the repository
git clone https://github.com/your-username/exoplanet-explorer.git
cd exoplanet-explorer

# Create and activate virtual environment
python -m venv venv

# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate

# Verify activation (should show 'venv' in prompt)
which python  # Should point to venv directory
#### 2. Install Dependencies
```bash
# Install all required packages
pip install -r requirements.txt

Required packages include:

  • fastapi==0.68.0+ - Web framework
  • tensorflow==2.8.0+ - Machine learning
  • scikit-learn==1.0.0+ - Data processing
  • pandas==1.3.0+ - Data manipulation
  • numpy==1.21.0+ - Numerical computing
  • joblib==1.0.0+ - Model serialization
  • uvicorn==0.15.0+ - ASGI server
  • three==0.128.0 - 3D visualization

3. Download NASA Kepler Data

# Download Kepler dataset from NASA (example)
wget https://exoplanetarchive.ipac.caltech.edu/data/KeplerData/kepler_data.csv
# OR place your Kepler CSV file in the project root

๐ŸŽฏ Usage Instructions

๐Ÿ”ฌ Step 1: Train the AI Model

Basic Training (Recommended):

python train.py exoplanet_for_train.csv --iterations 500

Advanced Training Options:

# Extended training with more iterations
python train.py exoplanet_for_train.csv --iterations 1000

# Training without early stopping
python train.py exoplanet_for_train.csv --no-early-stopping

# Custom model configuration
python train.py exoplanet_for_train.csv --iterations 300 --batch-size 32

Expected Training Output:

๐Ÿš€ NASA KEPLER ADVANCED EXOPLANET HUNTER v4.0
==============================================
๐Ÿ“ Loading data from: kepler_data.csv
๐Ÿ“Š Dataset shape: (9564, 50)
๐ŸŽฏ Target column: koi_disposition
โœ… Cleaned data: 8000 samples
๐ŸŽฏ Using 25 available features
๐Ÿš€ Starting advanced training (500 epochs)...
๐ŸŽฏ Epoch 1/500 - loss: 0.6823 - accuracy: 0.5814 - val_auc: 0.7234
...
๐Ÿ† NEW BEST MODEL! Score: 0.9412
๐ŸŽ‰ TRAINING COMPLETED SUCCESSFULLY!

๐ŸŒ Step 2: Launch the Web Application

Start the Server:

python main.py

Access the Application:

๐ŸŒ Open your web browser and navigate to:
http://localhost:8000

Server Output:

INFO:     Started server process [12345]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

๐ŸŽฎ User Interface Guide

๐Ÿ–ฅ๏ธ Main Dashboard Features

๐Ÿ“Š Data Upload Section

  • Drag & Drop CSV Upload - Upload Kepler mission data
  • Manual Data Input - Enter parameters manually
  • Real-time Validation - Instant data quality checks

๐Ÿ” Analysis Controls

  • mmAI-2.1 Model - Advanced exoplanet detection AI
  • Confidence Filter - Adjust detection threshold (0-100%)
  • Real-time Statistics - Live analysis metrics

๐ŸŒŒ 3D Visualization Panel

  • Solar System View - Our planetary system
  • Universe View - Galactic scale exploration
  • Interactive Orbits - Dynamic planetary motion

๐ŸŽฏ Control Panel Functions

Button Function Shortcut
โธ๏ธ Pause/Play Toggle animation Space
๐Ÿ”„ Reset Reset camera view R
๐Ÿท๏ธ Labels Toggle object labels L
๐ŸŒ€ Orbits Show/hide orbits O
๐ŸŒ Universe Switch view modes U

๐Ÿ–ฑ๏ธ Navigation Controls

  • Left Click + Drag - Rotate view
  • Right Click + Drag - Pan camera
  • Mouse Wheel - Zoom in/out
  • Click Objects - Show detailed information

๐Ÿ“ File Structure

exoplanet-explorer/
โ”œโ”€โ”€ ๐Ÿ app.py                 # FastAPI web server & 3D visualization
โ”œโ”€โ”€ ๐Ÿค– train.py    # Advanced ML model training
โ”œโ”€โ”€ ๐Ÿ“ saved_models/           # Trained model storage
โ”œโ”€โ”€ ๐Ÿ“„ exoplanet_for_train.csv         # NASA dataset (add your file)
โ””โ”€โ”€ ๐Ÿ“„ README.md              # This documentation

๐Ÿ”ง API Endpoints Reference

๐Ÿ“ค Data Upload & Analysis

# Upload CSV file
curl -X POST -F "file=@kepler_data.csv" http://localhost:8000/upload-csv

# Batch analysis
curl -X POST -H "Content-Type: application/json" -d '{"data": [...]}' http://localhost:8000/analyze

# Single data point analysis
curl -X POST -H "Content-Type: application/json" -d '{
  "koi_period": 365.25,
  "koi_duration": 13,
  "koi_depth": 84,
  "koi_prad": 1.0,
  "koi_teq": 288
}' http://localhost:8000/analyze-manual

๐Ÿ“Š Response Format

{
  "exoplanets": [
    {
      "name": "KOI-1234",
      "confidence": 0.894,
      "period": 365.25,
      "radius": 1.2,
      "temperature": 288,
      "distance_ly": 1245.67
    }
  ],
  "metrics": {
    "total_found": 156,
    "analysis_time": "2024-01-15T10:30:00Z",
    "model_used": "mmAI-2.1"
  }
}

๐Ÿง  Model Configuration

๐ŸŽ›๏ธ Training Parameters

Parameter Default Value Description
Iterations 500 Training epochs
Batch Size 64 Samples per batch
Learning Rate 0.0005 Optimization speed
Hidden Layers [512,256,128,64,32] Network architecture
Dropout Rates [0.5,0.4,0.3,0.2,0.1] Regularization
Early Stopping 50 epochs Prevent overfitting

๐Ÿ“Š Feature Set

The model analyzes 40+ scientific parameters including:

  • Orbital Characteristics: Period, Duration, Depth, Impact
  • Planetary Properties: Radius, Temperature, Insolation
  • Stellar Data: Temperature, Gravity, Radius
  • Quality Flags: False positive indicators, Signal-to-noise

๐Ÿ› Troubleshooting Guide

Common Issues & Solutions

โŒ "Module not found" errors

# Reinstall dependencies
pip install --upgrade -r requirements.txt

# Check Python version
python --version  # Should be 3.8+

โŒ "File not found" for CSV

# Ensure file is in correct directory
ls -la kepler_data.csv

# Download sample data if needed
wget -O kepler_data.csv "NASA_DATA_URL"

โŒ WebGL not working

  • Update browser to latest version
  • Enable WebGL in browser settings
  • Check graphics drivers are up to date

โŒ Training takes too long

# Reduce iterations for faster training
python train_nasa_kepler.py kepler_data.csv --iterations 200

# Use smaller batch size
python train_nasa_kepler.py kepler_data.csv --batch-size 32

โŒ Port 8000 already in use

# Kill existing process
sudo lsof -t -i tcp:8000 | xargs kill -9

# Or use different port
python main.py --port 8080

๐Ÿ› ๏ธ Performance Optimization

For better training speed:

# Install GPU support for TensorFlow
pip install tensorflow-gpu

# Use CUDA if available
export CUDA_VISIBLE_DEVICES=0

For larger datasets:

# Increase memory limits
export TF_GPU_ALLOCATOR=cuda_malloc_async

๐Ÿ“ˆ Expected Results

๐ŸŽฏ Model Performance

  • Accuracy: 90-94% on Kepler validation set
  • ROC AUC: 0.92-0.96 for exoplanet classification
  • Precision: 88-92% for confirmed exoplanets
  • Recall: 85-90% detection rate

๐ŸŒŒ Visualization Features

  • 2000+ stars in realistic background
  • 5 detailed galaxies with spiral/elliptical types
  • Real-time orbital mechanics
  • Distance calculations in light-years

๐Ÿ”„ Update and Maintenance

๐Ÿ†• Update to Latest Version

git pull origin main
pip install --upgrade -r requirements.txt

๐Ÿงน Clean Installation

# Remove virtual environment
rm -rf venv/

# Clear model cache
rm -rf saved_models/

# Fresh installation
python -m venv venv
source venv/bin/activate

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

๐Ÿ› Reporting Issues

# Include system information
python -c "import sys; print(sys.version)"
pip list | grep -E "(tensorflow|fastapi|scikit)"

๐Ÿ’ก Feature Requests

Suggest new features via GitHub Issues with the enhancement label.


๐Ÿš€ Ready to Explore the Cosmos?

Start your exoplanet discovery journey today!

# Begin your adventure
python train.py exoplanet_fpr_train.csv --iterations 100
python app.py

The universe is waiting to be discovered... ๐ŸŒŸ

```

About

Python toolkit for exploring exoplanet data with math-driven analysis, visualization, and scientific curiosity.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages