Update main#85
Merged
Merged
Conversation
Implement SED models and GalaxySED model generator
There was a problem hiding this comment.
Pull request overview
This PR appears to modernize PST’s modeling stack by introducing a shared Parameter/ModelBase system, moving chemical-evolution models into a new pst.cem module (with pst.models deprecated), and adding new SED building blocks (SED components, dust, and a composite galaxy SED). It also expands the unit test suite around these new APIs and updates CI Python versions.
Changes:
- Introduce
pst.model(Parameter,ModelBase) and extend unit handling utilities (check_unit,check_parameter). - Add/extend core modeling modules:
pst.cem,pst.sed,pst.dust,pst.galaxy, plus photometry acceleration viaobservables.FilterList. - Add significant new/expanded unit tests and bump CI matrix to Python 3.12.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_sed.py | New tests exercising GalaxySED end-to-end SED + photometry outputs. |
| tests/test_observables.py | Extends filter tests (plot API, flambda error) and adds FilterList coverage. |
| tests/test_models.py | Expands CEM tests (names, parameter recursion, tabular variants, age binning). |
| tests/test_galaxy.py | New validation tests for GalaxySED redshift handling and derived state updates. |
| tests/test_dust.py | Major expansion of dust/attenuation/emission/calorimetric tests. |
| tests/test_base_model.py | New tests for Parameter and ModelBase behavior. |
| src/pst/utils.py | Adds Parameter support to check_unit, adds check_parameter, adds broadcast_to_axis. |
| src/pst/sed.py | New SED component abstractions and StellarComponent. |
| src/pst/observables.py | Adds FilterList, changes filter plotting return values, caches AB normalization. |
| src/pst/models.py | Deprecates pst.models and re-exports from pst.cem. |
| src/pst/model.py | New foundational Parameter and ModelBase implementation. |
| src/pst/galaxy.py | New composite GalaxySED component. |
| src/pst/dust.py | Major refactor/expansion: attenuation curves/models, dust emission, calorimetric coupling. |
| src/pst/data/lick/lick_mgb.json | Adds Lick index definition data. |
| src/pst/data/lick/lick_hb.json | Adds Lick index definition data. |
| src/pst/cem.py | New chemical evolution model implementations migrated from models. |
| src/pst/init.py | Switches top-level import exposure from models to cem. |
| src/pst/SSP.py | Updates SSP wavelength interpolation to use check_unit and short-circuit when already sampled. |
| .github/workflows/testing.yml | Updates CI Python versions to include 3.12 and drop 3.9. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
Author
|
@paranoya I think this is ready for getting merged and released. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.