Repository navigation
Support generalized extinction models (G23) by decoupling legacy fAs grid constraints - #867
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #867 +/- ##
==========================================
- Coverage 39.48% 38.63% -0.86%
==========================================
Files 110 110
Lines 10763 10625 -138
==========================================
- Hits 4250 4105 -145
- Misses 6513 6520 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
karllark
left a comment
There was a problem hiding this comment.
Looks good overall. Many thanks for this PR!
I do request the change to the verify code to make the code more general and avoid the failure case where the mixture model includes G23.
| if parameters_names[i] == "fAs": | ||
| ext_law = getattr(settings, "extLaw", "") or "" | ||
| law_name = getattr(ext_law, "name", ext_law) | ||
| if isinstance(law_name, str) and "G23" in law_name: | ||
| continue |
There was a problem hiding this comment.
What happens if I want no fA and an extinction model other than "G23"?
There was a problem hiding this comment.
How about this code instead? Allows any model to be used as a non-mixture.
if (param_ is not None):
verify_one_input_format(
param_,
parameters_names[i],
param_format[i],
parameters_limits[i],
)
else:
if parameters_names[i] == "fAs":
print("fAs is None: extinction mixture model not requested.")
else:
raise ValueError(
parameters_names[i] + " is None: please provide a value."
)
|
Merging. Will do a quick PR to disable this test and create an issue to track updating it. |
This PR updates the BEAST parameter verification and physics model generation pipeline to accommodate generalized monolithic dust extinction frameworks, specifically
G23model, which are critical for stretching extinction curves reliably into the JWST/NIRCam Long-Wavelength (LW) regimes (>3.33μm).Historically, the codebase tightly coupled all grid validation and matrix calculations to legacy two-component mixture models (which rigidly require an fAs parameter grid triplet and separate ALaw/BLaw sub-classes). This PR breaks those hardcoded assumptions, introducing defensive programming practices that allow the BEAST to dynamically scale between classic mixture models and monolithic/generalized dust laws.
This PR addresses the second part of the Issue #866.