Sherpa

Latest version: v4.17.0

Safety actively analyzes 682416 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

12.14.0

Allow building with XSPEC 12.14.0 and include the 50 new models in it.

2017 - IO: separate pack and set commands
Replace the logic of the packup argument to the set I/O commands

2033 - utils: add typing rules to random and parallel
Add typing statements to the sherpa.utils.parallel and sherpa.utils.random
modules

2035 - stats: add typing rules
Add typing rules to sherpa.stats and minor internal clean up to the module.

2036 - Update sherpa citations
Add Sherpa 4.16.1 to the citation data.

2045 - Mark code as deprecated in sherpa.utils
Rework sherpa.utils and mark some symbols as deprecated - func_counter,
is_in, and mysgn - along with suggested replacements.

2046- Post 4.16.1 update to add DOI info
Adds the Sherpa 4.16.1 DOI info to the README.md.

2048 - CI: update the weekly arch run to add ppc64le and to use a supported python version
Support the weekly test builds using aarch64 and ppc46le architectures.
This support is considered experimental.

2052 - XSPEC: do not test bvvnei unless 12.14.0i or later is used
Avoid testing the XSbvvnei model if XSPEC <= 12.14.0i is in use, as the
model can cause a crash in this case.

2054 - Allow a file handle or Path object to be sent to the outfile parameter of fit
The fit call can now be sent a Path object or a file handle, as well as a
string. Fix issue 2063

2056 - tests: fix fake_pha test failure on crates
Address test failures when using crates after merging 1684 and to address
a numerical tolerance issue on macOS ARM.

2057 - Improve the guess routine for PHA data
Allow guess to work for composite models, including those with responses,
and improve the guess routine used for the norm parameter of XSPEC additive
models.

2058 - Address an error introduced in PR 2025
Fix an error made when addressing NumPy 2.0 changes in issue 2025.

2059 - Copy over typing annotations to the sherpa.ui and sherpa.astro.ui routines
Ensure that annotations are added to the sherpa.ui and sherpa.astro.ui
routines. Fix 2053

2060 - Simple typing support for sherpa.data
Add some basic typing rules to the sherpa.data module.

2061 - Avoid warning messages from AstroPy about unclosed files
Initial cleanup of the astro IO code in preparation for future changes.
This fixes an issue when using the AstroPy IO backend (pyfits) which could
cause Python to report an unclosed file on exit

2065 - CI: enforce NumPy does not use version 2.0 for the builds
Ensure the CI builds use numpy<2

2068 - CM-887: Updating macos gitlab runner images to version 12 and update the MacOS SDK to version 11.0
This ups the actions macOS Intel version to 12, and updates the macOS SDK
to version 11.0, which is consistent with CIAO.

2069 - Allow the tests to pass with NumPy 2.0
Allow the tests to pass when using NumPy 2.0, as long as pytest-doctestplus
is not installed.

2070 - Migrate to cxc xspec conda test channel
Use the cxc xspec test channel for Sherpa test workflows.

2072 - Use the correct case for the symbol name in the parameter warning message
Change how the warning message for deprecated parameter names for models
is displayed

2078 - Include the default identifier in save_all output if it has been changed
Record the default identifier in save_all output if the user has changed
it. Fix 2077

2079 - minor cleanup of sherpa.optmethods
Internal clean up of the sherpa.optmethods code.

2081 - minor plot cleanup
Clean up some plot code to make better use of modern Python idioms.

2086 - data: allow axis labels to be changed
Allow the independent and dependent axis labels to be changed. Addresses
2083

2089 - minor cleanup of sherpa.optmethods
Internal change to handling of the optional output file option when calling
fit. There is no functional change.

2091 - Asymmetric filter plot
Allow 1D data with asymmetric errors to be plotted after a filter. Fixes
2090.

2092 - Add a name field to the IO backends
Add a name field to the I/O backends. This is mainly useful for testing
and debugging.

