Developer Guide¶
This guide provides an overview of the internal structure of TransitPlanner and is intended for contributors or developers who want to extend or modify the codebase.
Project Structure¶
TransitPlanner is organised into several top-level packages:
core– geometric visibility calculationsobservability– SNR estimation, filtering, summary tableslightcurve– transit simulation and plottingio– data loading from NASA Exoplanet Archive and ExoClockcli– user-facing command-line interface
Each package contains small, focused functions that are combined by the CLI to form the full workflow.
CLI Workflow¶
The CLI (transitplanner/cli.py) is the main entry point. It performs the
following steps:
Collects user inputs (location, telescope aperture, date range, constraints).
Calls
core.visibility.find_observable_exoplanetsto compute geometric visibility.Loads catalogue data using
io.nasa.load_nasa_dataandio.exoclock.load_exoclock_data.Merges catalogue information with the visibility list using
observability.enrich.enrich_planets.Computes SNR for each planet using
observability.snr.snr_formula.Applies declination and SNR filters via
observability.filters.apply_filters.Generates a summary table using
observability.summary.check_observability_table.Prompts the user to select a planet and generates a model light curve using
lightcurve.simulator.generate_lightcurveandlightcurve.plotting.plot_lightcurve.
This modular design allows each subsystem to be developed independently.
Key Modules¶
Visibility (``core.visibility``) Handles altitude calculations, transit timing checks, and geometric filtering.
Observability (``observability.*``) Adds catalogue data, computes SNR, applies filters, and generates summary tables.
Light Curve Simulation (``lightcurve.*``) Creates synthetic transit light curves and plots them.
Data Loading (``io.*``) Fetches and parses data from NASA Exoplanet Archive and ExoClock.
Extending TransitPlanner¶
To add new features:
New observability criteria Add a function in
observability.filtersand include it in the CLI loop.New catalogue sources Add a loader in
ioand merge it inobservability.enrich.New output formats Extend
observability.summaryor add new exporters.New visualisations Add plotting functions in
lightcurve.plotting.
Testing¶
Tests should be added for:
visibility calculations
SNR estimation
data loading
light curve generation
Coding Standards¶
Keep functions small and single-purpose.
Document assumptions and units (degrees, hours, magnitudes, etc.).