Updates the parametric young stars implementation to create individual star particles on the grid. This is opposed to the previous implementation, which was implemented on generate_lnu and directly produced the spectra from a parametric stars object; this led to issue with emission models with age dependencies, e.g., the CF00 dust model.
In this implementation new stars are created on the grid. These can then be self consistently treated as normal star particles for all downstream tasks. The old stars are saved on the object, as well as details of the parametrisation. This means that the procedure can be reversed, or new parametrisations applied, relatively easily.
This relies on the add_parts branch, and makes some additional modifications to this to generalise addition of particle stars object array attributes.
Additional changes:
renames particle.stars.sample_sfhz to sample_sfzh
fixes a bug in generate_lnu where fesc could be equal to None
adds checks for nan or inf on particle stars input (ages, metallicities, initial_masses)
adds properties on particle stars object for integrated total mass and SFR (optional timescale)
fixes shape issues in some measure_ methods on sed
Issue Type
Enhancement
Bug
Checklist
[x] I have read the [CONTRIBUTING.md]() -->
[x] I have added docstrings to all methods
[x] I have added sufficient comments to all lines
[x] I have made corresponding changes to the documentation
[x] My changes generate no pep8 errors
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
Updates the parametric young stars implementation to create individual star particles on the grid. This is opposed to the previous implementation, which was implemented on
generate_lnu
and directly produced the spectra from a parametric stars object; this led to issue with emission models with age dependencies, e.g., the CF00 dust model.In this implementation new stars are created on the grid. These can then be self consistently treated as normal star particles for all downstream tasks. The old stars are saved on the object, as well as details of the parametrisation. This means that the procedure can be reversed, or new parametrisations applied, relatively easily.
This relies on the
add_parts
branch, and makes some additional modifications to this to generalise addition of particle stars object array attributes.Additional changes:
particle.stars.sample_sfhz
tosample_sfzh
fesc
could be equal to Nonemeasure_
methods onsed
Issue Type
Checklist