Sherpa

Latest version: v4.16.0

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

Scan your dependencies

Page 3 of 6

4.12.2

=============

This release of Sherpa serves as the baseline release of Sherpa for CIAO 4.13. It contains numerous enhancements and fixes including items which are stand alone sherpa specific. Notable highlights include:

* plotting improvements
* improved support for matplotlib (linestyle changes in matplotlib 3.3, support of alpha channels)
* overplot support for plot_fit_* plt_bkg_fit_*
* updates to histograms, residual plots
* data I/O and data handling
* several bug fixes to handling of the PHA, ARF, RMF files
* modeling
* support for regrid models in the binary expressions
* improvements and bug fixes to background treatment in spectral models
* improvements in the flux calculations and resampling
* added the Voigt model
* documentation changes
* improvements to Sherpa display in IPython/Jupyter notebooks
* updates to the content of the docstrings for generation of ahelp files

Details
-------

Testing and infrastructure fixes are not shown.

483 - An initial release of simultaneous fit on multicores (slower for most…
Distributes the evaluations of the multiple independent data sets using the
multi-cores built-in the user's workstation. The current default setting for this
PR is to evaluate the multiple independent data sets sequentially since the
overhead for distributing the workload across multi-cores is high if the evaluation
of the data sets is not time consuming.

631 - Add HTML representations of common classes for IPython display (fix 345)
An initial version of HTML display support for Sherpa objects for users of
IPython/Jupyter notebooks.

634 - Added invitation for native software citation
Adds a citation method to the sherpa module and updates CITATION to refer to this
new functionality

693 - Address matplotlib linestyle removal in Matplotlib version 3.3
Matplotlib version 3.3 now requires you to split out the drawstyle and linestyle
arguments. This set of PRs changes the code so that the two arguments are now set:
linestyle defaults to solid and drawstyle to default for plots and step-mid for
histograms. This appears to replicate the old version, and should be backwards
compatible (drawstyle is supported in Matplotlib 2.2.5 and 1.5.3)

709 - Residual-style plots ignore the ylog setting (fi586)
Residual, ratio, and delchi plots always use a linear scale for the y axis, no
matter what the ylog setting is.

740 - resample_data: when the error range on a bin includes -1 and no-longer restrict
sampling to +/-1 sigma
Fixes resample_data/ReSampleData so that it correctly handles bins where the range
of data values (i.e. low to high limit) includes the value -1.

741 - Fix issue 638, guess needs to update fwhm/sigma bounds
Adds support for guessing the fwhm or sigma parameters of the Gauss2D,
NormGauss2D, and SigmaGauss2D models

750 - Add xspec convolution api
Adds support for XSPEC convolution-style models - this link is valid for XSPEC
12.10.1 documentation

765 - Add docs for setting up all dependencies of the source build with conda
Adds documentation on how to use conda to install source build dependencies

766 - No error for no-ops in `ungroup` and friends
Removes DataErrs when ungrouping a dataset that is not grouped or unsubtracting
a dataset that was not subtracted

770 - Replace EmissionVoigt/AbsorptionVoigt models by Voigt model (fix 597)
Replaces the EmissionVoigt and AbsorptionVoigt models with a single model,
Voigt1D. The EmissionVoigt and AbsorptionVoigt models will error out when an
instance is created, pointing users to Voigt1D (as the parameter definitions
have changed).

772 - Add XSPEC 12.11.0 support (HEAsoft 6.27)
Adds support for XSPEC 12.11.0 (released March 31 2020)

782 - Add a pyproject.toml file
Adds a pyproject.toml file to the top level (PEP 518) to document build
requirements

789 - fix issue 788, fit using moncar with verbose=1 and/or numcores!=1
Fixes NameError in moncar when verbose setting >0

791 - Fix ignore/notice error-ing out when all bins have been set bad 790
Allow notice and ignore to be called on a dataset which has no "good" bins
after ignore_bad has been called

793 - Accept masked arrays for Data XXX creation
Allows use the mask of numpy arrays when initializing DataXXX

803 - Updates to sampling of energy and photon fluxes: bug fixes and calculate
unabsorbed components
Fixes and improvements to the energy_flux and photon_flux set of commands:
sample_energy_flux, sample_photon_flux, plot_energy_flux, plot_photon_flux,
get_energy_flux_hist, and get_photon_flux_hist

811 - Remove all __future__ imports
Removes __future__ imports that were in place when sherpa supported python 2

812 - Add unsubtract and ungroup to datastack
Adds corresponding unsubtract and ungroup methods to match subtract and group

815 - fix typo in rst docs
Fixes a typo in the rst docs

821 - Add hyperlink to similarly named SHERPA package
Documentation update to include a link to thethe similarly named package "SHERPA"
for hyperparameter tuning of machine learning models

842 - Fix scaling of staterror when reading PHA file with rate instead of counts
Fixes scaling of STAT_ERR when reading a PHA spectra with a RATES column instead of
COUNTS

845 - xspec table models: add out-of-bound check to avoid segfault
Adds explicit out of bounds checks to avoid segv when calling an Xspec table model

851 - Updates to the Read-The-Docs build environment
Update the Read-The-Docs configuration to the latest version (2), and switch to a
cleaner build (using conda) for the documentation. The minimum Sphinx requirement is
now 1.8 (updated from 1.3).

856 - Support setting the id value in load_pha with pha2 files (fix 666)
Updates load_pha to set the data ids of PHA2 datasets to: id to id + nfiles - 1
(when id is an integer), or "{}1".format(id) to "{}{}".format(id, nfiles) when id
is a string.

858 - Minor documentation improvements to ReadTheDocs
Adds minor updates to the convolution, regrid, and model evaluation sections of
the ReadTheDocs documentation

859 - Clean up of the XSPEC interface code
Internal changes to the XSPEC interface code, which reduces the amount of similar
(sometimes identical) code. There is no change to the behavior of the XSPEC models.

865 - Minor documentation fixes
Several documentation fixes: XSPEC parameter names, avoiding confusion over links on
references (Sphinx pages), and adding some basic documentation to the
sherpa.astro.background module

866 - Add parameter-clipping strategy to routines that generate samples (fix 846)
The addition of the clip parameter lets users control how parameter values are
clipped before use in sample_energy_flux, sample_photon_flux, plot_energy_flux,
plot_photon_flux, get_energy_flux_hist, and get_photon_flux_hist.

868 - Add delete_pileup_model (fix 441), list_pileup_model_ids, list_psf_ids functions,
fix list_models (fix 749)
Add the delete_pileup_model() function to allow a pileup model to be removed from
a fit (issue 441), and list_psf_ids() and list_pileup_model_ids() routines to list
those datasets with an associated PSF or pileup model. The list_models() routine
no-longer returns an iterator but a list when given an option (issue 749).

871 - Add MacOS LDFLAGS warning to devdocs
Copies the warning about setting PYTHON_LDFLAGS from the install page to the
developer docs

884 - Move logic from ui layer to DataPHA class: background responses (fix 879, 880)
Moves the logic for adding a background response, if one doesn't exist, from the UI
layer to the DataPHA class to clear up several edge cases

888 - Support vector backscales and bugfix for background modeling
Supports fitting backgrounds to PHA datasets which have a variable BACKSCAL array
(rather than a scalar), which can come from combining spectra (e.g. the CIAO contrib
script combine_spectra) or from the data extraction process. In doing so a number of
routines related to the scaling of background-to-source aperture data have seen
adjustments to behavior and some enhanced functionality (such as
sherpa.astro.ui.get_bkg_scale and the sherpa.astro.data.DataPHA.get_background_scale
method).

4.12.1

=============

This release of Sherpa supports a patch for CIAO 4.12. This release is driven by fixes that were deemed necessary to warrant a patch to sherpa in the CIAO 4.12 release. The changes include issues which had the potential of impacting users by either stopping an analysis session or providing incorrect or potentially confusing results, particularly in the area of grating analysis and multiple datasets. Additionally, this patch includes several fixes and improvements such as initial support for Python 3.8.

This version of Sherpa has been tested with Python 3.5, 3.6, and 3.7. There has been limited python 3.8 testing as well.

Details
-------

Testing and infrastructure fixes have been omitted

4.12.0

=============

This release of Sherpa is based on the CIAO 4.12 release and includes additional
bug fixes and improvements.

This version of Sherpa has been tested with Python 3.5, 3.6, and 3.7.

This release also provides support for XSPEC 12.10.1 (patch 'a' or later) in
addition to versions 12.10.0 (included in CIAO) and version 12.9.1.

Details
-------

Documentation and infrastructure fixes are not shown.

388 - Address indexing DeprecationWarning/IndexError from NumPy for PHA data with filter + ignore_bad (fix 361)

602 - Reduce integration tol
Changed integration routine tolerance from double epsilon to float epsilon
since opt routines hove tolerance of ~ 1.0e-7

606 - stop using numpy.typeNA which is now deprecated
A numpy deprecation warning was fixed by removing the usage of typeNA, which
was not documented and will be removed in a future release of numpy. The
print_fields function has been changed to include a default mapping using
the current typeNA implementation.

608 - update ciao default plotter to matplotlib
The default Sherpa plotting package has been changed to matplotlib for
CIAO users as well (it had been the default for standalone users for
several years). The update will be applied to new users when the
`sherpa` command is run. Users of previous versions would need to
edit/regenerate the file.

616 - enable run-time-option to test cache (default=True)
Capability to allow the user to turn off caching at runtime for testing
purpose.

622 - Do not create warnings about error bars in plots if no error bars are to be shown (fix 621)
Remove the The displayed errorbars have been supplied with the data or
calculated using chi2xspecvar... warnings that appear for data,
residual/ratio, and fit plots when the user has explicitly turned off
the display of errorbars (by setting the yerrorbars plot-preference
setting to False).

626 - add plot_fit_ratio and plot_bkg_fit_ratio functions
Add the plot_fit_ratio function to the sherpa.ui layer (to match
plot_fit_resid and plot_fit_delchi) and plot_bkg_fit_ratio to the
sherpa.astro.ui layer. Added tests for a number of plot types.

640 - fix 'tuple index out of range' error in the fit.est_errors method
Sherpa's Confidence class is confused if a parameter is frozen then
thawed after a fit resulting with an exception of the form: IndexError:
tuple index out of range. The error does not show up if conf is called
from the ui level

647 - fix numpy hist warnings
When plotting a PDF Sherpa now calls numpy.histogram with density=True |
False rather than normed=True|False. There is no change visible to the
user other than a warning that will not be issued anymore. normed=True
was broken for non uniform bins, but our code always produces uniform
bins, so we should never hit the problematic case.

658 - Handle files with MJD_OBS or MJD-OBS keywords (datastack module)
The sherpa.astro.datastack module has been updated to deal with files
that use the MJD-OBS keyword instead of MJD_OBS. This is only used by
the show_stack routine, which prints out several keywords from each
file in the stack.

665 - Remove python 2.7 support (fix 498)
Remove support for Python 2.7 from Sherpa. The metadata used by pip now
requires python 3.5 or higher (but not version 4),

667 - improve matplotlib plot_fit plots (order of data and model)
Changes to Zorder of plot objects drawn by matplotlib to be more readible

674 - Add link/unlink parameter tests
This PR adds three tests for sherpa's un/link commands.

677 - XSPEC: build against 12.10.1m by removing support for models
Remove support for XSrelline, XSrelline_lp, and XSrelline_lp_ext models.
These were added in 12.10.1 but removed in 12.10.1m. It does not seem
worth supporting just those versions where they were available.

680 - Remove the unused parameter in sherpa.astro.optical.LogEmission model (fix 219)
Remove the unused parameter in the sherpa.astro.optical.LogEmission
model. The LogEmission model only has four parameters (fwhm, pos, flux
and skew) consistent within the calc method. The hidden parameter limit
and it doc were removed.

682 - jointplot now respects the ratio argument (top plot is larger) with matplotlib backend
The matplotlib back end now makes the main (top) plot taller than the
secondary (bottom) plot when using the sherpa.ui.plot_fit_resid and
sherpa.ui.plot_fit_delchi routines (this also holds for the
sherpa.astro.ui variants).

683 - Remove chips from the documentation
Remove mention of ChIPS from the documentation (both on read the docs
and in the sherpa.astro.ui and sherpa.ui modules), replacing with
matplotlib where appropriate.

684 - Add default config options
Whenever an option is read from the configuration file (~/.sherpa.rc)
provide a default option in case the configuration file is missing
(or is missing this option).

685 - raise ModelErr when model using Data1DInt have overlapping bins
Adds a check to regrid make sure the integrated bins do not overlap.
The PR is a fix for issue 569

688 - Improve documentation and testing for get_source_plot when sent lo/hi arguments
Improve the documentation for the sherpa.astro.ui.get_source_plot routine,
describing how touse the result when the lo or hi arguments are sent.

691 - add warning when chips is selected but cannot be imported (rebase of 648)
Sherpa now warns the user if Chips is selected as a backend but it is
not available in the installation

692 - Allow users to override plot preferences when creating a plot
Change to allow kwargs to be specified to change plot preferences at
creation time

698 - Add warnings in documentation about masked arrays
Updates docstring to indicate that sherpa doesn't support numpy masked
arrays

701 - a fix for /data/lenin2/Test/CIAO4.11/SherpaRegressionBeta1/45
Enables the testers to turn on (or off) caching at runtime to test 444

704 - change calc_ftest from delta dof to dof (similar to XSPEC) - fix for 641
Update to make sherpa's calc_ftest provide same results as XSPEC's
ftest (fix to 641)

705 - modelCacher1d needs to have a couple of deep instead of shallow copy()
Update to make deep copy of cached function values (fix to 673)

710 - Add warning about masked array to sherpa.astro.ui.load_arrays
Updates docstring to contain warning consistent with 698

712 Minor typo in docs
Corrects a typo "is is" in the documentation.

716 Fix for plot_cdf: plot() got an unexpected keyword argument 'clearwindpw'
Recent changes broke plot_cdf()due to a typo 'clearwindpw'. This update
corrects the typo.

721 Docs: update installation notes for conda environment
Add a warning about the need to set PYTHON_LDFLAGS to ' ' on macOS when
building within an anaconda environment. This is a documentation-only
change.

725 convert a list to np.array to avoid warning messages
Fixes issue 723 (a lot of warnings while running 'resample_data()' in
CIAO4.12 Sherpa)

728 a fix cause using load_multi_arfs causes caching error
Fixes issue 717 (unable to fit if script uses load_multi_arfs/rmfs)

4.11.1

=============

This release of Sherpa introduces several functional improvements and bug fixes,
in particular Sherpa now has support for:
* asymmetric error bars
* PSFs with better pixel resolution than the data
* running optimization in parallel

Details
-------

630 Fix "get_int_proj does not work when recalc=True" (543)
get_int_proj did not work when recalc=True on Python 3. This has now been fixed.

615 Asymmetric Errors
Sherpa now supports asymmetric error bars. Errors can be read through a new
`load_ascii_with_errors` high level function, or through the new
`Data1DAsymmetricErrs` class. Sherpa uses bootstrap for estimating the uncertainties.

585 plot pvalue
Updates to utilize the appropriate response files (ARF and RMF) for X-ray spectra
and changes to the p_value output to 1/(number of simulations) when p_value is 0
and the number of simulations in not large enough.

596 Run optimization algorithms over multiple cores
This PR enables the user to run the optimization algorithms (DifEvo, LevMar,
and NelderMead) on multi-cores.

607 PSF rebinning (fix 43)
Sherpa now supports using a PSF with a finer resolution than 2D images. If Sherpa
detects that the PSF has a smaller pixel size than the data, it will evaluate the
model on a "PSF Space" that has the same resolution as the PSF and the same footprint as
the data, then rebin the evaluated model back to the data space for calculating the statistic.

614 Refactor data classes (fix 563, 627, 628)
Sherpa's basic data classes have been refactored and cleaned up to help
facilitating fixing bugs and implementing new features. New tests were added to reduce
the chances of introducing regressions in the future.

612 Fix 609 User Model: unable to change parameter values
A regression introduced in Sherpa 4.10.0 presented users from change
user-model parameter values through direct access. This issue has been
fixed. Several tests were added to reduce the chance of regressions in
the future.

Fix 514 - the command line tool `sherpa_smoke` in the conda package now correctly honors
command line arguments.

4.11.0

=============

Optimization routines and statistic methods were made more robust with several
bug fixes and improvements.

This version of Sherpa has been tested with Python 2.7, 3.5, 3.6, and 3.7.
Support for Python 2.7 is being deprecated and may be dropped in future
releases.

This release also provides support for XSPEC 12.10.1 (patch 'a' or later) in
addition to versions 12.10.0 (included in CIAO) and version 12.9.1.

Details
-------

Documentation and infrastructure fixes are not shown.

444 Improve caching
When fitting multiple datasets simultaneously Sherpa now tries to cache
model evaluations to improve performance.

465 Support XSPEC 12.10.0 (fix 436)
XSPEC 12.10.0e is now supported

508 Ensure fields are initialized before use (pileup code)
Resolved an issue where some fields in the C++ extension could have been
uninitialized in a corner case.

523 Ensure the ui modules have a unique list of exported symbols (fix 502)
Remove the `sherpa.utils.erf` symbol from the two `ui` modules as it is
"over-written" by the ModelWrapper-created symbol when applied to
`sherpa.models.basic.Erf`.

524 Be explicit about 'invalid escape characters' in strings
Convert strings that contain "invalid" escape characters, which newer
versions of Python complain about, to raw strings by preceding them with a 'r'
character.

525 Fixed based line radpro_dm test and changed double --> real (template)

530 Ensure XSPEC 12.10.0 uses ATOMDB 3.0.9 by default
Ensure that the default AtomDB version is 3.0.9 when using XSPEC 12.10.0.
This is to fix an issue with the models-only XSPEC installation in XSPEC

4.10.2

==========

This release fixes a regression introduced in Sherpa 4.10.1 related to PSF convolution. As part of the long term PSF rebinning improvements,
Sherpa 4.10.1 introduced a check to validate that the data pixel size and the PSF pixel size match. If they don't match, then a warning is issued.
The change did not account for an edge error case. Sherpa 4.10.2 solves this problem.
The regression introduced a downstream regression in the gammapy project.

Details
---------

551 Fix gammapy/gammapy1905, catch errors with psf pixel size.
Sherpa did not properly catch errors when checking the PSF pixel size matches the image pixel size. This has now been fixed.

Caveats
-----------
There is a potential issue for macOS conda users with python > 3.6 and matplotlib v3.0.1, when pyqt5 is not installed and selected as a matplotlib
backend. With this specific combination of platform and dependencies matplotlib can fail to work properly. The issue can be replicated without
importing Sherpa, so this is not a Sherpa bug.

Several workarounds exist, the simplest of which are:
* install pyqt5 (`conda install pyqt`).
* downgrade matplotlib to v2 or v3.0.0 (`conda install matplotlib=3.0.0`)

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.