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

Introducing EmissionModels and docs rework (Using dependency injection for spectra generation) #624

Merged
merged 410 commits into from
Jul 12, 2024

Conversation

WillJRoper
Copy link
Collaborator

@WillJRoper WillJRoper commented May 20, 2024

This PR introduces EmissionModels which simplify spectra generation by enabling the definition of tree-like templates for atomically defining complex models.

  • An EmissionModel encompasses a single step in spectra generation, e.g. extraction, generation, attenuation, or combination.
  • A mask can be applied during any of these steps.
  • All spectra generation methods are now deprecated in favour of a generic get_spectra method which takes an EmissionModel and parses it generating the necessary spectra (injection).
  • All commonly used sets of spectra are importable and modifiable but a user can construct their own by chaining together individual EmissionModels.
  • AGN models are also encompassed by EmissionModels.

This PR also includes a complete rewrite of the docs.

This PR closes a myriad of open issues:

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 Spectra/SED Issues relating to spectra and sed objects label May 20, 2024
@WillJRoper WillJRoper changed the title Using dependency injection for spectra geenration Using dependency injection for spectra generation May 20, 2024
@christopherlovell
Copy link
Contributor

christopherlovell commented Jun 19, 2024

Documentation pages that require updating:

  • components/stars/particle_stars.ipynb
  • components/stars/stars.rst
  • components/gas/particle_gas.ipynb
  • components/gas/gas.rst
  • components/blackholes/blackholes.rst
  • components/blackholes/particle_blackholes.ipynb
  • components/blackholes/parametric_blackholes.ipynb
  • lines/lines.rst
  • lines/lines.ipynb
  • emission_models/emission_models.rst
  • emission_models/premade_models.ipynb
  • emission_models/dust_emission.ipynb
  • emission_models/blackhole_emission_models.ipynb
  • imaging/imaging.rst
  • imaging/*.ipynb :)

@WillJRoper WillJRoper added the documentation Improvements or additions to documentation label Jun 20, 2024
@WillJRoper WillJRoper marked this pull request as ready for review July 11, 2024 10:16
@WillJRoper WillJRoper changed the title Using dependency injection for spectra generation Introducing EmissionModels and docs rework (Using dependency injection for spectra generation) Jul 11, 2024
@WillJRoper WillJRoper merged commit 06eacaf into main Jul 12, 2024
4 checks passed
@WillJRoper WillJRoper deleted the emission_templating branch July 12, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment