andycasey / smhr

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

Synthesis elements are all loaded twice, once in I and in II. #204

Closed maudegull closed 7 years ago

maudegull commented 8 years ago

bildschirmfoto 2016-08-15 um 12 58 27

maudegull commented 8 years ago

and they are the same lines!

alexji commented 8 years ago

@andycasey This is because when creating Synthesis Spectral Models, you can only specify what element you want to fit, not what species. So for example our Ba6496 linelist has a single tiny Ba I line, which causes it to think you also want to measure Ba I.

This is even worse with carbon, if there is CH/CN/CO/etc. in the same region, SMH assumes you want to measure all of them.

The solution is to be able to specify specific species that you want to measure in the synthesis spectral model, rather than just the element.

andycasey commented 8 years ago

Hmm, OK so if we allow it that you select an element and species (when both species are present) when creating a SpectralSynthesisModel, then this problem would be solved because the model would only appear once (e.g., as Ba II here). But in practical terms when fitting the model to data should we be changing the abundance of all species simultaneously (e.g., setting Ba I and Ba II to be the same variable abundance)? I think this is what we currently do. Or would we literally just be solving for Ba II and be letting Ba I scale as [M/H]?

I think the former is probably correct.

alexji commented 8 years ago

I agree it's correct to scale both abundances as is currently being done, but we just don't care about the Ba I abundance in that case: the line is too small to give any meaning, so it's misleading to suggest you can measure it by adding it in the measurable species table (as well as cluttering).

You might argue that the right thing to do in such cases is to remove that line from the linelist in the first place, but in practice we usually associate a particular spectral region with a specific species (not element) even if more information could be gleaned in principle.

I'm also not totally sure about how this works with molecules (e.g. CH + CN), but again the standard is to say we only measure one of those species even if both are being synthesized.

On Thu, Aug 18, 2016 at 1:06 PM Andy Casey notifications@github.com wrote:

Hmm, OK so if we allow it that you select an element and species (when both species are present) when creating a SpectralSynthesisModel, then this problem would be solved because the model would only appear once (e.g., as Ba II here). But in practical terms when fitting the model to data should we be changing the abundance of all species simultaneously (e.g., setting Ba I and Ba II to be the same variable abundance)? I think this is what we currently do. Or would we literally just be solving for Ba II and be letting Ba I scale as [M/H]?

I think the former is probably correct.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/andycasey/smhr/issues/204#issuecomment-240840340, or mute the thread https://github.com/notifications/unsubscribe-auth/AC8IjiqQ8__jgw6L6C2VltCLRxcAMrFPks5qhLs9gaJpZM4Jkkts .

andycasey commented 8 years ago

Yep I agree with all of this (except on removing them from the line list -- we should keep them in and just let them have a negligible contribution)

Ok so I will need to change the way spectral models are instantiated and then change the periodic table gui so it can allow for species selection

Sent from my Commodore 64

On 18 Aug 2016, at 21:43, Alex Ji notifications@github.com wrote:

I agree it's correct to scale both abundances as is currently being done, but we just don't care about the Ba I abundance in that case: the line is too small to give any meaning, so it's misleading to suggest you can measure it by adding it in the measurable species table (as well as cluttering).

You might argue that the right thing to do in such cases is to remove that line from the linelist in the first place, but in practice we usually associate a particular spectral region with a specific species (not element) even if more information could be gleaned in principle.

I'm also not totally sure about how this works with molecules (e.g. CH + CN), but again the standard is to say we only measure one of those species even if both are being synthesized.

On Thu, Aug 18, 2016 at 1:06 PM Andy Casey notifications@github.com wrote:

Hmm, OK so if we allow it that you select an element and species (when both species are present) when creating a SpectralSynthesisModel, then this problem would be solved because the model would only appear once (e.g., as Ba II here). But in practical terms when fitting the model to data should we be changing the abundance of all species simultaneously (e.g., setting Ba I and Ba II to be the same variable abundance)? I think this is what we currently do. Or would we literally just be solving for Ba II and be letting Ba I scale as [M/H]?

