How quantum-ark/isro-hackathon works
1. Purpose and entry points
HELIOS-CORTEX is a solar-flare intelligence system that fuses Aditya-L1 HEL1OS hard-X-ray and SoLEXS soft-X-ray telemetry for real-time nowcasting, short-horizon forecasting, alerts, and India-specific impact presentation.
Primary runtime entry points:
• FastAPI service: api/main.py, launched as uvicorn api.main:app.
• React/Vite operator dashboard: frontend/src/main.jsx → frontend/src/App.jsx.
• Pipeline orchestration: pipeline/run.py.
• Model-training entry points: scripts/train_models.py, scripts/train_real.py, scripts/train_with_pytorch.py.
2. Telemetry acquisition and data boundary
The data layer accepts/pulls instrument telemetry, then standardizes it before inference. The repository includes cached raw JSON samples for each instrument:
• pipeline/ingestion.py
• data/raw/helios/helios_20240915_level1.json
• data/raw/solexs/solexs_20240915_level2.json
This is the key external-data boundary: production use expects satellite-derived Aditya-L1 feeds, while development can operate from repository data. Training also references external NOAA GOES data according to the project description.
3. Fusion and feature engineering
Feature extraction combines the thermal soft-X-ray and non-thermal hard-X-ray streams, including their temporal relationship (Neupert-effect rationale), flux trends, spectral hardness, and adaptive anomaly signals:
• pipeline/features.py
• pipeline/aggregator.py
• pipeline/ingestion.py
The aggregator is the synchronization/fusion boundary between independently sourced telemetry and downstream ML inputs. Feature outputs should remain the shared contract for both inference stages.
4. Cascaded inference and model artifacts
Inference is intentionally split into two specialized stages:
• Nowcasting detects an imminent/current flare from a short observation window: pipeline/nowcast.py, with artifact models/nowcast_cnn_weights.json.
• Forecasting estimates future flare probability/lead time from longer temporal context: pipeline/forecast.py, with artifact models/forecast_tcn_weights.json.
pipeline/run.py is the control-flow coordinator: ingest → aggregate/features → nowcast → forecast → combined operational result. The cascade separates immediate detection from temporal prediction rather than exposing a single opaque model.
5. API, update path, and live delivery
The FastAPI backend owns the externally consumable operational interface:
• REST routes and application wiring: api/main.py
• Shared response/domain schemas: api/models.py
• WebSocket live stream: api/ws.py
REST supports status, time series, alerts, catalog, impact, explainability, metrics, and inbound telemetry update operations. A telemetry update should trigger or feed pipeline evaluation; results are then surfaced through REST snapshots and /ws/live for push-style dashboard updates. The API is the boundary isolating ML/pipeline internals from UI clients.
6. Dashboard and operator-facing views
The frontend is a React 18 SPA built with Vite. It consumes the API/live feed and organizes the result into mission-control, alert, historical/replay, explanatory, and impact workflows:
• Application composition: frontend/src/App.jsx
• Dashboard/telemetry visualization: frontend/src/components/Dashboard.jsx, frontend/src/components/FluxChart.jsx
• Alert and risk presentation: frontend/src/components/AlertList.jsx, frontend/src/components/ImpactPanel.jsx, frontend/src/components/IndiaImpactMap.jsx
• Local/demo data boundary: frontend/src/lib/data.js
The UI remains distinct from inference: it visualizes API contracts, including explainability and regional risk, rather than embedding model logic.
7. Training, evaluation, and deployment
Model lifecycle code is separated from serving:
• Automated retraining flow: pipeline/auto_train.py
• Backtesting: scripts/backtest.py
• Data extraction/mock generation: scripts/extract_al1_data.py, scripts/generate_mock_fits.py
Material runtimes are Python 3.10+/FastAPI/PyTorch for ingestion, ML, and API delivery, plus Node.js 18+/React/Vite for the dashboard. Dependency installation is rooted in requirements.txt and frontend/package.json. Deployment automation is defined in .github/workflows/deploy.yml; the frontend includes static-hosting/PWA artifacts in frontend/public/sw.js and frontend/public/.nojekyll.
Main entry points: run.py Pipeline coordinator · main.py FastAPI service · App.jsx React application · features.py Feature extraction
Components 20
Telemetry & Fusion
- Aditya-L1 telemetry · Production instrument telemetry boundary.
- Cached telemetry samples · Development HEL1OS and SoLEXS inputs.
data/raw/helios/helios_20240915_level1.json - Telemetry ingestion · Accepts and standardizes instrument streams.
pipeline/ingestion.py - Stream fusion · Synchronizes independently sourced telemetry.
pipeline/aggregator.py - Feature extraction · Produces shared thermal, non-thermal, trend, and anomaly features.
pipeline/features.py
Inference Pipeline
- Pipeline coordinator · Coordinates ingest, fusion, nowcast, forecast, and results.
pipeline/run.py - Flare nowcast · Detects imminent or current flares from short windows.
pipeline/nowcast.py - Nowcast weights
models/nowcast_cnn_weights.json - Flare forecast · Estimates future probability and lead time from temporal context.
pipeline/forecast.py - Forecast weights
models/forecast_tcn_weights.json
Operational API
- FastAPI service · External operational boundary for pipeline results and telemetry updates.
api/main.py - API schemas · Shared operational response contracts.
api/models.py - Live WebSocket · Delivers live operational updates.
api/ws.py
Operator Dashboard
- React application · Composes operator workflows around API contracts.
frontend/src/App.jsx - Mission-control views · Dashboard, flux visualization, alerts, and impact presentation.
frontend/src/components/Dashboard.jsx - Demo data · Local fallback data boundary.
frontend/src/lib/data.js
Model Lifecycle
- Model training · Trains serving model artifacts using instrument and NOAA GOES data.
scripts/train_models.py - Automated retraining
pipeline/auto_train.py - Backtesting
scripts/backtest.py - Deployment workflow · Deploys service and dashboard artifacts.
.github/workflows/deploy.yml
Connections 27
- Aditya-L1 telemetry → Telemetry ingestion: production telemetry
- Cached telemetry samples → Telemetry ingestion: development input
- Telemetry ingestion → Stream fusion: standardized streams
- Stream fusion → Feature extraction: synchronized telemetry
- Pipeline coordinator → Telemetry ingestion: orchestrates
- Pipeline coordinator → Feature extraction: orchestrates
- Feature extraction → Flare nowcast: short-window features
- Feature extraction → Flare forecast: temporal features
- Nowcast weights → Flare nowcast: loads
- Forecast weights → Flare forecast: loads
- Flare nowcast → Flare forecast: cascade context
- Flare nowcast → Pipeline coordinator: current-flare result
- Flare forecast → Pipeline coordinator: future-risk result
- FastAPI service → Pipeline coordinator: telemetry update / evaluation
- Pipeline coordinator → FastAPI service: operational result
- API schemas → FastAPI service: response contracts
- FastAPI service → Live WebSocket: publishes updates
- FastAPI service → React application: REST snapshots
- Live WebSocket → React application: live updates
- React application → Mission-control views: renders
- Demo data → React application: local fallback
- Model training → Nowcast weights: produces
- Model training → Forecast weights: produces
- Automated retraining → Model training: triggers
- Backtesting → Model training: evaluates
- Deployment workflow → FastAPI service: deploys
- Deployment workflow → React application: deploys