How tardis-sn/carsus works
Main Components
• Core Package (carsus):
– The heart of the library, where high-level operations and common routines are implemented (e.g., base.py, __init__.py, and conftest.py). This layer acts as the central hub that ties all components together.
• Data Layer:
– Represented by the ‘carsus/data’ directory. This area holds static or reference datasets (e.g., basic_atomic_data.csv, configuration files like cmfgen_config.yml). It’s important to show that this layer provides configuration and input data used by the system.
• Input/Output (I/O) Module:
– This module is extensive and split into multiple submodules based on source types:
• Chianti (folder: carsus/io/chianti_)
• CMFGEN (carsus/io/cmfgen)
• Kurucz (carsus/io/kurucz)
• LANL ADS (carsus/io/lanlads)
• Molecules (carsus/io/molecules)
• NIST (carsus/io/nist)
• NNDC (carsus/io/nndc)
• Nuclear (carsus/io/nuclear)
• VALD (carsus/io/vald)
• Zeta processing (carsus/io/zeta)
• Generic output functionalities (carsus/io/output)
• Utility Layer:
– Located in both carsus/util and other helper files, these utilities (e.g., colored_logger.py, hash.py, helpers.py, selected.py) offer common helper functions and logging capabilities that support processing across modules.
• Testing & Validation:
• Documentation & CI/CD:
Relationships and Interactions
• Data Flow:
– Once processed, the output module converts data into formats suitable for radiative transfer codes. Indicate this flow from raw input to processed output.
• Utility Support:
– Connect the core processing and I/O modules to the utility components (logging, helper functions, etc.) to show underlying support functionality.
• Testing & CI:
Architectural Patterns and Design Principles
• Modular and Extensible Design:
– The detailed splitting of the I/O module by data source indicates a plug-in architecture where each parser or converter is isolated. This allows for easier extension when adding support for future atomic data sources.
• Separation of Concerns:
• Adoption of Established Tools:
– Note that Carsus is built using an Astropy package template, meaning that many conventions from the Astropy community (like configuration, testing setups, and documentation) are likely in effect.