How kativmak/cess works
Based on our analysis of the file tree and README, CESS is a specialized post‐processing module designed for FLASH simulation outputs. It calculates cooling emission in optical lines from supernova remnants using precomputed collisional data from MAPPINGS V (with the corresponding tables stored in the MV_tables directory). The module is composed of several scripts that form a clear pipeline—from generating a 3D emissivity cube to applying dust attenuation with tau.py and finally projecting results via a simple radiative transfer with rt.py.
Project Core and Purpose
• The project is focused on processing 3D simulation data (e.g., gas temperature from gas_temp.npy, density from gas_density.npy) to compute cooling emission in optical bands.
• It leverages precomputed cooling tables provided in MV_tables (grouped by different emission line types) to determine line intensities.
• There is an optional dust attenuation step (tau.py) and a radiative transfer projection (rt.py) to generate 2D flux maps.
• Its overall function is to calculate various optical line ratios and flux maps used for understanding supernova emission properties.
Main Components
a. Input Data:
• Uniform Grid Simulation Data: Represented by gas_temp.npy and gas_density.npy.
b. Lookup/Reference Data:
• MAPPINGS V Tables: The MV_tables directory with various subdirectories for different emission lines (e.g., ha_full, he2_solar, etc.), which act as reference tables for collisional data.
c. Processing Modules:
• Emission Calculation Module:
• emiss_3Dcube.py: Takes the simulation grid data and table values to compute the 3D cooling emission cube.
• Dust Attenuation Module (Optional):
• tau.py: Applies dust absorption calculations based on absorption cross-sections (from Draine 2003) to generate a tau cube.
• Radiative Transfer Module:
• rt.py: Projects the 3D emission (modified by dust attenuation if applicable) to generate 2D observable flux maps.
Relationships and Data Flow
• The emiss_3Dcube module uses the input grid along with the MAPPINGS V cooling tables to produce an emission cube.
• Optionally, the tau module operates on the emission cube output to apply dust attenuation.
• Finally, the rt module reads the adjusted emission cube and performs a projection (radiative transfer) to 2D maps.
• If applicable, loop.sh could be conceptualized as an orchestration layer that automates the sequence (data input → emiss_3Dcube → tau → rt).
Architectural Patterns and Design Principles
• Pipeline Architecture: The system is structured in sequential steps where each module performs a specific task and transfers its result to the next stage.
• Modularity: Each script (emiss_3Dcube.py, tau.py, rt.py) is decoupled, enabling flexible use of modules (e.g., applying tau only when dust effects are needed).
• Separation of Concerns: Data processing is separated into core emission, dust handling, and projection, with the MAPPINGS V cooling tables maintained separately.
Technologies and Dependencies
• Python scripts are the primary executable components.
• Data files (npy for grid data and text/dat files in MV_tables) form the input ecosystem.
• The build/automation script (loop.sh) might be used for orchestrating the pipeline.
• External references such as FLASH simulation outputs and the collisional data from MAPPINGS V are key contextual dependencies.