2094 - Improve messages about invalid file types (PHA)
Tweak the warning messages when files can not be read to better indicate
the type of file being loaded (for PHA related files).

2102 - Change the URL for XPA
Change the URL used for XPA. Fix 2100.

2103 - Ensure crates file reads are read-only
Ensure that we read in table data as read-only when using the crates I/O
backend.

2105 - docs: typo fixes and remove some references.
Fix a typo in a docstring and change how two references are included in
the text.

2107 - XSPEC: add show_xsabund command
Add the show_xsabund command to the sherpa.astro.ui module and
get_xsabundances to sherpa.astro.xspec.

2108 - Asymmetric settings
Allow the statistic and optimizer to be changed when re-sampling data with
asymmetric errors. Fixes 2093.

2109 - Add a set_xsabundances call for XSPEC users
Add a set_xsabundances call to make it easier to change one or more
elemental abundances for the XSPEC models and ensure that both the get
and set calls are available from the sherpa.astro.ui module.

2111 - IO: ensure NUMELT/GRP are written out as integers for RMF header
Ensure the NUMELT and NUMGRP keywords for RMF files are written out as
integers.

2112 - Minor typing cleanup
Clean up some of the recently-added typing rules.

2115 - doc: add examples of using set_xlabel/ylabel
Add documentation showing the new set_xlabel/ylabel functionality from
2086

2118 - Improve support for PHA data starting at channel 0
Improve the handling of PHA files that start at channel 0. PHA data that
are read in from such a file no longer renumber the CHANNEL column to start
at 0 rather than 1, which will mean that notice and ignore filter ranges
that are given in channel units will need to be reduced by 1.

2120 - Improve handling of STAT/SYS_ERR PHA columns
Improve handling of STAT_ERR and SYS_ERR PHA columns which are set to 0.

2121 - UI: add calc_model/source commands
Add calc_model and calc_source routines to return the model expression
evaluated per bin.

2123 - Data cleanups
Internal clean up of some of the data code.

2125 - Allow per plot kwargs for plot_xxx_components calls
Allow per-plot keyword arguments for plot_model_components and
plot_source_components.

2126 - Allow plot and contour to change the plot layout and have per-plot settings.
Expand the plot and contour commands to allow per-plot options to be given,
matching the plot_model_components/plot_source_components commands.

2129 - Fix plot overplot
Improve the behaviour of plot() and contour() when called with
overplot=True or overcontour=True respectively. Fix 2128.

2130 - data: fixup numpy import
Fix up several typing annotations from a recent refactoring.

2133 - UI: add format and delim arguments to get_filter.
Allow the get_filter call to override the format and delim arguments. Fix
1277

2135 - Tests: tweak tolerances for macOS ARM 2135
Updated macOS ARM test tolerances

2137 - Fix doctests in `sherpa.plot.__init__`
Changed documentation to match backends as objects instead of modules

2138 - UI: add documentation for table to show_xsabund
The show_xsabund command now includes a description of the abundance table.

2139 - Update helpdesk URL
Changed helpdesk link - fixes issue 1931

2140 - Updated docs for asymmetric errors
Expanded documentation for load_ascii_with_errors to clarify assumptions for elo and ehi settings.

2141 - Update LaTeX labels and docs for bokeh
Correctly render LaTeX labels in bokeh

2144 - Fix xspec missing doc
Add get_xsabund_doc to the list of functions in the documentation. There
is no functional change.

2147 - Improve corner-case handling of filtering and empty data handling
A clean-up pass for the data classes, in particular DataPHA, to normalize
the filtering and handling of an empty object

2151 - updating Sherpa citations
Added a citation to the most recent sherpa paper

2152 - DATA: clean up DataPHA.get_x
Internal clean up of the DataPHA.get_x method.

2153 - updated the front page of Sherpa RTD with references
Added references to three sherpa papers in the sherpa docs

2154 - Update README
Added additional text regarding acknowledging/citing sherpa

