Full Changelog#
0.5.dev8+gd505b51d0 (2026-02-17)#
Breaking Changes#
sunkit_spex.sunxspex_fitting.fitter.Fitterno longer inherits fromsunkit_spex.sunxspex_fitting.data_loader.LoadSpec. (#75)Move
add_photon_model,del_photon_model,add_var,del_varto instance methods onFitterclass. (#75)Update STIX spectrogram and srm loading and plotting functions for the new STIX file format. (#98)
Rename of package from ‘sunxspex’ to ‘sunkit-spex’ with module being ‘sunkit_spex’. (#114)
Update minimum python version to python version to 3.9 and add testing for 3.10 and 3.11. (#121)
Renamed
sunxspex_fittingmodule tofitting_legacyand added a newfittingmodule. (#137)Remove redundant ‘legacy’ in module from
fitting_legacytofitting. (#158)Bump minimum python version to 3.12 and also update some dependencies: * matplotlib>=3.9 * numdifftools>=0.9.42 * numpy>=1.26 * parfive>=2.1 * scipy>=1.12 * sunpy>=7.0 * xarray>=2023.12 * ndcube>=2.3 (#234)
Deprecations#
Deprecate the
sunkit_spex.legacymodule. (#250)
New Features#
Add photon space broken power law
sunxspex.photon_power_law.broken_power_law_binned_flux(). Behavior is equivalent to the OSPEX power law f_bpow.pro when the pivot option is given. Similar to XSPEC bknpower. (#103)Update the RHESSI instrument loader
Move location to
sunkit_spex.extern.rhessi.RhessiLoaderMove all “I/O” RHESSI code into
sunkit_spex.extern.rhessitooRemove broken/codependent STIX loader.
Have RHESSI loader auto-pick the correct response based on the fitting times; warn if time range spans an attenuator state change. (#143)
Add code for using Astropy models in relation to a simple example of forward-fitting X-ray spectroscopy. (#155)
Add STIX instrument loader
STIXLoader(#160)Add function
get_albedo_matrixto calculate Albedo correction for given input spectrum and add modelAlbedoto correct modeled photon spectrum for albedo. (#161)For thermal emission in
thermal_emission, the output flux is set to 0 for input energies above CHIANTI energy grid and raises an error if input energies are below the energy grid. (#178)Add three Astropy model classes,
sunkit_spex.models.physical.thermal.ThermalEmission,sunkit_spex.models.physical.thermal.ContinuumEmissionandsunkit_spex.models.physical.thermal.LineEmission. These Astropy model classes act as wrappers to the existing physical model functions. This provides the capability to fit using the Astropy fitting framework. (#189)Allow automatic loading of the correct STIX SRM in
STIXLoaderbased on attenuation state within the selected time for spectral fitting. (#193)Add two Astropy model classes,
sunkit_spex.models.physical.nonthermal.ThickTargetandsunkit_spex.models.physical.nonthermal.ThinTarget. This provides the capability to fit using the Astropy fitting framework. (#194)Add new two new Astropy model classes,
sunkit_spex.models.scaling.DistanceScaleandsunkit_spex.models.scaling.Constant. These classes can be used with physical models to scale the flux either by observer distance or by a constant multiplicative factor respectively. (#195)Adds functionality to enable class:
StraightLineModeland class:GaussianModelto be evaluated at energy edges and return an output at energy centers. (#202)Add the possibility to perform albedo correction within the legacy code. The alebdo matrix is generated with
sunkit_spex.legacy.fitting.albedo.get_albedo_matrix()and the albedo correction is performed insunkit_spex.legacy.fitting.fitter.Fitter. (#206)Adds an example notebook for fitting a single STIX spectrum and a joint fit with STIX imaging and background detectors when an attenuator is used. (#217)
Bug Fixes#
Added special case in C-stat likelihood function
sunkit_spex.sunxspex_fitting.likelihoods.LogLikelihoods.cstat_loglikelihood()it defaults to the Poisson likelihood now when data is zero. (#85)Removed cast to
intwhen converting the model count rates (counts/second) to just counts since the model represents the average number of counts, there is not need for these to be integers. (#87)Fix bug where MCMC random walker starter positions were not correctly calculated. (#89)
Fixed bug where passing a user defined instrument loader class to
sunkit_spex/sunxspex_fitting/fitter.Fittercaused an error. (#108)Upper bound of thick target emission function in
sunxspex.sunxspex_fitting.photon_models_for_fitting.thick_fn()is calculated from highest energy input. (#115)Fixed bug where changing the Chianti file for
sunkit_spex.thermaland usingsunkit_spex/sunxspex_fitting/fitter.Fittercaused an error. (#134)Fixes bug which caused energy units to get squared; update the way units are assigned in
thermal_emission. (#171)Add back legacy parameters/functionality relating to
RhessiLoader. (#181)Gallery examples of fitting NuSTAR data now work and Numpy version dependent bug in
thick_fnis fixed. (#199)Fixes fitting by removing input_unit_equivalencies from thermal classes, class:ThermalEmission , class:ContinuumEmission and class:LineEmission . This allows compound emission to function. (#210)
Fix bug introduced in refactoring of
Albedomodel. Internally the angle theta given in degrees wasn’t converted to radians before use. (#212)Fixes bug in count_rate calculation in class:
StraightLineModel. We now calculate the mean of count rates for a given time range rather than the sum. (#214)Ensure that the module-level abundance tables don’t change in the legacy and release thermal modules. (#231)
Fix time selection bugs in
STIXLoader(#241)
Documentation#
Internal Changes#
Configure giles bot to check for change log entries. (#70)
Update SSW data url to point to lmsal server. (#90)
Update references to new repository name
sunkit-spex. (#129)Move CI to GitHub actions. (#138)
Update license and copyright years. (#145)
Remove unused dependencies which started to cause issues. Update URLs in examples for server change. Downgrade python in RTD environment to 3.10. (#200)
Remove unused files from root directory; add
devtarget to pyproject (#221)
0.1.dev158+g658b502.d20231003 (2023-10-03)#
Breaking Changes#
sunkit_spex.sunxspex_fitting.fitter.Fitterno longer inherits fromsunkit_spex.sunxspex_fitting.data_loader.LoadSpec. (#75)Move
add_photon_model,del_photon_model,add_var,del_varto instance methods onFitterclass. (#75)Update STIX spectrogram and srm loading and plotting functions for the new STIX file format. (#98)
Rename of package from ‘sunxspex’ to ‘sunkit-spex’ with module being ‘sunkit_spex’. (#114)
New Features#
Add photon space broken power law
sunxspex.photon_power_law.broken_power_law_binned_flux(). Behavior is equivalent to the OSPEX power law f_bpow.pro when the pivot option is given. Similar to XSPEC bknpower. (#103)
Bug Fixes#
Added special case in C-stat likelihood function
sunkit_pex.sunxspex_fitting.likelihoods.LogLikelihoods.cstat_loglikelihood()it defaults to the Poisson likelihood now when data is zero. (#85)Removed cast to
intwhen converting the model count rates (counts/second) to just counts since the model represents the average number of counts, there is not need for these to be integers. (#87)Fix bug where MCMC random walker starter positions were not correctly calculated. (#89)
Fixed bug where passing a user defined instrument loader class to
sunkit_spex/sunxspex_fitting/fitter.Fittercaused an error. (#108)
Internal Changes#
sunkit_spex 0.1.dev121+gbe82142 (2022-04-16)#
No significant changes.