Skip to content

Commit

Permalink
Quick fix to breaking bug from thermal model (#134)
Browse files Browse the repository at this point in the history
* Quick fix to breaking bug when changing the chianti file for the thermal model. Real issue is in thermal model which the testing energy range in the fitter fails on. Changed testing energy range to not get caught in thermal function bug.

---------

Co-authored-by: Kristopher Cooper <[email protected]>
Co-authored-by: Shane Maloney <[email protected]>

---------

Co-authored-by: Kristopher Cooper <[email protected]>
Co-authored-by: Stuart Mumford <[email protected]>
Co-authored-by: Shane Maloney <[email protected]>
Co-authored-by: Kristopher Cooper <[email protected]>
  • Loading branch information
5 people authored Mar 4, 2024
1 parent 2deabc0 commit 01c7e53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/134.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed bug where changing the Chianti file for `sunkit_spex.thermal` and using :class:`sunkit_spex/sunxspex_fitting/fitter.Fitter` caused an error.
2 changes: 1 addition & 1 deletion sunkit_spex/fitting_legacy/fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4753,7 +4753,7 @@ def _func_self_contained_check(function_name, function_text):
"""
exec(function_text, globals())
params, _ = get_func_inputs(globals()[function_name])
_test_e_range = np.arange(1.6, 5.01, 0.04)[:, None]
_test_e_range = np.arange(1.6, 25.01, 0.04)[:, None]
_test_params, _test_energies = np.ones(len(params)), np.concatenate((_test_e_range[:-1], _test_e_range[1:]), axis=1) # one 5 for each param, 2 column array of e-bins
try:
_func_to_test = globals()[function_name]
Expand Down

0 comments on commit 01c7e53

Please sign in to comment.