2155 - Drop support for Python 3.9 and add 3.12
Drop support for Python 3.9 and numpy < 1.24 and note Python 3.12
experimental support.

2157 - Improve test coverage of ignore_bad
Add more corner-case of quality channel handling for PHA data. There is no
functional change here.

2160 - Fixup test failures from 2118
Fix up a test case when writing out the range of a FITS column.

2161 - UI: note when a 1D filter command has failed
Provide more information for the UI user if a filter command has failed.

2162 - TEST: ignore fork deprecation warnings
Ignore the deprecation warnings about the use of the fork method for
multiprocessing.

2177 - Read the Docs build failures with newer sphinx versions and sphinx_rtd_theme deprecation warning
Specify sphinx < 8 for the read the doc environment and remove the call
to get_html_theme_path no longer needed.

12.13.1

Note that Sherpa can be built against XSPEC 12.13.1 and update some
parameter ranges or defaults to match the new values from this release.

1836 - Allow ARF and RMF to be written out
Support writing out ARF and RMF data to FITS files (and, for ARF, ASCII
files). Fix 1699, 1695, and 203.

1839 - ui: add get_plot_prefs/get_contour_prefs calls
Add the get_plot_prefs and get_contour_prefs call to simplify access to
the plot and contour preferences.

1840 - Fix 1828 - histogram plot issue
Fix up the histogram display for the unlikely case when the bin edges have
at least one gap, the low edges are integer values, and the high edges are
floating-point values.

1841 - Minor refresh of AstroPy I/O code for better FITS and ASCII output
Minor rework of the sherpa.astro.io.pyfits_backend module to improve on
the output (both FITS and ASCII), such as a closer mapping of the data
type used on disk and written out to file, and some changes to the header
lines of ASCII files.

1844 - XSPEC: allow table model redshift parameter range to change (fix 1814)
Allow the redshift range of XSPEC table models to be changed outside the
default 0 to 5 range. This restores a feature that was lost in the 4.15
release. Fix 1814

1848 - Tests: add regrid corner case tests
Add tests for corner-cases for the regrid method. Many of these tests are
currently regression tests, and check that the code behavior has not
changed, rather than that it works correctly. There is no functional
change to the code.

1851 - XSPEC: table model improvements
Address issues with the XSPEC table model support: models that set an
Escale parameter (feature added December 2020) are now supported
(previously they could cause a segmentation fault) and ensure that
parameters with a negative delta value are marked as frozen. Fix 1850 and
1852.

1853 - XSPEC: update model parameters to match XSPEC 12.13.1 / HEASOFT 6.32
Update the XSPEC parameter names and ranges to match those from XSPEC
12.13.1 / HEASOFT 6.32.

1854 - models: change defaults for Box1D parameters
The xlow parameter of Box1D now defaults to 1 and the ampl parameter has a
greatly-increased range (from the previous version of -1 to 1).

1855 - group_counts et al now default to using the existing mask as the
tabstops, unless explicitly given
When calling group_counts, group_width, ..., use the current mask as the
tabStops argument by default (actually, the inverse of the mask), that is,
when the tabStops argument is set to None (the default). This means that
the grouping is only applied to the selected channels, and means that the
filter range is less likely to change when filtered data is grouped.
This is a change in behaviour. To get the previous behaviour users need to
set tabStops to an array of zeros (length being the number of channels):
e.g. for Chandra ACIS imaging-mode data, group_counts(20, tabStops=[0] *
1024) or group_counts(20, tabStops=np.zeros(1024)). Fix 417 956 1081

1856 - XSPEC: fix link for XSPEC gauss/zgauss models
Fix the link to the XSPEC documentation for the gauss and zgauss models.

1858 - Correctly handle XSPEC table models with both ESCALE and Z parameters
Update XSPEC table model support for models with both ESCALE and REDSHIFT
keywords set to work correctly. Fix 1857

1861 - Allow XSPEC table models to be created and written out
Provide experimental support for creating XSPEC table models (additive or
multiplicative). The output routines can be found in the sherpa.astro.ui.
xstable module. Note that XSPEC support is not required to write out an
XSPEC table (but it is to be able to read it back in and use it). Fix 1859