I think the former is probably correct.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/andycasey/smhr/issues/204#issuecomment-240840340, or mute the thread https://github.com/notifications/unsubscribe-auth/AC8IjiqQ8__jgw6L6C2VltCLRxcAMrFPks5qhLs9gaJpZM4Jkkts .

— 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

A hacky way to modify the periodic table GUI is to just put a text box at the bottom asking for a single species (or comma-separated speciess?) that overrides what you click. That field can be passed into the Spectral Model, and it will allow for specific molecules (which might otherwise be tricky to do properly).

On Thu, Aug 18, 2016 at 2:45 PM Andy Casey notifications@github.com wrote:

Yep I agree with all of this (except on removing them from the line list -- we should keep them in and just let them have a negligible contribution)

Ok so I will need to change the way spectral models are instantiated and then change the periodic table gui so it can allow for species selection

Sent from my Commodore 64

On 18 Aug 2016, at 21:43, Alex Ji notifications@github.com wrote:

I agree it's correct to scale both abundances as is currently being done, but we just don't care about the Ba I abundance in that case: the line is too small to give any meaning, so it's misleading to suggest you can measure it by adding it in the measurable species table (as well as cluttering).

You might argue that the right thing to do in such cases is to remove that line from the linelist in the first place, but in practice we usually associate a particular spectral region with a specific species (not element) even if more information could be gleaned in principle.

I'm also not totally sure about how this works with molecules (e.g. CH + CN), but again the standard is to say we only measure one of those species even if both are being synthesized.

On Thu, Aug 18, 2016 at 1:06 PM Andy Casey notifications@github.com wrote:

Hmm, OK so if we allow it that you select an element and species (when both species are present) when creating a SpectralSynthesisModel, then this problem would be solved because the model would only appear once (e.g., as Ba II here). But in practical terms when fitting the model to data should we be changing the abundance of all species simultaneously (e.g., setting Ba I and Ba II to be the same variable abundance)? I think this is what we currently do. Or would we literally just be solving for Ba II and be letting Ba I scale as [M/H]?

I think the former is probably correct.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/andycasey/smhr/issues/204#issuecomment-240840340, or mute the thread < https://github.com/notifications/unsubscribe-auth/AC8IjiqQ8__jgw6L6C2VltCLRxcAMrFPks5qhLs9gaJpZM4Jkkts

.

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

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/andycasey/smhr/issues/204#issuecomment-240867052, or mute the thread https://github.com/notifications/unsubscribe-auth/AC8Ijv6n6rSjEoX0yJKtUGpW2LXSJJS3ks5qhNJugaJpZM4Jkkts .

andycasey commented 8 years ago

I dunno,.. that seems to me like a pretty hacky way (because it affects the GUI and how models are created) to fix something that is essentially displaying as a visual bug. I would've thought that fixing it properly would take a comparable amount of effort, or am I missing something here?

alexji commented 8 years ago

Well, we will have to modify how the models are created anyway. Is there a better way than just telling it which species to use? On Fri, Aug 19, 2016 at 1:54 AM Andy Casey notifications@github.com wrote:

I dunno,.. that seems to me like a pretty hacky way (because it affects the GUI and how models are created) to fix something that is essentially displaying as a visual bug. I would've thought that fixing it properly would take a comparable amount of effort, or am I missing something here?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/andycasey/smhr/issues/204#issuecomment-240964577, or mute the thread https://github.com/notifications/unsubscribe-auth/AC8IjpYicoPuJLKEIlh-lHHnFjD413Mcks5qhW8ogaJpZM4Jkkts .

alexji commented 7 years ago

This is fixed in v0.2 with the new "master list" importing. In this, when you import a synthesis list, you can say what the wavelength/species/expot/loggf for the line should be. Then it will only be associated with one species.

Otherwise if you import one synth on the fly it will continue to be like this, but I expect that will be rare with the new setup.