andycasey / smhr

Spectroscopy Made Hard(er)
14 stars 7 forks source link

SpectralSynthesisModel with fixed element abundances #88

Closed alexji closed 8 years ago

alexji commented 8 years ago

Looking at the code, it appears that this will fit all elements in the synth_model.elements list (this is good and what I've assumed in the chemical abundances tab). However, there is currently no way to include elements whose abundances you want to remain fixed for a particular synthesis.

@andycasey I'm happy to implement this, but if you have a master plan for how this should go I'll leave it up to you.

andycasey commented 8 years ago

Yeah these will be separate things (elements in the line list and elements to fit). Assign this to me and I will get to it ASAP

Sent from my Commodore 64

On 1 Jun 2016, at 8:05 pm, Alex Ji notifications@github.com wrote:

Looking at the code, it appears that this will fit all elements in the synth_model.elements list (this is good and what I've assumed in the chemical abundances tab). However, there is currently no way to include elements whose abundances you want to remain fixed for a particular synthesis.

@andycasey I'm happy to implement this, but if you have a master plan for how this should go I'll leave it up to you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

alexji commented 8 years ago

@andycasey I can get the needed elements from model.transitions, but how do I give those elements abundances to be used in the synthesis? Ideally for me, it's a dict of element -> logeps stored in metadata (so it is also saved/regenerated), and this dict is automatically used when calling model.fit().

andycasey commented 8 years ago

In 3f4c0be I have implemented an optional keyword argument of rt_abundances to model.fit(). This is expected to be a dictionary where keys are elements (or species) and values are abundances in log_epsilon format.

alexji commented 8 years ago

Modified so that rt_abundances is in spectral_model metadata (presumably this will then be saved and loaded with the spectral models): 3cffef43b01c9665f42cbb28dc0478caa98fd16b