1866 - Switch to conda-forge and use new Conda channel
Removes use of defaults channel and replaces it with conda-forge; removes
references to anaconda

12.13.0

Add explicit support for XSPEC 12.13.0. Sherpa can be built against XSPEC
12.13.0 without this PR, but this adds in support for the new cglumin
convolution model added in this release.

1637 - report the filter changes when grouping is changed for the ui
Report the filter when data is grouped with UI commands - such as group,
group_counts, and set_grouping - to match the notice/ignore behavior added in
1562. The logic for setting the background group flag has been moved from the
UI layer to the DataPHA class. Addresses 1632.

1644 - Deployments via GH Actions
Dropped support for RH7 and macOS 10.15

1656 - CIAOX deployments require force. As they deployed for main already.
Based on the current scheme used for the build number, we need to force uploads
for CIAOX as they have already been deployed for main. This was already done for
the previous GitLab builds.

1660 - Associated group fixes
Clean up of the notice/ignore and group/ungroup code to avoid unnecessary work,
move logic from the UI layer into the DataPHA class, and ensure that if the
grouping field is set to None that the data is not grouped. Fix 1641, 1657,
and 1659

1662 - Add grouping tests
Add a number of tests to check out corner case behavior, primarily for grouping
PHA data but there's also a number of routines from the UI code that have missed
some tests.

1664 - Allow save_model/source/resid to work with 2D data (fix 1642)
Fix save_model/source/resid calls when used with 2D data sets. Fix 1642

1665 - Fix an issue with show_bkg (fix 1645)
The show_bkg routine could fail when the set of backgrounds is not the same for
all datasets (e.g. one has a background and another does not). Fix 1645

1666 - model-wrapped symbols now reference the actual model (fix 215)
Wrapped models, accessible from the UI layer, now reference the wrapped model
rather than being devoid of any useful information. Fix 215

1672 - models: f-string changes
Change the models code to use f-strings where appropriate rather than other methods
of string interpolation. There is no change in behavior.

1675 - Bump ds9 to 8.4.1 - Ubuntu 20 and macOS BigSur
Bump to the latest DS9 version and update to ubuntu20 version. This resolves 1674

1676 - update model macro definitions for compiled code
Re-work the macro definitions used to build the compiled models and use this to
clean up the handling of the XSPEC models, in particular table models. There is
no functional change.

1681 - XSPEC test cleanup
Minor clean up to some XSPEC tests to make better use of pytest.

1689 - Address regression created by 1672
Internal change to the Sherpa-specific logging code, to ensure that logged
message includes all components. This fixes 1688 which was a regression created
when 1672 was recently merged.

1693 - Test cleanup related to 1334
Complete the cleanup related to removing the 1334 workaround which was added in
1336. These two tests were missed from 1472 (which was meant to remove these
changes). The two test files have also seen some minor style changes (no change
in behavior).

1696 - Docs: fix 1694
Correct a link in the RTD documentation.

1697 - Ds9 test tweaks
Minor cleanup of the DS9 tests (no functional change)

12.11.1

Allows Sherpa to be built against XSPEC 12.11.1. There are no new or changed models
in this release compared to XSPEC 12.11.0.

899 - Update likelihood descriptions
Updates likelihood description in several doc-strings and clarifies descriptions
of statistics.

900 - Ensure that 1D and 2D models are not combined in an expression.
Checks that models have the correct dimensionality when combining them, so
expressions like gauss2d.src + const1d.bgnd will now raise a ModelErr.

906 - Improve and add support for histogram plots
Updates to the display of histogram-style plots, in particular for 1D integrated
datasets and some model display for PHA data. The histograms now cover the full
length of each bin (previously they only showed half the bin for the first and
last bins), and gaps in the histogram (where the high edge of a bin is less than
the lower edge of the next bin) are now correctly displayed.

