Transitioning from v0.5.0-beta to future versions (AKA: translating to EmissionModels
)
#655
WillJRoper
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Once #624 is merged, any code that uses
get_spectra_incident
,get_spectra_reprocessed
,get_lines_intrinsic
etc. (i.e anyget_spectra_*
orget_lines_*
generator, including the particle equivalents) will fail.This is due to the pivot in workflow from specific generator methods to more generalised methods combined with
EmissionModels
(see below for more details).In short, if you don't want to modify your pipelines, ensure you are installing version
v0.5.0-beta
, this tag will forever remain compatible with the old generator methods.To convert your codes to use the new workflow you need to create
EmissionModels
that describe the different spectra you want to generate and how they relate to each other. This enables the construction of complex spectra on multiple different components with a single call toget_spectra
(or the same forget_lines
and their per particle equivalents).It is possible to construct your own
EmissionModels
and make any combination of spectra you like but for simplicity of use we have implemented a whole host of commonly used models which can be imported and used "out of the box". More details on all of this will be available in the emission models docs when #624 is merged.To give you an idea of what the translation might entail here is a comparison of the two methods for getting spectra. These methods are equivalent. The emission model version combines premade models together using a hybrid of self-defined models and pre-made models.
Old method
New method
This approach gives the user a lot more control over the spectra they can create while simplifying the creation of complex spectra.
Note that something like the Pacman or Charlot & Fall models can be imported and used directly. You aren't tied to defining each step in constructing a model yourself as shown above. This is also true for a bunch of other premade spectra within the
emission_models
module.Note that there's an importable list of currently implemented premade models:
Please feel free to ask any question here!
Beta Was this translation helpful? Give feedback.
All reactions