Starburst99 (formerly "Galaxy") is a stellar population synthesis code for modeling the spectrophotometric and related properties of star-forming galaxies. This code calculates observable parameters of stellar populations including:
- Spectral energy distributions from UV to near-IR
- Stellar wind feedback and supernova rates
- Chemical yields from stellar evolution
- Line spectra at various wavelengths and resolutions
- Photometric properties (colors, magnitudes)
- Ionizing photon production
This version includes both a modernized Fortran implementation using Fortran 2018 standards and a complete Python reimplementation, both maintaining full compatibility with the original functionality.
Citation: Starburst99 should be cited as Leitherer et al. (1999, ApJS, 123, 3), Vazquez & Leitherer (2005; ApJ, 621, 695), Leitherer et al. (2010; ApJS, 189, 309), and Leitherer et al. (2014, ApJS, 213, 1).
- First version: August 12, 1998 (Claus Leitherer)
- Version 4.0: July 2002 - Added blanketed WR models
- Version 5.0: December 2004 - Added Padova tracks and high-resolution optical library
- Version 6.0: August 25, 2010 - Added theoretical UV spectra
- Version 7.0.0: March 2014 - Added rotating tracks and Wolf-Rayet library
- Version 7.1.0: May 2025 - Complete Fortran 2018 modernization, cross compiles across all platforms and all CPU-architectures. Includes full Python implementation with comprehensive test coverage.
The package follows a standard code repository structure:
starburst99/
├── src/ # Source code files
│ ├── galaxy_module.f90 # Core module with data structures
│ ├── galaxy_module_error.f90 # Error handling submodule
│ ├── starburst_main.f90 # Main program code
│ └── python/ # Python implementation
│ ├── core/ # Core modules (constants, data profiles, galaxy model)
│ ├── models/ # Model implementations (IMF, stellar tracks)
│ ├── file_io/ # File I/O operations (input parser, output writer)
│ ├── utils/ # Utility functions
│ ├── tests/ # Comprehensive test suite
│ └── starburst_main.py # Main Python program
├── bin/ # Executable files
├── data/ # Data files
│ ├── tracks/ # Stellar evolutionary tracks
│ ├── lejeune/ # Model atmospheres
│ └── auxil/ # Auxiliary data files
├── json_data/ # JSON versions of data files
├── tools/ # Utility tools
│ └── converters/ # Data conversion utilities
├── scripts/ # Runtime scripts
│ ├── go_galaxy # Main execution script
│ └── save_output # Output management script
├── output/ # Runtime output directory
├── docs/ # Documentation
└── tests/ # Test files
Some large data files have been excluded from this repository due to GitHub file size limitations:
- Several
allstars*.txt
files in thedata/lejeune/
directory - Corresponding JSON versions in the
json_data/
directory
See data/lejeune/README_LARGE_FILES.md
and json_data/README_LARGE_FILES.md
for details on how to obtain or generate these files.
- A Fortran 2018 compatible compiler (e.g., gfortran 8.0+)
- Make build utility
- Python 3.7+ (for Python version and data conversion tools)
# Standard build (optimized)
make
# Debug build with additional validation
make debug
# Clean build artifacts
make clean
# Setup runtime environment
make setup
# Build JSON converter only
make json
# Convert all data files to JSON (Fortran version)
make convert-json
# Convert all data files to JSON (Python version - handles binary files)
make convert-json-py
# Install executable to ~/bin
make install
- Ensure directory structure is set up correctly with
make setup
- Modify input parameters in
output/standard.input1
as needed - Run the code:
# Using the Makefile
make run
# Or directly:
cd output
./go_galaxy [input_file] [output_prefix] [ext_number]
Example:
cd output
./go_galaxy standard.input1 mymodel 1
This will generate output files with names like mymodel.spectrum1
, mymodel.color1
, etc.
The Python implementation provides equivalent functionality to the Fortran version with modern Python idioms:
- Python 3.7 or higher
- NumPy, SciPy, and Pandas (see requirements.txt)
# Create virtual environment
python -m venv venv
source venv/bin/activate # Unix/macOS
# or
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Install the package
pip install -e .
# Run from the python directory
cd src/python
python starburst_main.py ../../output/standard.input1
# Or with custom output directory
python starburst_main.py input_file.txt --output-dir /path/to/output
# Run tests
cd src/python
python -m pytest tests/
- Full compatibility with Fortran input/output formats
- Comprehensive test suite with 99% code coverage
- Modern error handling and logging
- Clean modular architecture
- Type hints for better code maintainability
The Python implementation follows a modular structure:
core/
: Core data structures and constantsmodels/
: IMF and stellar track implementationsfile_io/
: Input parsing and output writingutils/
: Utility functionstests/
: Comprehensive test suite
The file standard.input1
contains all model parameters. Key parameters include:
- Model Designation: Identifier for the model
- Star Formation Mode: Instantaneous (-1) or continuous (>0)
- Stellar Mass Parameters: Total mass or SFR
- IMF Settings: Exponents and mass boundaries
- Metallicity Selection: Choose from Geneva or Padova tracks at various metallicities
- Time Range: Initial time, time step, and maximum age
- Model Atmosphere: Choice of atmospheric models
- Output Selection: Flags for different output products
The code has been modernized with:
-
Modular Structure
- Properly encapsulated modules with explicit interfaces
- Derived types with type-bound procedures
- Submodules for implementation details
-
Fortran 2018 Features
- Enhanced error handling
- Allocatable character strings
- Block constructs
- Pure and elemental procedures
- Associate constructs for improved readability
- Abstract interfaces
-
Improved Build System
- Modern Makefile with proper dependencies
- Multiple build configurations (debug, release)
- Better error reporting during compilation
-
Enhanced Runtime Experience
- Better error messages
- Progress reporting
- Improved script usability
-
Data Format Modernization
- JSON conversion utilities for all data files
- Machine-readable format compatible with modern tools
- Preserves all scientific data while adding metadata
Additional documentation files:
docs/README.cleanup
: Details of modernization changesDEVELOPMENT.md
: Development guidelines for this codebasedocs/README
: Original documentation from previous versionsFIXED_QUALITY_ISSUES.md
: List of fixed quality issues and code improvementsPYTHON_REFACTORING.md
: Details of the Python implementationsrc/python/README.md
: Python-specific documentation and usage
While there is no official help desk, the authors may assist with questions and issues on a time-available basis. The code is distributed freely, and users accept sole responsibility for results produced by the code.
Original authors: Claus Leitherer, Carmelle Robert, Daniel Schaerer, Jeff Goldader, Rosa Gonzalez-Delgado, & Duilia de Mello
Disclaimer: This code is distributed freely to the community. The user accepts sole responsibility for the results produced by the code. Although every effort has been made to identify and eliminate errors, we accept no responsibility for erroneous model predictions.