907 - FEATURE: support alpha transparency for matplotlib plots
Supports the 'alpha' preference setting for most plots and contours generated
by Matplotlib

909 - Refactor: remove _get_model/source methods
Removes the _get_source and _get_model methods as they are the same as
get_source and get_model

910 - Docs: fix several minor issues
Documentation clean up - the load_template_interpolator function was named
incorrectly in the example, and the examples for
get_source_component_plot/get_model_component_plot were missing the trailing
_plot for the function names

911 - Docstring: changes for ahelp
Formatting changes to the docstrings for several routines that are useful for
SDS in generating ahelp files

918 - fix an issue with PHA filtering that affects plot_model
Fixes an issue when applying filters to generate the plot_model and
plot_model_component plots for PHA datasets

919 - enable regrid for the BinaryOpModel class (rebased 798)
Enables composite models (created by a binary operation between two models) to
be regridded. The composite model is evaluated at the new grid, and it is only
the combined model expression that is rebinned to the data grid.

922 - channel settings with grouped PHA data and model plotting
Fixes a bug when filtering a grouped PHA dataset using analysis=channel. The
selected bin ranges did not always match the versions you would have received
when doing the same operation with energy or wavelength analysis (the first or
last bin may have been different).

924 - Updated to ignore the .vscode directory
updates system .gitignore to skip over vscode directories

929 - Support overplot option in plot_fit_xxx (issue 700)
The overplot argument can now be used with the plot_fit_xxx and plot_bkg_fit_xxx
routines (e.g. plot_fit_ratio).

931 - Update Data1DInt / DataPHA data plots to use the histogram plot style
Switch the plot_data/plot_bkg plots to draw the data as histograms for Data1DInt
and DataPHA plots. This will change the behavior of code that accesses the plot
data - e.g. get_data_plot() or the dataplot element of get_fit_plot() - since for
DataPHA and Data1DInt datasets the data will no-longer have an x attribute but
xlo and xhi. To reduce the need for code changes for existing scripts - as many
people use get_model_plot and get_data_plot to get the data - the histogram
plots will return (xlo+xhi)/2 when asked for the x attribute.

939 - Docs: note XSPEC convolution models are new in 4.12.2
Documentation only change noting that the support for XSPEC convolution models
is new to 4.12.2.

940 - Minor documentation improvements
Fixed several minor issues in the existing documentation

944 - Improve handling of the default id with PHA background datasets (fix issue 943)
The sherpa.astro.ui.set_default_id call no-longer sets the default identifier for
background ids, which are now kept as the value 1. This avoids several issues when
using set_default_id with the background components of PHA datasets

950 - Documentation fixes
Minor documentation updates and adding ReSampleData to the RTD documentation

953 - docstring fixes
Cleans up typos in documentation

957 - Docs: include the example notebook in the RTD pages
Adds the example notebook (SherpaQuickStart.ipynb) to the Sphinx documentation
under the "Notebooks" heading

961 - Update notebook support for Data1DInt/PHA data
Improves the display of Data1DInt and DataPHA objects when displayed directly
by Jupyter notebook and add a new notebook showing off the notebook support

963 -Docs: note plot_fit_xxx overplot change and add info on notebook support
Adds documentation updates including notes on overplot support in plot_fit_xxx
and plot_bkg_fit_xxx functions and RTD notes on adding notebooks

964 - Docs: avoid invalid escape sequence warning
Very-minor tweak to the Chi2 docstring

968 - Fix 2d image filtering (fix 965)
Fix problems with ignore2d and notice2d when multiple regions are used.

969 - Support Python 3.8 for MacOSX
Add a new multiprocessing_start_method option to sherpa.rc and
sherpa-standalone.rc and init code to set start multiprocessing method
to fork by default.

971 - Docs: fix sphinx warnings
Fix documentation in sherpa.sim.sample on the ReadTheDocs site.

