How astrohuntsman/gunagala works
• Core Library (Gunagala Package): Represent this as the heart of the system. Inside the “gunagala” directory, include the primary modules:
• camera.py – Handles camera modeling and performance simulation.
• imager.py – Simulates imaging aspects of the instruments.
• optic.py – Contains functions related to optical components.
• optical_filter.py – Manages filtering aspects in simulation.
• psf.py – Deals with point spread functions.
• sky.py – Incorporates sky model data and calculations.
• config.py – Manages configuration settings.
• _astropy_init.py – Likely used for Astropy package integration considerations.
• Data Management:
• Data Resources Folder (“gunagala/data”): Encompasses CSV files, YAML configurations (performance.yaml), and FITS files. This represents the raw observational data and performance metrics that feed into the simulation.
• Testing Suite:
• The “gunagala/tests” directory shows unit tests for each major component. Identify these as validation layers that ensure the correctness of the simulation modules.
• Documentation & Examples:
• The “docs” directory and the “examples” folder provide user guidance and use case demonstrations. While they are not part of the core logic, they provide insights into how the package should be used.
• Build and Package Infrastructure:
• Files like setup.py, setup.cfg, MANIFEST.in, and ez_setup.py indicate packaging, distribution, and build aspects for the project.
• Ancillary Tools:
• Directories or files like “astropy_helpers”, CI configurations (.travis.yml, readthedocs.yml), and licensing files are important for project management and integration.
Relationships and Interactions
• Data inputs (CSV, YAML, FITS) flow into the core modules (camera, imager, psf, etc.), which then process this information to perform calculations and simulations.
• The configuration module (config.py) acts as an intermediary that passes setup parameters to the individual simulation modules.
• How each module might depend on others:
• For example, the “imager” module might use data manipulations from “camera” and “optic”, while “psf” interacts with both optical parameters from “optic” and image simulation routines in “imager”.
• External Dependencies:
• Make a note of external libraries (particularly Astropy, as well as any dependencies hinted by astropy_helpers) that are fundamental to how these modules operate.
Important Architectural Patterns and Design Principles
• Modularity: The separation of concerns is clear – each module (camera, imager, etc.) is responsible for a specific aspect of the simulation.
• Data-Driven Design: There is a strong focus on ingesting and processing external data (CSV, YAML, FITS) that drives the simulation engine.
• Testing as a Core Principle: A dedicated testing suite reinforces the design’s focus on reliability and correctness.
Final Steps
• That the primary goal is to capture interaction patterns between core modules and data sources along with integration points with external libraries.