Astrophotography session analyzer specialized for Ekos/KStars. This application analyzes .analyze files generated by Ekos and sends comprehensive summaries with temporal plots to Discord.
- Native Ekos Analysis: Directly parses KStars/Ekos
.analyzefiles - Temporal Plotting: HFR, guiding error, and temperature evolution graphs
- Advanced Analytics: Statistical analysis with numpy/scipy (optional)
- 3 Report Levels: minimal, standard, detailed - from quick notifications to comprehensive analysis
- Discord Integration: Rich summaries with emojis and organized statistics
- Dry-Run Mode: Safe testing without sending to Discord
- Multi-Filter Analysis: Performance breakdown by filter with sub-session details
- Guiding Analytics: Comprehensive guiding performance analysis by filter
- Quality Metrics: HFR, FWHM, star detection, and seeing conditions
- Temperature Correlation: Statistical analysis of temperature effects on imaging quality
- Intelligent Message Splitting: Automatic Discord message fragmentation for large sessions
- Alert System: Automatic detection of performance issues and recommendations
**๐ญ Session Summary (Minimal)**
๐ธ **31 captures completed**
โฐ Duration: 5h 55m
๐ค๏ธ **Session Conditions**
๐ก๏ธ Temperature Stability: Variable (ฮ5.1ยฐC)
๐ญ Mount Tracking: Good (28 events)
๐ฏ **Autofocus Summary**
๐ Sessions: 9
๐ Focus Stability: Frequent adjustments
๐จ **4 Critical Issues**
โข 4 aborted captures detected
**๐ญ Ekos Session Summary**
๐
2024-01-15 18:12 UTC
๐ **Session Overview**
๐ธ Total Captures: 31
โฐ Duration: 11:41 โ 17:37 (5h 55m)
๐ก๏ธ Temperature: 15.8ยฐC โ 20.9ยฐC (avg 17.0ยฐC)
๐ฏ Objects: 1 | ๐ Filters: 3 (H, O, S)
๐ค๏ธ **Session Conditions**
๐ก๏ธ Temperature Stability: Variable (ฮ5.1ยฐC)
๐ญ Mount Tracking: Good (28 events)
๐ **Guiding Performance**
๐ Measurements: 1,247
๐ฏ Avg Error: 0.92โณ
๐ก Guide Quality: Good
๐ RA: 0.78โณ | DEC: 0.61โณ
๐ **Capture Details**
๐ฏ **NGC 7380**
๐ H Filter (11ร600s, 1h 50m)
๐ง HFR: 3.60 โ 5.62 (avg 4.64, ฯ 0.66)
๐ FWHM: 8.46 โ 13.21 (avg 10.90, ฯ 1.55)
โญ Stars: 249 โ 250 (avg 250, consistency 1.00)
๐ Guide: 0.89โณ ๐กGood
๐ฏ **Autofocus Summary**
๐ Sessions: 9
๐ก๏ธ Average Temperature: 17.1ยฐC
๐ Focus Stability: Frequent adjustments
โ ๏ธ **Issues & Alerts**
โ Aborted Captures: 4
**๐ญ Session Overview (1/3)**
๐
2024-01-15 18:12 UTC
๐ **Session Overview**
๐ธ Total Captures: 31
โฐ Duration: 11:41 โ 17:37 (5h 55m)
๐ก๏ธ Temperature: 15.8ยฐC โ 20.9ยฐC (avg 17.0ยฐC) (Stability: 60%)
๐ฏ Objects: 1 | ๐ Filters: 3 (H, O, S)
๐ค๏ธ **Session Conditions**
๐ก๏ธ Temperature Stability: Variable (ฮ5.1ยฐC)
๐ญ Mount Tracking: Good (28 events)
๐ **Guiding Performance**
๐ Measurements: 1,247
๐ฏ Avg Error: 0.92โณ
๐ก Guide Quality: Good
๐ RA: 0.78โณ | DEC: 0.61โณ
๐ **Image Quality Analysis**
๐ง HFR: 1.96 โ 5.62 (avg 3.06)
๐๏ธ Seeing Conditions: Average
๐ HFR Stability: 0.215 (lower is better)
**๐ Performance Analysis (2/3)**
๐ฏ **Filter Performance Summary**
๐ **H**: 11ร600s (1.8h) - ๐ง 4.64 | ๐ 0.89โณ ๐ก
๐ **O**: 13ร600s (2.2h) - ๐ง 2.83 | ๐ 0.95โณ ๐ก
๐ **S**: 7ร600s (1.2h) - ๐ง 2.41 | ๐ 0.91โณ ๐ก
**๐ฌ Detailed Sub-Sessions (3/3)**
๐ฏ **NGC 7380**
๐ H Filter (11ร600s, 1h 50m)
๐ Sub-sessions: 2
#1: 22:46โ23:57 (1h 10m) | 7ร600s
๐ Guide: 0.94โณ ๐กGood
๐ง HFR: 4.12 โ 5.62 (avg 4.89)
๐ FWHM: 4.94 โ 6.74 (avg 5.87)
โญ Stars: 249 โ 250 (avg 250, consistency 1.00)
#2: 00:15โ00:55 (40m) | 4ร600s
๐ Guide: 0.81โณ ๐กGood
๐ง HFR: 3.60 โ 4.98 (avg 4.22)
๐ FWHM: 4.32 โ 5.98 (avg 5.06)
โญ Stars: 249 โ 250 (avg 250, consistency 1.00)
๐ก๏ธ **Temperature Analysis**
๐ Thermal Stability: 60% (Range: 5.1ยฐC)
๐ Temp-HFR Correlation: -0.234 (significant)
๐ฏ **Autofocus Analysis**
๐ Sessions: 9
๐ **By Filter:**
โข H: 3 sessions (avg temp 16.8ยฐC)
โข O: 4 sessions (avg temp 17.2ยฐC)
โข S: 2 sessions (avg temp 17.5ยฐC)
โฑ๏ธ Avg Interval: 45 minutes
- Python 3.7+
- KStars/Ekos configured to generate analyze files
- Discord webhook configured
- For DETAILED level: NumPy/SciPy for advanced analytics
- For plotting: matplotlib (optional)
- Clone the repository
git clone https://github.com/grm/astro-session-analyser
cd astro-session-analyser- Install dependencies
# Basic installation (minimal & standard levels)
pipenv install
# For detailed level with advanced analytics
pipenv install numpy scipy
# For temporal plots (optional)
pipenv install matplotlib- Configure the application
# Copy example configuration
cp config_example.yml config.yml
# Edit config.yml with your settingsEdit the config.yml file:
# Discord webhook URL (required)
webhook: "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"
# Time window in hours to analyze sessions
hours: 24
# Path to Ekos analyze files (optional)
# Default: ~/.local/share/kstars/analyze
analyze_dir: "/home/username/.local/share/kstars/analyze"
# Report level: minimal, standard, detailed
discord_report_level: "standard"
# Enable temporal plotting (optional)
plotting:
enabled: true
# Log level (optional)
log_level: "INFO"# Advanced analytics (auto-enabled for detailed level)
advanced_analytics:
enabled: false # Set to true to force enable for standard level
# Alert thresholds (optional customization)
alert_thresholds:
hfr_drift_warning: 0.5 # pixels
temperature_swing_warning: 5.0 # ยฐC
success_rate_warning: 0.8 # 80%
# Notification preferences
notifications:
performance_alerts: true
min_captures_for_report: 1# Safe testing with dry-run (RECOMMENDED)
pipenv run python nightly_summary.py -c config.yml --dry-run
# Verbose mode for debugging
pipenv run python nightly_summary.py -c config.yml --dry-run --verbose# Send summary to Discord
pipenv run python nightly_summary.py -c config.yml
# With verbose output
pipenv run python nightly_summary.py -c config.yml --verboseAdd to your crontab for daily summary at 8 AM:
0 8 * * * cd /path/to/astro-session-analyser && pipenv run python nightly_summary.py -c config.ymlHere's an example of what gets sent to Discord, including both the comprehensive text summary and temporal visualization:
Example Discord Message:
๐ญ Ekos Session Summary
๐
2025-09-04 07:49 UTC
๐ Session Overview
๐ธ Total Captures: 7
โฐ Duration: 07:00 โ 08:38 (1h 38m)
๐ฏ Objects: 1 | ๐ Filters: 3 (H, O, S)
๐ Guiding Performance
๐ Measurements: 22
๐ฏ Avg Error: 1.21โณ
๐ก Guide Quality: Good
๐ RA: 0.95โณ | DEC: 0.74โณ
๐ Capture Details
๐ฏ NGC 7380
๐ H Filter (4ร600s, 58m)
๐ง HFR: 2.75 โ 4.10 (avg 3.42, ฯ 0.67)
๐ FWHM: 6.46 โ 9.63 (avg 8.05, ฯ 1.59)
โญ Stars: 244 โ 250 (avg 247, consistency 0.99)
๐ Guide: 1.19โณ ๐กGood
๐ O Filter (2ร600s, 20m)
๐ง HFR: 2.25 โ 2.25 (avg 2.25, ฯ 0.00)
๐ FWHM: 5.29 โ 5.29 (avg 5.29, ฯ 0.00)
โญ Stars: 247 โ 248 (avg 248, consistency 1.00)
๐ Guide: 1.24โณ ๐กGood
๐ฏ Autofocus Summary
๐ Sessions: 3
๐ Focus Stability: Good
โ ๏ธ Issues & Alerts
โ Aborted Captures: 4
The temporal plot shows:
- ๐ง HFR Evolution: Focus quality changes over time with autofocus events marked
- ๐ Guiding Performance: Mount tracking stability with quality zones
- ๐ก๏ธ Temperature Evolution: Environmental conditions during the session
- Verify that KStars/Ekos generates
.analyzefiles in~/.local/share/kstars/analyze/ - Check the
analyze_dirpath in configuration - Use
--verboseto see detailed logs
- Verify the webhook URL in
config.yml - Test with
--dry-runfirst to see formatted output
- For DETAILED level, install:
pipenv install numpy scipy - The system gracefully falls back to basic mode if dependencies are missing
- Check console output for "advanced analytics" vs "basic analytics"
- Install matplotlib:
pipenv install matplotlib - Check
plotting.enabled: truein configuration - Plots are saved to
plots/directory and attached to Discord messages
- Check KStars/Ekos version (tested with 3.7.7+)
- Enable verbose mode:
--verbose - Use dry-run for safe testing:
--dry-run
- Essential notifications for automation
- Critical alerts only
- Perfect for mobile notifications and monitoring systems
- Comprehensive session summaries
- All essential astrophotography metrics
- Balanced information without complexity
- In-depth statistical analysis with sub-sessions
- Quality and performance optimization insights
- Scientific metrics with correlation analysis
- Advanced troubleshooting information
When you select discord_report_level: "detailed", the system automatically enables:
- Sub-Session Analysis: Detailed breakdown of each imaging run by filter
- Statistical Correlations: Temperature-HFR analysis with significance testing
- Quality Scoring: Objective analysis of session quality and conditions
- Performance Metrics: Success rates and filter-specific efficiency analysis
- Trend Analysis: HFR stability and degradation detection
- Intelligent Alerts: Automatic detection of issues with actionable recommendations
The detailed level requires scientific Python libraries:
pipenv install numpy scipyAlways use dry-run mode during development:
# Test without sending to Discord
pipenv run python nightly_summary.py -c config.yml --dry-run --verbose- nightly_summary.py: CLI interface and orchestration
- ekos_analyzer.py: Ekos .analyze file parser and data extraction
- ekos_discord_formatter.py: Unified Discord message formatter for all levels
- session_plotter.py: Temporal plot generation with matplotlib
- advanced_metrics.py: Statistical calculations and quality analysis
- utils.py: Configuration, logging, and Discord utilities
Contributions are welcome! The project uses:
- Python 3.7+ with Pipenv for dependency management
- NumPy/SciPy for advanced analytics (optional)
- matplotlib for temporal plotting (optional)
- Clear separation between basic and advanced features with graceful degradation
This project is under MIT license. See LICENSE file for details.
- KStars/Ekos team for excellent astrophotography software
- Discord community for feedback and suggestions
- NumPy/SciPy communities for statistical computing tools
- Enhanced Multi-Filter Analysis: Comprehensive sub-session breakdown by filter
- Improved Guiding Analytics: Real-time guiding performance analysis with quality assessment
- Intelligent Message Splitting: Automatic Discord message fragmentation for large sessions
- Temporal Plotting System: HFR, guiding, and temperature evolution graphs
- Advanced Statistical Analysis: Temperature correlations and quality metrics
- Better Error Handling: Graceful degradation and clear error messages
- Unified Configuration: Single config file supporting all features and levels
Perfect for astrophotographers from beginners to data enthusiasts! ๐ญโจ