979 - Improve plots of PHA data sets and models when the response grid is not ideal
Improve the display (plots) of PHA data and models when the response grid contains minor numerical differences.
(fixes 977)

984 - Address set_xlog/ylog problems with DataPHA/Data1DInt classes (981)
Fix the set_xlog/ylog routines for PHA and 1D integrated datasets.

12.10.0

3.0.9. Without this change models such as XSapec would return all 0's (unless
the AtomDB version was set manually by the user).

534 XSPEC 12.10.1 support and mtable fix
Sherpa now supports XSPEC 12.10.1. Several issues were fixed to ensure
compatibility with this release. Note that there are known issues with version
12.10.1 (no patches), so at least v12.10.1a must be used.

537 / 552 sherpa.rc changes
Sherpa does not read the verbosity.level setting from sherpa.rc anymore but
the option is still in the file for backward compatibility

539 Fix XSPEC models: mtable table models and ismabs (fix 535, 538, 540)
Fix to address issues with XSpec- 535 XSPEC multiplicative table models
(mtable models loaded with load_xstable_model); 538 incorrect evaluation of
the ismabs model; 540 the kerrd model evaluated to 0 for XSPEC 12.10.0 and
later.

546 Small code cleanup in LevMar
small code cleanup in the LevMar class to match the other classes in that
file.

564 / 567 Harmonise the handling of dof is zero or negative in fit and calc_stat_info (fix 565)
The `fit` and `calc_stat_info` methods now use the same code to calculate
the reduced statistic (`rstat`) and "quality of fit" (`qval`) values. This
avoids a `TypeError` when the number of degrees of freedom is negative in
`calc_stat_info` and ensures that `NaN` is returned for both values when the
goodness-of-fit calculation has failed (e.g. the reduced statistic is zero or
less or the statistic is negative), whereas in previous versions the `qval`
value could be `None` or `1` depending on the code path.

576 Fix regression with responses `get_x` method
Version 4.10.1 introduced a regression which made the `get_x()` method fail
when called on RMF and ARF objects. This has been resolved.

583 Update pager code (fix 445 561)
Replace the use of an external pager (such as `more` or `less`) with a
Python one. This means that Sherpa no-longer uses the PAGER environment
variable, and that the screen output from the `show_*` series of commands
should now appear in the correct location when using a Jupyter notebook or the
spyder application.

8.5

Update to use newer ds9 version

1888 - UI: set_analysis reports the filter change - fix 1590
The sherpa.astro.ui.set_analysis call now reports the new filter. It will
also now error out if no data has been loaded. Fix 1590 and 1368.

1890 - Convert a RMF to an image
Add the sherpa.astro.instrument.rmf_to_image and sherpa.astro.instrument.
rmf_to_matrix routines for converting a RMF to DataIMG or a 2D matrix
respectively. Fix 1619. The create_non_delta_rmf routine in the same
module no-longer assumes the matrix is square. Fix 1889.

1891 - ui: add calc_bkg_stat - fix 333
Adds the calc_bkg_stat, calc_bkg_stat_info, and get_bkg_stat_info
routines. Fix 333.

1892 - data: group backgrounds before source - fix 1881
Change the ordering of operations when grouping background PHA datasets.
Fix 1881

1899 - Bokeh class
Provides a new backend plotting class which utilizes the Bokeh
visualization package.

1906 - Remove hardcoded matplotlib for _repr_html_ of RMF and DataImage2D
Implement RMFPlot and DataIMGPlot classes and associated UI functions
(plot_rmf, get_rmf_plot). Fix 1385

1908 - Add versionadded note to set_plot_backend
Added note that the set_plot_backend command is new in 4.16

1909 - Add security warnings to restore functions
Added documentation warning of inherent risks of importing binary files
when using restore functions.

1911 - IO: add missing import for pyfits backend
Ensure a corner-case error condition when writing out responses fails with
the correct error.

1912 - Warn when reading in a multi-matrix rmf
Ensure that attempts to read in a multi-matrix RMF will warn the user that
they are not yet supported.

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.