This is the first alpha release of the refactored genulens v2 codebase.
This release is intended for testing and early feedback before a stable v2 release.
Highlights
- Modularized the genulens C++ core into reusable model and simulation components.
- Kept the historical command-line interface available.
- Added direct Python bindings via pybind11.
- Added Python custom likelihood support.
- Added source-forward isochrone mode for source stellar properties.
- Added genstars-style extinction laws and extinction-map support.
- Added optical-depth and event-rate summary/map APIs.
- Added updated documentation and public notebook examples.
Python API
The Python API now calls the C++ simulation core directly. It does not run ./genulens as a subprocess and does not parse CLI stdout.
New workflows include:
- plain event simulation from Python
- custom likelihood functions
- source-forward source-property annotations
- isochrone-systematics experiments
- optical-depth and event-rate maps
Source-forward mode
The new isochrone source mode can attach source properties such as:
M_S_iniM_SR_Steff_Slogg_Stheta_S- absolute magnitudes such as
M_Imag_S,M_Hmag_2mass_S, andM_F146mag_S
Validation
Validated locally after merging to main:
cmake --build build -j 4./build/test_corebash tests/smoke/smoke_cli.shPYTHONPATH=build pytest -q tests/smoke/test_python.py tests/smoke/test_genulens_source_compat.py
Result:
- Python smoke:
38 passed, 3 skipped
The classic I-band rate path has also been checked against the legacy genulens_source summary calculation.
Known caveats
This is an alpha release.
- H-band/source-forward event rates are model-dependent forward predictions, not legacy-compatible rates.
- Isochrone outputs depend on PARSEC/MIST choice, IMF, age/metallicity prior, abundance assumptions, passbands, and extinction model.
- PARSEC alpha-enhanced tables are not treated as available; alpha-enhancement systematics are handled through MIST where available.
- Non-standard GSL installs require
GSL_ROOTat build time andLD_LIBRARY_PATHat runtime. pre_gapmoeremains a command-line helper set forgapmoe; it is not yet exposed as a direct Python ndarray API.
Documentation
Start from:
docs/README.mddocs/quickstart.mddocs/python_api.mddocs/source_forward.mddocs/extinction.mddocs/rate_maps.mddocs/isochrone_systematics.mddocs/pre_gapmoe.md