How jamiesmith/astrophotography works
Project Type and Purpose
• This is an open-source tool suite for astrophotography:
– PySkyX: A Python package plus command-line scripts to control TheSkyX telescope software, cameras (flats, darks), flip-flat hardware, data logging and analysis.
– Automation: Shell/AWK/PowerShell/JavaScript scripts to automate image import, summarization, remote control of hardware (Eagle controllers), and integration with external storage (Dropbox, mirrors).
File Structure
Top-level:
• PySkyX/
– library/: Core Python modules for communicating with TheSkyX (PySkyX_ks.py, PySkyX_jrs.py), GUI (RT_GUI.py), flat-field controller (flatman_ctl.py).
– examples/: Sample Python scripts showing common tasks (take_darks, dump_stars, reduce_ds).
– documentation/: User guides (PDFs).
– scripts at root: High-level Python entry points (take_flats.py, characterize_flats.py, iterate_flats.py, etc.).
– config CSVs: per_filter_exposure_settings.csv, per_filter_flatman_settings.csv.
• automation/
– shell/awk scripts: image summaries, boltwood weather station parsing, JPEG shrinking, Dropbox syncing.
– PowerShell: Eagle hardware port on/off.
– theSkyX-JavaScript/: Telescope control macros for ScriptTheSkyX.
Extract Insights from README
• Confirms this is a toolkit for astrophotography workflows.
Main Components & Their Interactions
A. Python SDK & CLI (PySkyX)
• Core modules (library/) ↔ TheSkyX COM API
• CLI scripts (take_flats.py, take_darks.py, etc.) → invoke core modules → control camera/flat hardware → produce FITS images + logs
• Examples → illustrate module usage → no external dependencies beyond Python & TheSkyX
• Configuration CSVs loaded by CLI scripts to parameterize exposure settings
B. Automation Scripts
• Shell/AWK scripts → process images and logs → generate CSV/HTML summaries
• PowerShell → send commands to Eagle controllers → turn flip-flat on/off
• JS macros → run inside TheSkyX Script Editor → extend telescope control capabilities
• Integration with external services: Dropbox, file mirrors, local storage
C. External Systems
• TheSkyX telescope control software (COM interface)
• Camera hardware (flats, darks)
• Flip-flat device via Eagle controllers
• Storage & network: local disks, Dropbox, mirror servers
Architectural Patterns & Principles
• Modular CLI: each Python script is a thin wrapper around core library modules.
• Separation of concerns:
– library/ handles API communication
– CLI scripts handle user workflow
– examples showcase usage
– automation/ handles post-processing & infrastructure tasks
• Configuration via CSVs to avoid hard-coding exposure settings
• Polyglot automation: AWK, shell, PowerShell, JS—each chosen to best interact with its target environment