Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a "weighting variable" to a Grid #812

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

WillJRoper
Copy link
Collaborator

@WillJRoper WillJRoper commented Jan 15, 2025

To further automate grid interpolation I've added a "weight variable" attribute to a Grid, in future grid files this will define the Synthesizer component attribute the grids are normalised by. With this known the corresponding component attribute can be automatically extracted at spectra generation.

Example usage for this:

  • SPS models currently use stars.initial_masses spectra weights.
  • AGN models currently use bh.bolometric_luminosity spectra weights.

Note this breaks nothing and I also fixed some old ionising luminosity nomenclature which was hovering in the depths for no reason.

Issue Type

  • Enhancement

Checklist

  • I have read the CONTRIBUTING.md -->
  • I have added docstrings to all methods
  • I have added sufficient comments to all lines
  • I have made corresponding changes to the documentation
  • My changes generate no pep8 errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@WillJRoper WillJRoper added the grid Any issues pertaining to grids label Jan 15, 2025
@WillJRoper WillJRoper marked this pull request as ready for review January 15, 2025 17:43
@WillJRoper
Copy link
Collaborator Author

@christopherlovell want to chat about this this week at some point?

@WillJRoper WillJRoper marked this pull request as draft January 29, 2025 14:17
@christopherlovell christopherlovell marked this pull request as ready for review February 12, 2025 12:24
@christopherlovell christopherlovell merged commit beb74c9 into main Feb 12, 2025
4 checks passed
@christopherlovell christopherlovell deleted the adding_weightvar_attr branch February 12, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grid Any issues pertaining to grids
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants