Add warm thick - #293
Conversation
…ed and make a thick tharget warm contribution model that should have its e_c param tied to a thick target param e_c?
|
Related to #235 |
| temperature = Parameter( | ||
| name="temperature", | ||
| default=10, | ||
| min=1, | ||
| max=100, | ||
| unit=u.MK, | ||
| description="Temperature of the plasma", | ||
| fixed=False, | ||
| ) | ||
|
|
||
| mg = Parameter(name="Mg", default=8.15, min=6.15, max=10.15, description="Mg relative abundance", fixed=True) | ||
|
|
||
| al = Parameter(name="Al", default=7.04, min=5.04, max=9.04, description="Al relative abundance", fixed=True) | ||
|
|
||
| si = Parameter(name="Si", default=8.1, min=6.1, max=10.1, description="Si relative abundance", fixed=True) | ||
|
|
||
| s = Parameter(name="S", default=7.27, min=5.27, max=9.27, description="S relative abundance", fixed=True) | ||
|
|
||
| ar = Parameter(name="Ar", default=6.58, min=4.58, max=8.58, description="Ar relative abundance", fixed=True) | ||
|
|
||
| ca = Parameter(name="Ca", default=6.93, min=4.93, max=8.93, description="Ca relative abundance", fixed=True) | ||
|
|
||
| fe = Parameter(name="Fe", default=8.1, min=6.1, max=10.1, description="Fe relative abundance", fixed=True) |
There was a problem hiding this comment.
There must be a better way to do this without repeating the same parameter definition everywhere
There was a problem hiding this comment.
Yea see #297 for potential method to not have to repeat the parameters would need to be tweaked a bit for here but similar approach should work.
There was a problem hiding this comment.
Thank you so much for looking into this. I tried to get around it using inheritance but I kept running into meta-class stuff. This was so annoying to write so I'll edit using #297
|
@samaloney , looking at #297 , I think it would be better to merge that first then come back to this PR. The @ianan , I'm also curious about your thoughts on how I've split up the warm thick target model, effectively just separating out the thermal contribution into its own separate model so we have both the I'll move this off of a draft PR since I don't know if it being a "draft" stops folk editing/collaborating on it. |

Opening this WIP PR that introduces the warm thick target model...at least the core part of it
The warm thick target is the addition of the thick target and a thermal component; that thermal component is the
ThermalEmissionmodel where the emission measure input is calculated from the thick target's low-energy cut-off and electron flux values, and new plasma number density and column length parameters.I've made a new model called
ThickTargetWarmContributionthat, given these parameters, will calculate the thermal component o the whole warm thick target model we know rom IDL. That should mean that to re create the whole warm thick target model we would only need to do:and make sure the low-energy cut-off and electron flux parameters are shared.
It is a work in progress, still need to add tests and comparisons to IDL, etc. but we'll want this physical model in eventually I'd imagine so might as well put it here for folk to see.
Here is a snippet of code I've been using it in: