Full Changelog#

0.5.dev8+gd505b51d0 (2026-02-17)#

Breaking Changes#

  • sunkit_spex.sunxspex_fitting.fitter.Fitter no longer inherits from sunkit_spex.sunxspex_fitting.data_loader.LoadSpec. (#75)

  • Move add_photon_model, del_photon_model, add_var, del_var to instance methods on Fitter class. (#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_fitting module to fitting_legacy and added a new fitting module. (#137)

  • Remove redundant ‘legacy’ in module from fitting_legacy to fitting. (#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#

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.RhessiLoader

    • Move all “I/O” RHESSI code into sunkit_spex.extern.rhessi too

    • Remove 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_matrix to calculate Albedo correction for given input spectrum and add model Albedo to 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.ContinuumEmission and sunkit_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 STIXLoader based on attenuation state within the selected time for spectral fitting. (#193)

  • Add two Astropy model classes, sunkit_spex.models.physical.nonthermal.ThickTarget and sunkit_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.DistanceScale and sunkit_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:StraightLineModel and class:GaussianModel to 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 in sunkit_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 int when 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.Fitter caused 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.thermal and using sunkit_spex/sunxspex_fitting/fitter.Fitter caused 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_fn is 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 Albedo model. 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#

  • Add ‘sphinx-gallery’ to how-to section. (#150)

  • Add example gallery and convert ipython notebooks to gallery format. (#153)

  • Add installation instructions in documentation for sunkit-spex development version. (#236)

  • Split the gallery into Examples and Legacy Examples sections. (#250)

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 dev target to pyproject (#221)

  • Removes commented out code from thermal (#232)

0.1.dev158+g658b502.d20231003 (2023-10-03)#

Breaking Changes#

  • sunkit_spex.sunxspex_fitting.fitter.Fitter no longer inherits from sunkit_spex.sunxspex_fitting.data_loader.LoadSpec. (#75)

  • Move add_photon_model, del_photon_model, add_var, del_var to instance methods on Fitter class. (#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 int when 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.Fitter caused an error. (#108)

Internal Changes#

  • Configure giles bot to check for change log entries. (#70)

  • Update SSW data url to point to lmsal server. (#90)

sunkit_spex 0.1.dev121+gbe82142 (2022-04-16)#

No significant changes.