Skip to content

Implement [Fe/H] scaling for abundances, closes #272#284

Open
tiwariar7 wants to merge 1 commit intotardis-sn:mainfrom
tiwariar7:feh-scaling-issue-272
Open

Implement [Fe/H] scaling for abundances, closes #272#284
tiwariar7 wants to merge 1 commit intotardis-sn:mainfrom
tiwariar7:feh-scaling-issue-272

Conversation

@tiwariar7
Copy link
Copy Markdown

@tiwariar7 tiwariar7 commented Jan 26, 2026

📝 Description

Type: 🪲 bugfix | 🚀 feature | ☣️ breaking change | 🚦 testing | 📝 documentation | 🎢 infrastructure

Write a complete description of your changes, including the necessary context or any piece of information required to understand your work.

Also, link issues affected by this pull request by using the keywords: close, closes, closed, fix, fixes, fixed, resolve, resolves or resolved.

📌 Resources

Examples, notebooks, and links to useful references.

🚦 Testing

How did you test these changes?

  • Testing pipeline
  • Other method (describe)
  • My changes can't be tested (explain why)

☑️ Checklist

  • I requested two reviewers for this pull request
  • I updated the documentation according to my changes
  • I built the documentation by applying the build_docs label

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

@andrewfullard
Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please fill out our PR description template.

@tiwariar7
Copy link
Copy Markdown
Author

Pull Request: [Fe/H] Scaling for Abundances

Description

This pull request implements a way to easily scale solar abundances using the [Fe/H] (metallicity) parameter.

Key changes:

  • Added a feh parameter to create_scaled_solar_profile in stardis/io/model/util.py to scale heavy metal mass fractions by $10^{\text{[Fe/H]}}$.
  • Updated MARCSModel and MESAModel to support passing the feh parameter through their to_stellar_model and composition methods.
  • Updated the input_model schema in stardis/io/schemas/input_model.yml to include composition_feh.
  • Updated the configuration parser in stardis/io/base.py to pass the new composition_feh setting to the model converters.

This allows users to specify metallicity in the configuration file like so:

input_model:
  composition_source: asplund_2020
  composition_feh: -0.5

closes #272

📌Resources

🚦 Testing

How did you test these changes?

  • By Testing pipeline

Specifically, added test_marcs_with_feh_scaling to stardis/io/model/tests/test_model_io.py to verify that feh: -1.0 correctly scales the total metallicity $Z$ by a factor of 0.1.

@tiwariar7 tiwariar7 marked this pull request as draft January 27, 2026 16:17
@tiwariar7 tiwariar7 marked this pull request as ready for review January 27, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants