How derekmlittle/sod_calculator works
SOD Calculator is a Windows desktop app for turning one or more chamber CSVs into regression results and summary exports. The user enters project settings, imports and maps files, reviews a regression window for each file, computes chamber and site metrics, then exports a CSV, plot, and Word report. The graph preserves import profiles and help as supporting capabilities. Some UI orchestration and export calls are only partially excerpted; those links rely on the README or source index rather than unsampled implementation details.
Main entry points: main_window.py Main window · import_dialog.py Import dialog · time_window_dialog.py Time window · calculation_service.py Calculations
Components 20
Desktop workflow
- Main window
ui/main_window.py - Time window
ui/time_window_dialog.py - Help dialog
ui/help_dialog.py - File and results
models/file_record.py
CSV import
- Import dialog
ui/import_dialog.py - CSV reader
services/csv_importer.py - Column mapper
storage/column_mapper.py - Import profiles
storage/import_profile.py - JSON store
storage/profile_store.py
Analysis and exports
- Calculations
services/calculation_service.py - Data preparation
services/dataframe_service.py - Regression plots
services/plot_service.py - Word report
services/report_service.py
Shared support
- App settings
config.py - Date utilities
utils/date_utils.py - Filename utilities
utils/filename.py
Other components
- User
- Summary CSV
- Plot image
- Word document
Connections 24
- User → Main window: uses
README.md - Main window → Import dialog: opens
ui/main_window.py - Import dialog → CSV reader: reads CSV
ui/import_dialog.py - Import dialog → Column mapper: maps columns
ui/import_dialog.py - Main window → Import profiles: uses profiles
ui/main_window.py - Column mapper → JSON store: loads and saves
storage/column_mapper.py - Main window → Time window: opens per file
README.md - Time window → Data preparation: prepares data
ui/time_window_dialog.py - Time window → Date utilities: parses times
ui/time_window_dialog.py - Main window → Calculations: computes results
ui/main_window.py - Calculations → Data preparation: prepares data
services/calculation_service.py - Calculations → File and results: creates results
services/calculation_service.py - Main window → File and results: holds records
ui/main_window.py - Main window → Regression plots: exports plot
README.md - Regression plots → Data preparation: prepares plot data
services/plot_service.py - Main window → Word report: exports report
README.md - Word report → Regression plots: builds report plot
services/report_service.py - Main window → Summary CSV: writes summary
README.md - Main window → Plot image: writes image
README.md - Main window → Word document: writes report
README.md - Main window → Help dialog: opens help
ui/main_window.py - Main window → App settings: uses settings
ui/main_window.py - Import dialog → App settings: uses field lists
ui/import_dialog.py - Main window → Filename utilities: formats output names
ui/main_window.py