1
0
forked from pool/python-sherpa

55 Commits

Author SHA256 Message Date
cbfafa462b Accepting request 1296400 from devel:languages:python:numeric
- Update to 4.17.1:
  * enhancements:
    + improved handling for OGIP products that do not follow the standards
    + Models can now be combined using arbitrary ufuncs
    + various updates to XSpec interface and support for XSpec 12.15.0
      including the additional of 17 new models
    + added interface to support ArviZ for analysis of Bayesian models
  * infrastructure and testing:
    + updated tests to work with python 3.13
  * bug fixes:
    + fixed a bug in the caching code that limited the cache size to 1
    + update to use fake_pha for missions which don't use 1 as the first
      channel
- Dropped patches:
  * sherpa-pr2188-np2docstrings.patch
  * sherpa-pr2207-mpl.patch
  * support-pytest-8.3.4.patch
- Refresed sherpa-suse-libdir.patch
- Add patch support-gcc-15.patch:
  * Specify function declarations correctly.

OBS-URL: https://build.opensuse.org/request/show/1296400
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=26
2025-07-30 09:45:52 +00:00
755cbffa2f - Update to 4.17.1:
* enhancements:
    + improved handling for OGIP products that do not follow the standards
    + Models can now be combined using arbitrary ufuncs
    + various updates to XSpec interface and support for XSpec 12.15.0
      including the additional of 17 new models
    + added interface to support ArviZ for analysis of Bayesian models
  * infrastructure and testing:
    + updated tests to work with python 3.13
  * bug fixes:
    + fixed a bug in the caching code that limited the cache size to 1
    + update to use fake_pha for missions which don't use 1 as the first
      channel
- Dropped patches:
  * sherpa-pr2188-np2docstrings.patch
  * sherpa-pr2207-mpl.patch
  * support-pytest-8.3.4.patch
- Refresed sherpa-suse-libdir.patch
- Add patch support-gcc-15.patch:
  * Specify function declarations correctly.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=52
2025-07-30 01:15:55 +00:00
78f7e6e3ac Accepting request 1245410 from devel:languages:python:numeric
- Add sherpa-pr2207-mpl.patch for matplotlib 3.10 test
  compatibility gh#sherpa/sherpa#2207

OBS-URL: https://build.opensuse.org/request/show/1245410
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=25
2025-02-12 20:39:12 +00:00
c3d2b4e05c - Add sherpa-pr2207-mpl.patch for matplotlib 3.10 test
compatibility gh#sherpa/sherpa#2207

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=50
2025-02-12 14:56:16 +00:00
417686b0dd Accepting request 1241023 from devel:languages:python:numeric
- Add patch support-pytest-8.3.4.patch:
  * Support pytest 8.3.4 changes.

OBS-URL: https://build.opensuse.org/request/show/1241023
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=24
2025-01-29 15:16:47 +00:00
45278798b7 - Add patch support-pytest-8.3.4.patch:
* Support pytest 8.3.4 changes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=48
2025-01-29 05:29:04 +00:00
45f8ea50e6 Accepting request 1228824 from devel:languages:python:numeric
- Update to 4.17.0
  * This release of Sherpa includes various enhancements,
    documentation updates, bug fixes, and infrastructure changes.
  ## enhancements:
  * add calc_model and calc_source functions to return an evaluated
    model/source array
  * added wstat to plot_pvalue for the likelihood ratio test
  * changed XSpec interface to use FunctionUtility C++ API instead
    of XSFortran API
  * improved support for PHA data starting at channel 0 and
    handling of STAT_ERR and SYS_ERR PHA columns which are set to 0
  * improved guess for complex models
  * improved filtering handling
  * several updates to enhance plotting capabilities and layout
  ## documentation changes:
  * added paper citations to front page of Sherpa Read the Docs
    documentation
  * cleaned up various typos and URL references
  * added examples such as use of set_x/y_label
  ## infrastructure and testing:
  * improved test coverage
  * many updates to CI
  * drop support for Python 3.9 and numpy <1.24
  * initial/experimental support for Python 3.12
  ## bug fixes:
  * fixed an issue with plotting 1D data with asymmetric errs after
    filter
  * include the default identifier in save_all output if it has
    been changed
- Drop numpy2.patch
- Add sherpa-pr2188-np2docstrings.patch gh#sherpa/sherpa#2188
- Add sherpa-suse-libdir.patch

OBS-URL: https://build.opensuse.org/request/show/1228824
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=23
2024-12-08 10:37:24 +00:00
de47efe118 - Update to 4.17.0
* This release of Sherpa includes various enhancements,
    documentation updates, bug fixes, and infrastructure changes.
  ## enhancements:
  * add calc_model and calc_source functions to return an evaluated
    model/source array
  * added wstat to plot_pvalue for the likelihood ratio test
  * changed XSpec interface to use FunctionUtility C++ API instead
    of XSFortran API
  * improved support for PHA data starting at channel 0 and
    handling of STAT_ERR and SYS_ERR PHA columns which are set to 0
  * improved guess for complex models
  * improved filtering handling
  * several updates to enhance plotting capabilities and layout
  ## documentation changes:
  * added paper citations to front page of Sherpa Read the Docs
    documentation
  * cleaned up various typos and URL references
  * added examples such as use of set_x/y_label
  ## infrastructure and testing:
  * improved test coverage
  * many updates to CI
  * drop support for Python 3.9 and numpy <1.24
  * initial/experimental support for Python 3.12
  ## bug fixes:
  * fixed an issue with plotting 1D data with asymmetric errs after
    filter
  * include the default identifier in save_all output if it has
    been changed
- Drop numpy2.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=46
2024-12-06 17:18:04 +00:00
5258946ee6 Accepting request 1200258 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1200258
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=22
2024-09-12 14:57:17 +00:00
9b4ec04117 Accepting request 1177688 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1177688
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=21
2024-05-30 13:33:56 +00:00
e1bfbace1a Accepting request 1177590 from home:glaubitz:branches:devel:languages:python:numeric
- Update to 4.16.1:
  * enhancements:
    + minor plotting changes; add support for splitting model expression into
    + additive components and plot the results; support of log scale axes for
    + confidence plots; improved error messages for unavailable plot backends
    + improved RMF plot display to allow choice of energy units
  * documentation changes:
    + updates to fake_pha documentation
    + updates to install.rst to fix incorrect links and outdated version references
    + updated read the docs documentation to match current code
  * bug fixes:
    + fixed multi-panel plot issue with Bokeh backend

OBS-URL: https://build.opensuse.org/request/show/1177590
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=42
2024-05-30 07:39:19 +00:00
3b8e0a2a55 Accepting request 1173052 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1173052
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=20
2024-05-10 10:05:57 +00:00
da2366ddf7 Accepting request 1172907 from home:badshah400:lapack2023
Do not run tests in parallel to avoid random failures (gh#sherpa/sherpa#2031).

OBS-URL: https://build.opensuse.org/request/show/1172907
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=40
2024-05-10 07:50:13 +00:00
603ff0adc1 Accepting request 1147599 from devel:languages:python:numeric
Forwarded request #1147463 from bnavigator

- Skip python312: Requires setuptools < 60 and distutils

OBS-URL: https://build.opensuse.org/request/show/1147599
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=19
2024-02-20 20:13:57 +00:00
0cf622083d Accepting request 1147463 from home:bnavigator:branches:devel:languages:python:numeric
- Skip python312: Requires setuptools < 60 and distutils

OBS-URL: https://build.opensuse.org/request/show/1147463
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=38
2024-02-19 14:15:29 +00:00
1019696aa2 We don't need _constraints after all.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=37
2024-01-03 21:40:09 +00:00
c21dedd431 Perhaps not.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=36
2024-01-03 21:26:31 +00:00
898d30b293 - Add _constraints to add memory and disk available for testing.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=35
2024-01-03 19:46:16 +00:00
7fcc21ca5f Accepting request 1133227 from devel:languages:python:numeric
- Update to 4.16.0:
  * enhancements:
    + the grouping commands like group_counts and group_snr now default to
      only grouping within the noticed range of channels, which is a change
      in behaviour
    + new plotting backend: Users can now choose between matplotlib and
      bokeh (experimental) support use of arbitrary python functions when
      linking model parameters
    + updates to fake_pha, save_all, allowing to write out RMF/ARF files
    + get_plot_prefs and get_contour_prefs call to simplify access to the
      plot and contour preferences
    + implementation of RMFPlot and DataIMGPlot classes and associated UI
      functions (plot_rmf, get_rmf_plot)
    + update support for XSPEC to include version 12.13.1, allow XSPEC
      table models which include the ESCALE parameter, and provide
      experimental support for writing out XSPEC table models.
  * changes to use the NumPy random generator API
  * bug fixes:
    + PHA source plot Y axis scaling (#1825)
    + fix model display for grouped data (#1779, #1784)
    + Change in the ordering of operations when grouping background PHA
      datasets. (#1881)
- Drop patch numpy125.patch and numpy125-CI.patch: Included upstream.
- Skip a misbehaving test.

OBS-URL: https://build.opensuse.org/request/show/1133227
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=18
2023-12-15 20:48:44 +00:00
f50f69dd2d - Update to 4.16.0:
* enhancements:
    + the grouping commands like group_counts and group_snr now default to
      only grouping within the noticed range of channels, which is a change
      in behaviour
    + new plotting backend: Users can now choose between matplotlib and
      bokeh (experimental) support use of arbitrary python functions when
      linking model parameters
    + updates to fake_pha, save_all, allowing to write out RMF/ARF files
    + get_plot_prefs and get_contour_prefs call to simplify access to the
      plot and contour preferences
    + implementation of RMFPlot and DataIMGPlot classes and associated UI
      functions (plot_rmf, get_rmf_plot)
    + update support for XSPEC to include version 12.13.1, allow XSPEC
      table models which include the ESCALE parameter, and provide
      experimental support for writing out XSPEC table models.
  * changes to use the NumPy random generator API
  * bug fixes:
    + PHA source plot Y axis scaling (#1825)
    + fix model display for grouped data (#1779, #1784)
    + Change in the ordering of operations when grouping background PHA
      datasets. (#1881)
- Drop patch numpy125.patch and numpy125-CI.patch: Included upstream.
- Skip a misbehaving test.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=33
2023-12-15 03:58:15 +00:00
66ebaa0d74 Accepting request 1109765 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1109765
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=17
2023-09-10 11:10:01 +00:00
d49bf1d729 Accepting request 1109557 from home:mcalabkova:branches:devel:languages:python:numeric
- Add upstream patches numpy125.patch and numpy125-CI.patch

OBS-URL: https://build.opensuse.org/request/show/1109557
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=31
2023-09-08 17:10:57 +00:00
8a95e0eb93 Accepting request 1089585 from devel:languages:python:numeric
- update to 4.15.1:
  * further improvements to filtering/grouping including
    reporting a filter change in the UI
  * fake_pha can be called with a list of ARF/RMF names
  * added linewidth option for line and histogram plots
  * documentation changes:
  * fixed broken URLs
  * improved documentation for templates, plot_pvalue
  * added documentation testing with doctestplus
  * Infrastructure changes:
  * dropped support for Python 3.8
  * experimental support of Python 3.11
  * supported versions of Xspec are 12.12.0 - 12.13.0
  * bug fixes:
  * various updates to notice/ignore and group/ungroup code
  * fixed issue with show_bkg
  * fixed issue when binning values into a 1D histogram
  * fixed cache errors with the TableModel class

OBS-URL: https://build.opensuse.org/request/show/1089585
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=16
2023-05-30 20:02:12 +00:00
79996de9c9 - update to 4.15.1:
* further improvements to filtering/grouping including
    reporting a filter change in the UI
  * fake_pha can be called with a list of ARF/RMF names
  * added linewidth option for line and histogram plots
  * documentation changes:
  * fixed broken URLs
  * improved documentation for templates, plot_pvalue
  * added documentation testing with doctestplus
  * Infrastructure changes:
  * dropped support for Python 3.8
  * experimental support of Python 3.11
  * supported versions of Xspec are 12.12.0 - 12.13.0
  * bug fixes:
  * various updates to notice/ignore and group/ungroup code
  * fixed issue with show_bkg
  * fixed issue when binning values into a 1D histogram
  * fixed cache errors with the TableModel class

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=29
2023-05-29 14:13:39 +00:00
e5206e31b5 Accepting request 1060053 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1060053
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=15
2023-01-21 18:11:17 +00:00
f06ed7f1b8 Accepting request 1059941 from home:bnavigator:branches:devel:languages:python:numeric
- Update to 4.15.0
  * This release of Sherpa includes various enhancements,
    documentation updates,  bug fixes, and infrastructure changes.
  ## Enhancements:
  * Improved validation of arguments when creating Data objects:
    - arrays sent to Data objects are now converted to ndarrays
    - the independent axis is now made read-only
    - the size of a data object is now fixed.
  * Filter setting with notice/ignore are reported to the screen
    for the users of the UI layer.
  * Increased test coverage for plotting
  ## Documentation changes:
  * updated readthedocs to use pip and pytest instead of setup.py
  * several updates to documentation, including updates to
    fake_pha, calc_ftest, calc_mlr
  ## Infrastructure changes:
  * Drop support for Python 3.7
  * Updates to start creating Python 3.10 Conda packages.
  * Use Numpy 1.20 for Python 3.8/3.9 and Numpy 1.21 for Python
    3.10.
  * Moves toward PEP-517 with some distutils cleanup and more
    configuration moved from setup.py to setup.cfg
  * Various improvements to the GitHub Actions and GitLab workflows
  ## Bug fixes:
  * Ensure chi2xspecvar errors match XSPEC when 0 counts are
    present during background subtraction
  * Remove model instances from the global symbol table when clean
    is called
  * Addresses new warnings in the tests for Matplotlib 3.6.0 and
    AstroPy 5.1

OBS-URL: https://build.opensuse.org/request/show/1059941
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=27
2023-01-20 22:42:00 +00:00
2403224e1f Accepting request 995127 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/995127
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=14
2022-08-16 15:07:02 +00:00
6951b439d9 Accepting request 993811 from home:bnavigator:branches:devel:languages:python:numeric
- Sherpa requires a build with setuptools < 60:
  * Use python3X bundled setuptools instead of distribution package
  * Enable early skip_python311 because that bundles setuptools 62

OBS-URL: https://build.opensuse.org/request/show/993811
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=25
2022-08-15 07:21:58 +00:00
d0305603b7 Accepting request 982377 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/982377
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=13
2022-06-14 22:31:55 +00:00
6273b367ad Accepting request 981947 from home:bnavigator:branches:devel:languages:python:numeric
- Update to 4.14.1
  * enhancements:
    - various plotting backend improvements
    - various i/o backend improvements
    - data object class improvements
    - basic support for Xspec 12.12.1
    - beta support for python 3.10
  * documentation changes:
    - updated build with CIAO documentation
    - Add a missing class (DataOgipResponse) to the documentation
    - Improves the docstrings for DataPHA
    - fixed typos in plot docs
    - clean up readthedocs issues such as missing bullets
  * Infrastructure changes:
    - updates for compatibility with Clang 12.0
    - updates to the regression tests
  * bug fixes:
    - Improve the FITS headers created when writing out a PHA file (to better match OGIP standards)
    - addresses delete_model_component call failing if a key does not exist
    - fixed issue with writing a PHA dataset as a table rather than a PHA file
    - ensure FITS column access is case insensitive
    - image handling and image coordinates
 - Drop sherpa-pr1318-py310tests.patch fixed upstream
 - Drop sherpa-pr1319-distutils-hack.patch fixed upstream

OBS-URL: https://build.opensuse.org/request/show/981947
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=23
2022-06-13 08:29:00 +00:00
e635a6f41a Accepting request 952081 from devel:languages:python:numeric
- Add sherpa-pr1318-py310tests.patch -- gh#sherpa/sherpa#1318
- Skip two tests failing on non x86_64 due to floating point
  precision
- Disable 32-bit ARM build
- Add sherpa-pr1319-distutils-hack.patch -- another attempt for
  python310 compatibility (gh#sherpa/sherpa#1319)

OBS-URL: https://build.opensuse.org/request/show/952081
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=12
2022-02-07 22:38:13 +00:00
10e1774ca2 Fix changelog
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=22
2022-02-07 09:22:44 +00:00
902ac9b232 Accepting request 951639 from home:bnavigator:branches:devel:languages:python:numeric
- Add sherpa-pr1318-py310tests.patch -- gh#sherpa/sherpa#1318
- Skip two tests failing on non x86_64 due to floating point
  precision
- Disable 32-bit ARM build

OBS-URL: https://build.opensuse.org/request/show/951639
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=21
2022-02-06 07:07:42 +00:00
ab152915d1 Accepting request 935928 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/935928
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=11
2021-12-06 22:59:56 +00:00
7ec0f4a8b5 Accepting request 935920 from home:Guillaume_G:branches:devel:languages:python:numeric
- Update to 4.14.0:
  * enhancements:
    - filtering and grouping area for binned (1D) spectral data has been improved
    with changes to the default behavior and many bug fixes resulting in changes
    to the statistics, degrees-of-freedom and energy flux in comparison to the
    previous version for the same data with the same filter.
    - updates to allow users to change the hard limits of XSPEC model parameters
    - the sample_flux routine now returns correct information for the clip column
  * documentation changes:
    - improved PHA simulation documentation
    - improved Filtering and grouping of PHA data documentation
    - added sherpa.image module documentation
    - added section on running tests to developer docs
  * Infrastructure Changes:
    - updates to support Apple ARM
    - update to support Xspec version 12.12
    - update fftw from version 3.3.8 to 3.3.9
    - clean up of compiler and sphinx warnings
    - changes to support gcc 9.3.0 in conda defaults
    - updates to support python 3.9 including readline 8.1 upgrade, numpy minimum
    1.19 (numpy 1.18 minimum for python 3.7/8)
    - test infrastructure clean up and updates
  * bug fixes:
    - updates to fix several 'unable to parse region string: None' errors
    - fix issue where save_all() of a loaded image with no region filter would fail
    on reload
    - fixed issue with plot_model() being called before notice or ignore could
    lead to filters not getting applied
    - fix to error out instead of crash when grouping data using an unsupported
    method

OBS-URL: https://build.opensuse.org/request/show/935920
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=20
2021-12-06 08:40:46 +00:00
f476be3318 Accepting request 910430 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/910430
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=10
2021-08-06 20:44:50 +00:00
80d61407f3 Accepting request 910375 from home:bnavigator:astropy
- Add sherpa-pr1227-astropy43.patch in order to fix test failure
  gh#sherpa/sherpa#1227

OBS-URL: https://build.opensuse.org/request/show/910375
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=19
2021-08-06 06:28:57 +00:00
b20946ac29 Accepting request 899444 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/899444
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=9
2021-06-11 20:30:48 +00:00
e6b2dc634a Accepting request 899441 from home:Guillaume_G:branches:devel:languages:python:numeric
- Update to 4.13.1:
  * documentation changes:
    - updates to documentation for TableModel, Notice2D, cache
    support for evaluating models, and low level optimization code
    - jupyter notebook uopdates
  * Infrastructure Changes:
    - the master branch has been migrated from master to main
    - updates to support numpy 1.20
    - updates to support astropy 4.2.1
    - updates to support matplotlib 3.4
    - test infrastructure clean up and updates
  * bug fixes:
    - fix an issue with cache evaluation on 1D models using
    integrated bins
    - fix for aarch64 build issue
    - fix to sherpa citation command
    - fix to honor clearwindow setting for plot_source
    - fix errors from save_data when the output file exists
    - fix build issues using gcc 7.3 with -Werror=format-security
    compilation flag
    - fix for reg_proj and reg_unc erroring out when the min or max
    arguments are tuples rather than lists
- Drop upstreamed patches:
  * sherpa-fix-aarch64.patch
  * sherpa-numpy-1.20.patch
  * sherpa-mpl-3.4.patch

OBS-URL: https://build.opensuse.org/request/show/899441
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=17
2021-06-11 10:23:51 +00:00
b40171e0be Accepting request 888258 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/888258
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=8
2021-04-25 19:27:20 +00:00
f2cfdec32b Accepting request 888253 from home:bnavigator:branches:devel:languages:python:numeric
- Fix python3 flavor multibuild:
  * Compile bundled libs for every flavor
  * Fix bundled lib location configuration
  * Use system fftw3
- Enable tests with matplotlib and astropy
- Add sherpa-mpl-3.4.patch for Matplotlib 3.4 gh#sherpa/sherpa#1125

OBS-URL: https://build.opensuse.org/request/show/888253
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=15
2021-04-24 20:33:16 +00:00
ba8c84b5c1 Accepting request 873034 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/873034
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=7
2021-02-17 17:12:34 +00:00
14bc0b2cc6 Accepting request 873000 from home:badshah400:branches:devel:languages:python:numeric
* Update to version 4.13.0.
* Add sherpa-numpy-1.20.patch: Fix test errors with numpy 1.20 [gh#sherpa/sherpa#/1092]; patch committed upstream.
* Disable python 3.6 flavour: dependency numpy not supported.

OBS-URL: https://build.opensuse.org/request/show/873000
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=13
2021-02-17 08:51:12 +00:00
a2e2b9a0e3 Accepting request 841871 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/841871
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=6
2020-10-15 11:51:17 +00:00
Tomáš Chvátal
2e12bdc119 Accepting request 841790 from home:Guillaume_G:branches:openSUSE:Factory:ARM
- Fix aarch64 build and test:
  * sherpa-fix-aarch64.patch

OBS-URL: https://build.opensuse.org/request/show/841790
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=11
2020-10-15 08:08:32 +00:00
969376c5c6 Accepting request 834270 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/834270
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=5
2020-09-15 14:27:53 +00:00
Tomáš Chvátal
9af53e5796 Accepting request 834267 from home:badshah400:branches:devel:languages:python:numeric
- Update to version 4.12.1.
- Drop already incorporated patches:
  * python-sherpa-python3.8.patch.
  * config_with_build.patch.

OBS-URL: https://build.opensuse.org/request/show/834267
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=9
2020-09-14 10:12:53 +00:00
7eb9c82140 Accepting request 807290 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/807290
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=4
2020-05-19 12:59:12 +00:00
Tomáš Chvátal
18219ebf9c Accepting request 807247 from home:pgajdos:python
submit

OBS-URL: https://build.opensuse.org/request/show/807247
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=7
2020-05-19 12:14:25 +00:00
bf66c7bfcb Accepting request 784359 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/784359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=3
2020-03-12 22:09:24 +00:00
Tomáš Chvátal
a9249c5ebb Accepting request 784357 from home:badshah400:branches:devel:languages:python:numeric
- Add python-sherpa-python3.8.patch: Fix building with python3.8; taken from upstream commit [gh#sherpa/sherpa#696].
- Disbale bytecode generation when running tests.
- Remove hashbangs from non executable files.

OBS-URL: https://build.opensuse.org/request/show/784357
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=5
2020-03-12 15:40:02 +00:00
a84ca1a1bc Accepting request 760916 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/760916
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=2
2020-01-05 14:22:09 +00:00
Tomáš Chvátal
edbc2bdf07 Accepting request 760838 from home:bmwiedemann:branches:devel:languages:python:numeric
Add reproducible.patch to disable optimizing for build CPU to make package build reproducible

OBS-URL: https://build.opensuse.org/request/show/760838
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=3
2020-01-05 07:53:45 +00:00
afae7db087 Accepting request 755354 from devel:languages:python:numeric
Modeling and fitting package for scientific data analysis

OBS-URL: https://build.opensuse.org/request/show/755354
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sherpa?expand=0&rev=1
2019-12-27 12:43:54 +00:00
Todd R
58ba0f8406 Accepting request 755353 from home:TheBlackCat:branches:devel:languages:python:numeric
Modeling and fitting package for scientific data analysis

OBS-URL: https://build.opensuse.org/request/show/755353
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=1
2019-12-09 18:49:08 +00:00
9 changed files with 706 additions and 340 deletions

View File

@@ -1,297 +0,0 @@
From 72028ffe7ce2566a8f1e88c2c06d79cf5f0be9c1 Mon Sep 17 00:00:00 2001
From: Douglas Burke <dburke.gw@gmail.com>
Date: Thu, 27 Jun 2024 12:42:52 -0400
Subject: [PATCH 1/7] root: internal code cleanup
The root-finding code is not documented well. This adds a small
wrapper routine to avoid some replicated code, but could we
just add this to transformed_quad_coef() instead - which is
not explicitly marked as an external routine?
Several comments have been added for potential future work.
---
sherpa/utils/__init__.py | 38 ++++++++++++++++++++++-----------
sherpa/utils/tests/test_root.py | 5 +++++
2 files changed, 30 insertions(+), 13 deletions(-)
Index: sherpa-4.16.1/sherpa/utils/__init__.py
===================================================================
--- sherpa-4.16.1.orig/sherpa/utils/__init__.py
+++ sherpa-4.16.1/sherpa/utils/__init__.py
@@ -1480,7 +1480,7 @@ def create_expr_integrated(lovals, hival
delim : str, optional
The separator for a range.
eps : number, optional
- The tolerance for comparing two numbers with sao_fcmp.
+ This value is unused.
Raises
------
@@ -3389,6 +3389,7 @@ def bisection(fcn, xa, xb, fa=None, fb=N
return [[None, None], [[xa, fa], [xb, fb]], nfev[0]]
+# Is this used at all?
def quad_coef(x, f):
"""
p( x ) = f( xc ) + A ( x - xc ) + B ( x - xc ) ( x - xb )
@@ -3461,6 +3462,11 @@ def transformed_quad_coef(x, f):
xa, xb, xc = x[0], x[1], x[2]
fa, fb, fc = f[0], f[1], f[2]
+ # What happens if xb_xa or xc_xa are 0? That is, either
+ # xa == xb
+ # xc == xa
+ # Is the assumption that this just never happen?
+ #
xc_xb = xc - xb
fc_fb = fc - fb
A = fc_fb / xc_xb
@@ -3472,6 +3478,21 @@ def transformed_quad_coef(x, f):
return [B, C]
+def _get_discriminant(xa, xb, xc, fa, fb, fc):
+ """Wrap up code to transformed_quad_coef.
+
+ This is common code that could be added to transformed_quad_coef
+ but is left out at the moment, to make it easier to look back
+ at code changes. There is no description of the parameters as
+ the existing code has none.
+
+ """
+
+ [B, C] = transformed_quad_coef([xa, xb, xc], [fa, fb, fc])
+ discriminant = max(C * C - 4.0 * fc * B, 0.0)
+ return B, C, discriminant
+
+
def demuller(fcn, xa, xb, xc, fa=None, fb=None, fc=None, args=(),
maxfev=32, tol=1.0e-6):
"""A root-finding algorithm using Muller's method.
@@ -3578,10 +3599,7 @@ def demuller(fcn, xa, xb, xc, fa=None, f
while nfev[0] < maxfev:
- [B, C] = transformed_quad_coef([xa, xb, xc], [fa, fb, fc])
-
- discriminant = max(C * C - 4.0 * fc * B, 0.0)
-
+ B, C, discriminant = _get_discriminant(xa, xb, xc, fa, fb, fc)
if is_nan(B) or is_nan(C) or \
0.0 == C + mysgn(C) * np.sqrt(discriminant):
return [[None, None], [[None, None], [None, None]], nfev[0]]
@@ -3685,11 +3703,7 @@ def new_muller(fcn, xa, xb, fa=None, fb=
if abs(fc) <= tol:
return [[xc, fc], [[xa, fa], [xb, fb]], nfev[0]]
- tran = transformed_quad_coef([xa, xb, xc], [fa, fb, fc])
- B = tran[0]
- C = tran[1]
-
- discriminant = max(C * C - 4.0 * fc * B, 0.0)
+ B, C, discriminant = _get_discriminant(xa, xb, xc, fa, fb, fc)
xd = xc - 2.0 * fc / (C + mysgn(C) * np.sqrt(discriminant))
@@ -3827,11 +3841,9 @@ def apache_muller(fcn, xa, xb, fa=None,
oldx = 1.0e128
while nfev[0] < maxfev:
- tran = transformed_quad_coef([xa, xb, xc], [fa, fb, fc])
- B = tran[0]
- C = tran[1]
- discriminant = max(C * C - 4.0 * fc * B, 0.0)
- den = mysgn(C) * np.sqrt(discriminant)
+
+ B, C, discriminant = _get_discriminant(xa, xb, xc, fa, fb, fc)
+ den = np.sign(C) * np.sqrt(discriminant)
xplus = xc - 2.0 * fc / (C + den)
if C != den:
xminus = xc - 2.0 * fc / (C - den)
@@ -4008,9 +4020,13 @@ def zeroin(fcn, xa, xb, fa=None, fb=None
warning('%s: %s fa * fb < 0 is not met', __name__, fcn.__name__)
return [[None, None], [[None, None], [None, None]], nfev[0]]
+ # With NumPy 2.0 the casting rules changed, leading to some
+ # behavioural changes in this code. The simplest fix was to
+ # make sure DBL_EPSILON did not remain a np.float32 value.
+ #
xc = xa
fc = fa
- DBL_EPSILON = np.finfo(np.float32).eps
+ DBL_EPSILON = float(np.finfo(np.float32).eps)
while nfev[0] < maxfev:
prev_step = xb - xa
Index: sherpa-4.16.1/sherpa/utils/tests/test_root.py
===================================================================
--- sherpa-4.16.1.orig/sherpa/utils/tests/test_root.py
+++ sherpa-4.16.1/sherpa/utils/tests/test_root.py
@@ -1,5 +1,6 @@
#
-# Copyright (C) 2007, 2016, 2018, 2020, 2021 Smithsonian Astrophysical Observatory
+# Copyright (C) 2007, 2016, 2018, 2020, 2021, 2024
+# Smithsonian Astrophysical Observatory
#
#
# This program is free software; you can redistribute it and/or modify
@@ -27,7 +28,7 @@ from sherpa.utils import demuller, bisec
zeroin
-def sqr(x, *args):
+def sqr(x):
return x * x
@@ -177,9 +178,7 @@ def prob34(x, *args):
return 1.0 / x - numpy.sin(x) + 1.0
-def prob35(x, *args):
- return (x*x - 2.0) * x - 5.0
-
+# prob35 was the same as prob16
def prob36(x, *args):
return 1.0 / x - 1.0
@@ -288,7 +287,6 @@ def demuller2(fcn, xa, xb, fa=None, fb=N
(prob32, 0.1, 0.9),
(prob33, 2.8, 3.1),
(prob34, -1.3, -0.5),
- (prob35, 2.0, 3.0),
(prob36, 0.5, 1.5),
(prob37, 0.5, 5.0),
(prob38, 1.0, 4.0),
Index: sherpa-4.16.1/sherpa/estmethods/__init__.py
===================================================================
--- sherpa-4.16.1.orig/sherpa/estmethods/__init__.py
+++ sherpa-4.16.1/sherpa/estmethods/__init__.py
@@ -380,6 +380,11 @@ def covariance(pars, parmins, parmaxes,
eflag = est_success
ubound = diag[num]
lbound = -diag[num]
+
+ # What happens when lbound or ubound is NaN? This is
+ # presumably why the code is written as it is below (e.g. a
+ # pass if the values can be added to pars[num]).
+ #
if pars[num] + ubound < parhardmaxes[num]:
pass
else:
@@ -1093,6 +1098,7 @@ def confidence(pars, parmins, parmaxes,
print_status(myblog.blogger.info, verbose, status_prefix[dirn],
delta_zero, lock)
+ # This should really set the error flag appropriately.
error_flags.append(est_success)
#
Index: sherpa-4.16.1/sherpa/fit.py
===================================================================
--- sherpa-4.16.1.orig/sherpa/fit.py
+++ sherpa-4.16.1/sherpa/fit.py
@@ -277,7 +277,7 @@ class FitResults(NoNewAttributesAfterIni
self.succeeded = results[0]
self.parnames = tuple(p.fullname for p in fit.model.get_thawed_pars())
- self.parvals = tuple(results[1])
+ self.parvals = tuple(float(r) for r in results[1])
self.istatval = init_stat
self.statval = results[2]
self.dstatval = np.abs(results[2] - init_stat)
@@ -439,25 +439,28 @@ class ErrorEstResults(NoNewAttributesAft
self.sigma = fit.estmethod.sigma
self.percent = erf(self.sigma / sqrt(2.0)) * 100.0
self.parnames = tuple(p.fullname for p in parlist if not p.frozen)
- self.parvals = tuple(p.val for p in parlist if not p.frozen)
+ self.parvals = tuple(float(p.val) for p in parlist if not p.frozen)
self.parmins = ()
self.parmaxes = ()
- self.nfits = 0
for i in range(len(parlist)):
if (results[2][i] == est_hardmin or
- results[2][i] == est_hardminmax):
+ results[2][i] == est_hardminmax or
+ results[0][i] is None # It looks like confidence does not set the flag
+ ):
self.parmins = self.parmins + (None,)
warning("hard minimum hit for parameter %s", self.parnames[i])
else:
- self.parmins = self.parmins + (results[0][i],)
+ self.parmins = self.parmins + (float(results[0][i]),)
if (results[2][i] == est_hardmax or
- results[2][i] == est_hardminmax):
+ results[2][i] == est_hardminmax or
+ results[1][i] is None # It looks like confidence does not set the flag
+ ):
self.parmaxes = self.parmaxes + (None,)
warning("hard maximum hit for parameter %s", self.parnames[i])
else:
- self.parmaxes = self.parmaxes + (results[1][i],)
+ self.parmaxes = self.parmaxes + (float(results[1][i]),)
self.nfits = results[3]
self.extra_output = results[4]
Index: sherpa-4.16.1/sherpa/astro/tests/test_astro.py
===================================================================
--- sherpa-4.16.1.orig/sherpa/astro/tests/test_astro.py
+++ sherpa-4.16.1/sherpa/astro/tests/test_astro.py
@@ -206,7 +206,7 @@ def test_sourceandbg(parallel, run_threa
assert fit_results.numpoints == 1330
assert fit_results.dof == 1325
- assert covarerr[0] == approx(0.012097, rel=1e-3)
+ assert covarerr[0] == approx(0.012097, rel=1.05e-3)
assert covarerr[1] == approx(0, rel=1e-3)
assert covarerr[2] == approx(0.000280678, rel=1e-3)
assert covarerr[3] == approx(0.00990783, rel=1e-3)
Index: sherpa-4.16.1/docs/developer/index.rst
===================================================================
--- sherpa-4.16.1.orig/docs/developer/index.rst
+++ sherpa-4.16.1/docs/developer/index.rst
@@ -100,6 +100,17 @@ files and shows exactly which lines were
Run doctests locally
--------------------
+
+.. note::
+ The documentation tests are known to fail if NumPy 2.0 is installed
+ because the representation of NumPy types such as ``np.float64``
+ have changed, leading to errors like::
+
+ Expected:
+ 2.5264364698914e-06
+ Got:
+ np.float64(2.5264364698914e-06)
+
If `doctestplus <https://pypi.org/project/pytest-doctestplus/>` is installed
(and it probably is because it's part of
`sphinx-astropy <https://pypi.org/project/sphinx-astropy/>`,
Index: sherpa-4.16.1/docs/install.rst
===================================================================
--- sherpa-4.16.1.orig/docs/install.rst
+++ sherpa-4.16.1/docs/install.rst
@@ -34,17 +34,14 @@ Requirements
Sherpa has the following requirements:
* Python 3.9 to 3.11
-* NumPy (the exact lower limit has not been determined,
- 1.21.0 or later will work, earlier version may work)
+* NumPy (version 2.0 should work but there has been limited testing)
* Linux or OS-X (patches to add Windows support are welcome)
Sherpa can take advantage of the following Python packages
if installed:
* :term:`Astropy`: for reading and writing files in
- :term:`FITS` format. The minimum required version of astropy
- is version 1.3, although only versions 2 and higher are used in testing
- (version 3.2 is known to cause problems, but version 3.2.1 is okay).
+ :term:`FITS` format.
* :term:`matplotlib`: for visualisation of
one-dimensional data or models, one- or two- dimensional
error analysis, and the results of Monte-Carlo Markov Chain

View File

@@ -1,3 +1,75 @@
-------------------------------------------------------------------
Wed Jul 30 01:10:51 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 4.17.1:
* enhancements:
+ improved handling for OGIP products that do not follow the standards
+ Models can now be combined using arbitrary ufuncs
+ various updates to XSpec interface and support for XSpec 12.15.0
including the additional of 17 new models
+ added interface to support ArviZ for analysis of Bayesian models
* infrastructure and testing:
+ updated tests to work with python 3.13
* bug fixes:
+ fixed a bug in the caching code that limited the cache size to 1
+ update to use fake_pha for missions which don't use 1 as the first
channel
- Dropped patches:
* sherpa-pr2188-np2docstrings.patch
* sherpa-pr2207-mpl.patch
* support-pytest-8.3.4.patch
- Refresed sherpa-suse-libdir.patch
- Add patch support-gcc-15.patch:
* Specify function declarations correctly.
-------------------------------------------------------------------
Wed Feb 12 14:51:20 UTC 2025 - Ben Greiner <code@bnavigator.de>
- Add sherpa-pr2207-mpl.patch for matplotlib 3.10 test
compatibility gh#sherpa/sherpa#2207
-------------------------------------------------------------------
Wed Jan 29 05:28:30 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-pytest-8.3.4.patch:
* Support pytest 8.3.4 changes.
-------------------------------------------------------------------
Fri Dec 6 12:40:33 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Update to 4.17.0
* This release of Sherpa includes various enhancements,
documentation updates, bug fixes, and infrastructure changes.
## enhancements:
* add calc_model and calc_source functions to return an evaluated
model/source array
* added wstat to plot_pvalue for the likelihood ratio test
* changed XSpec interface to use FunctionUtility C++ API instead
of XSFortran API
* improved support for PHA data starting at channel 0 and
handling of STAT_ERR and SYS_ERR PHA columns which are set to 0
* improved guess for complex models
* improved filtering handling
* several updates to enhance plotting capabilities and layout
## documentation changes:
* added paper citations to front page of Sherpa Read the Docs
documentation
* cleaned up various typos and URL references
* added examples such as use of set_x/y_label
## infrastructure and testing:
* improved test coverage
* many updates to CI
* drop support for Python 3.9 and numpy <1.24
* initial/experimental support for Python 3.12
## bug fixes:
* fixed an issue with plotting 1D data with asymmetric errs after
filter
* include the default identifier in save_all output if it has
been changed
- Drop numpy2.patch
- Add sherpa-pr2188-np2docstrings.patch gh#sherpa/sherpa#2188
- Add sherpa-suse-libdir.patch
-------------------------------------------------------------------
Thu Sep 12 06:18:49 UTC 2024 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-sherpa
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,22 +16,23 @@
#
# requires distutils and setuptools < 60, which does not backport distutils. Unsuitable for python312
# Track upstream progress in https://github.com/sherpa/sherpa/pull/1949
%define skip_python312 1
Name: python-sherpa
Version: 4.16.1
Version: 4.17.1
Release: 0
Summary: Modeling and fitting package for scientific data analysis
License: GPL-3.0-only
URL: https://github.com/sherpa/sherpa/
Source0: https://github.com/sherpa/sherpa/archive/%{version}.tar.gz#/sherpa-%{version}.tar.gz
Source1: https://github.com/sherpa/sherpa-test-data/archive/refs/tags/%{version}.tar.gz#/sherpa-test-data-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/sherpa/sherpa/pull/2069 Allow the tests to pass with NumPy 2.0
Patch: numpy2.patch
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module numpy-devel >= 1.19}
# PATCH-FIX-OPENSUSE sherpa-suse-libdir.patch -- UPSTREAM struggles with library paths, see e.g. gh#sherpa/sherpa#2159 code@bnavigator.de
Patch0: sherpa-suse-libdir.patch
# PATCH-FIX-OPENSUSE Fix extern libraries to compile with gcc 15.
Patch1: support-gcc-15.patch
BuildRequires: %{python_module devel >= 3.10}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 64}
BuildRequires: %{python_module tomli if %python-base < 3.11}
BuildRequires: %{python_module wheel}
BuildRequires: bison
BuildRequires: fdupes
@@ -39,14 +40,15 @@ BuildRequires: fftw3-devel
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: python-rpm-macros
Requires: python-numpy >= 1.19
BuildRequires: wcslib-devel
Requires: python-numpy
Requires(post): update-alternatives
Requires(postun): update-alternatives
ExcludeArch: %{ix86} %{arm}
# SECTION test requirements
BuildRequires: %{python_module pytest >= 5}
BuildRequires: %{python_module pytest >= 8}
# doctestplus tests dont look ready gh#sherpa/sherpa#1719
# BuildRequires: %{python_module pytest-doctestplus}
# BuildRequires: %%{python_module pytest-doctestplus}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest-xvfb}
# Highly recommended by upstream when building from source
@@ -62,23 +64,19 @@ data, using a variety of statistics and optimization methods.
%prep
%autosetup -p1 -n sherpa-%{version} -a1
# uncomment system libs https://sherpa.readthedocs.io/en/latest/install.html#fftw
sed -i "s|#fftw=local|fftw=local|" setup.cfg
sed -i "s|#fftw-include[-_]dirs.*$|fftw-include-dirs=%{_includedir}|" setup.cfg
sed -i "s|#fftw-lib-dirs.*$|fftw-lib-dirs=%{_libdir}|" setup.cfg
sed -i "s|#fftw-libraries|fftw-libraries|" setup.cfg
sed -i -e 's|@_LIB@|%{_lib}|' setup.cfg helpers/sherpa_config.py
rm -r extern/fftw-*
# adjust the "install path" for stk.so and group.so for the build phase
sed -i "/pydir =/ s/libdir,/self.install_dir, '%{_lib}',/" helpers/sherpa_config.py
# Remove shebangs
sed -i "1{/\\/usr\\/bin\\/env python/d}" \
sherpa/optmethods/ncoresde.py \
sherpa/optmethods/ncoresnm.py \
sherpa/optmethods/opt.py \
sherpa/utils/akima.py
%build
cp -r extern extern0
%{python_expand #
# use the python3X bundled setuptools instead of setuptools 60+ from the distribution
# https://sherpa.readthedocs.io/en/latest/install.html#building-from-source
mkdir -p build
$python -m venv build/buildenv --system-site-packages
build/buildenv/bin/pip wheel --no-deps --disable-pip-version-check --use-pep517 --no-build-isolation --progress-bar off --verbose . -w build/
%{python_expand # rebuild and install extern/ into build/ for every wheel
%$python_pyproject_wheel
rm -r extern
cp -r extern0 extern
}
@@ -90,27 +88,25 @@ cp -r extern0 extern
%python_clone -a %{buildroot}%{_bindir}/sherpa_smoke
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%{python_expand # REMOVE HASHBANGS FROM NON-EXEC FILES
sed -i "1{/\\/usr\\/bin\\/env python/d}" %{buildroot}%{$python_sitearch}/sherpa/optmethods/ncoresde.py
sed -i "1{/\\/usr\\/bin\\/env python/d}" %{buildroot}%{$python_sitearch}/sherpa/optmethods/ncoresnm.py
sed -i "1{/\\/usr\\/bin\\/env python/d}" %{buildroot}%{$python_sitearch}/sherpa/optmethods/opt.py
sed -i "1{/\\/usr\\/bin\\/env python/d}" %{buildroot}%{$python_sitearch}/sherpa/utils/akima.py
}
%check
# avoid conftest import mismatch
mv sherpa sherpa_temp
export PYTHONPATH=$PWD/sherpa-test-data-%{version}
# unclosed resource warnings by pytest although the tests use Path.to_text which should have closed it.
donttest="test_save"
donttest="test_Griewank"
# precision issues
%ifnarch x86_64
donttest+=" or (test_regproj and sherpa.plot.dummy_backend)"
donttest+=" or (test_fit_single and Chi2XspecVar)"
%endif
donttest+=" or test_Griewank"
# Tests must not be run in parallel https://github.com/sherpa/sherpa/issues/2031
%pytest_arch -n1 --pyargs sherpa -k "not ($donttest)"
# gh#sherpa/sherpa#1923
donttest+=" or test_integrate1d_basic_epsabs"
# flaky
donttest+=" or test_scaling_staterr"
donttest+=" or (test_Shekel7 and montecarlo)"
donttest+=" or (test_Shekel5 and montecarlo)"
# docstring mismatches
python313_donttest=" or test_show_fit or test_modify_doctring or test_modelwrapper_str_with_doc"
%pytest_arch --pyargs sherpa -n auto --dist=loadgroup -r fE -k "not ($donttest ${$python_donttest})"
%post
%python_install_alternative sherpa_smoke

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ed4dfba237c4a6b60b4141e5619b53b25cb9e23be26cbcd7dbf00f8822d4669c
size 13738921

3
sherpa-4.17.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:331f912248e2ce49b03ce2cf24fc1cc113a488a71a26bc002ba8758f79eec373
size 13687160

60
sherpa-suse-libdir.patch Normal file
View File

@@ -0,0 +1,60 @@
Index: sherpa-4.17.1/helpers/sherpa_config.py
===================================================================
--- sherpa-4.17.1.orig/helpers/sherpa_config.py
+++ sherpa-4.17.1/helpers/sherpa_config.py
@@ -79,7 +79,7 @@ class sherpa_config(Command):
def finalize_options(self):
incdir = os.path.join(self.install_dir, 'include')
libdir = os.path.join(self.install_dir, 'lib')
- pydir = os.path.join(libdir, f'python{version}', 'site-packages')
+ pydir = os.path.join(self.install_dir, '@_LIB@', f'python{version}', 'site-packages')
if self.fftw_include_dirs is None:
self.fftw_include_dirs = incdir
@@ -144,7 +144,7 @@ class sherpa_config(Command):
# normal installs: editable installs do not seem to care about
# the data_files setting.
#
- libdir = os.path.join('lib',
+ libdir = os.path.join('@_LIB@',
f'python{version}',
'site-packages')
dfiles = []
Index: sherpa-4.17.1/setup.cfg
===================================================================
--- sherpa-4.17.1.orig/setup.cfg
+++ sherpa-4.17.1/setup.cfg
@@ -20,15 +20,15 @@
# FFTW Library
# Uncomment to use a local installation
-#fftw=local
+fftw=local
# If fftw=local uncomment the following lines and
# change the default location of libraries and the name
# of the library to be linked (usually fftw3)
# (include multiple values by separating them with spaces)
-#fftw_include_dirs=build/include
-#fftw_lib_dirs=build/lib
-#fftw_libraries=fftw3
+fftw_include_dirs=include
+fftw_lib_dirs=@_LIB@
+fftw_libraries=fftw3
# Region Library
# Uncomment to use a local installation
@@ -54,9 +54,10 @@
#wcs=local
# Uncomment and change default location if needed
-#wcs_include_dirs=build/include
-#wcs_lib_dirs=build/lib
-#wcs_libraries=wcs
+# sherpa is not compatible with wcs.h from system. Make it build and find vendored wcssubs in extern/
+wcs_include_dirs=build/include
+wcs_lib_dirs=build/lib
+wcs_libraries=wcs
[build_sphinx]

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c61443bf3530e42322cec52887cc2f170c2d5d9aaba2822e107da2626c269a1c
size 137775313

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3f838a44edb7980e92435f388f6c16b7071ce99eebfbc393ea68f99b951989c2
size 137775329

535
support-gcc-15.patch Normal file
View File

@@ -0,0 +1,535 @@
Index: sherpa-4.17.1/extern/region-4.14/src/region_eval.c
===================================================================
--- sherpa-4.17.1.orig/extern/region-4.14/src/region_eval.c
+++ sherpa-4.17.1/extern/region-4.14/src/region_eval.c
@@ -80,30 +80,28 @@ int regCompareRegion( regRegion* Region1
{
regShape* Shape1;
regShape* Shape2;
- int true = 1;
- int false = 0;
Shape1 = Region1->shape;
Shape2 = Region2->shape;
while (Shape1 != NULL )
{
if ( !Shape2 )
- return false;
+ return 0;
if ( Shape1->component != Shape2->component )
- return false;
+ return 0;
if( !Shape1->isEqual(Shape1, Shape2) )
- return false;
+ return 0;
Shape1 = Shape1->next;
Shape2 = Shape2->next;
}
if ( Shape2 )
- return false;
+ return 0;
- return true;
+ return 1;
}
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/imhfile.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/imhfile.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/imhfile.c
@@ -148,27 +148,27 @@
#define LEN_FITSHDR 11520
int check_immagic();
-int irafgeti4();
-float irafgetr4();
-char *irafgetc2();
-char *irafgetc();
-char *iraf2str();
-static char *same_path();
-static void irafputr4();
-static void irafputi4();
-static void irafputc2();
-static void irafputc();
-static void str2iraf();
+int irafgeti4(char *irafheader, int offset);
+float irafgetr4(char *irafheader, int offset);
+char *irafgetc2(char *irafheader, int offset, int nc);
+char *irafgetc(char *irafheader, int offset, int nc);
+char *iraf2str(char *irafstring, int nchar);
+static char *same_path(char *pixname, char *hdrname);
+static void irafputr4(char *irafheader, int offset, float rnum);
+static void irafputi4(char *irafheader, int offset, int inum);
+static void irafputc2(char *string, char *irafheader, int offset, int nc);
+static void irafputc(char *string, char *irafheader, int offset, int nc);
+static void str2iraf(char *string, char *irafstring, int nchar);
static int headswap=-1; /* =1 to swap data bytes of foreign IRAF file */
-static void irafswap();
-static void irafswap2();
-static void irafswap4();
-static void irafswap8();
-int head_version ();
-int pix_version ();
-int irafncmp ();
+static void irafswap(int bitpix, char *string, int nbytes);
+static void irafswap2(char *string, int nbytes);
+static void irafswap4(char *string, int nbytes);
+static void irafswap8(char *string, int nbytes);
+int head_version(char *irafheader);
+int pix_version(char *irafheader);
+int irafncmp(char *irafheader, char *teststring, int nc);
static int machswap();
-static int irafsize();
+static int irafsize(FILE *diskfile);
#define SECONDS_1970_TO_1980 315532800L
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/hget.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/hget.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/hget.c
@@ -74,7 +74,7 @@
static int use_saolib=0;
#endif
-char *hgetc ();
+char *hgetc(const char *hstring, const char *keyword0);
static char val[VLENGTH+1];
static int multiline = 0;
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/hput.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/hput.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/hput.c
@@ -58,7 +58,7 @@
static int verbose=0; /* Set to 1 to print error messages and other info */
-static void fixnegzero();
+static void fixnegzero(char *string);
/* HPUTI4 - Set int keyword = ival in FITS header string */
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/iget.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/iget.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/iget.c
@@ -52,7 +52,7 @@
#define MAX_LVAL 2000
-static char *isearch();
+static char *isearch(const char *hstring, const char *keyword);
static char val[30];
/* Extract long value for variable from IRAF multiline keyword value */
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/wcscon.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/wcscon.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/wcscon.c
@@ -73,10 +73,30 @@
#include <string.h>
#include "wcs.h"
-void fk524(), fk524e(), fk524m(), fk524pv();
-void fk425(), fk425e(), fk425m(), fk425pv();
-void fk42gal(), fk52gal(), gal2fk4(), gal2fk5();
-void fk42ecl(), fk52ecl(), ecl2fk4(), ecl2fk5();
+void fk524(double *ra, double *dec);
+void fk524e(double *ra, double *dec, double epoch);
+void fk524m(double *ra, double *dec, double *rapm, double *decpm);
+void fk524pv(double *ra, double *dec, double *rapm, double *decpm, double *parallax, double *rv);
+void fk425(double *ra, double *dec);
+void fk425e(double *ra, double *dec, double epoch);
+void fk425m(double *ra, double *dec, double *rapm, double *decpm);
+void fk425pv(double *ra, double *dec, double *rapm, double *decpm, double *parallax, double *rv);
+void fk42gal(double *dtheta, double *dphi);
+void fk52gal(double *dtheta, double *dphi);
+void gal2fk4(double *dtheta, double *dphi);
+void gal2fk5(double *dtheta, double *dphi);
+void fk42ecl(double *dtheta, double *dphi, double epoch);
+void fk52ecl(double *dtheta, double *dphi, double epoch);
+void ecl2fk4(double *dtheta, double *dphi, double epoch);
+void ecl2fk5(double *dtheta, double *dphi, double epoch);
+void v2s3(double pos[3], double *rra, double *rdec, double *r);
+void s2v3(double rra, double rdec, double r, double pos[3]);
+void fk4prec(double ep0, double ep1, double *ra, double *dec);
+void fk5prec(double ep0, double ep1, double *ra, double *dec);
+void rotmat(int axes, double rot1, double rot2, double rot3, double *matrix);
+void mprecfk4(double bep0, double bep1, double rmatp[9]);
+void mprecfk5(double ep0, double ep1, double rmatp[9]);
+char *eqstrn(double dra, double ddec);
/* Convert from coordinate system sys1 to coordinate system sys2, converting
proper motions, too, and adding them if an epoch is specified */
@@ -100,7 +120,6 @@ double *pphi; /* Latitude or declination
Input in sys1, returned in sys2 */
{
- void fk5prec(), fk4prec();
/* Set equinoxes if 0.0 */
if (eq1 == 0.0) {
@@ -306,7 +325,6 @@ double *px; /* Parallax in arcseconds */
double *rv; /* Radial velocity in km/sec */
{
- void fk5prec(), fk4prec();
/* Set equinoxes if 0.0 */
if (eq1 == 0.0) {
@@ -510,7 +528,6 @@ double *dphi; /* Latitude or declination
double epoch; /* Besselian epoch in years */
{
- void fk5prec(), fk4prec();
/* Set equinoxes if 0.0 */
if (eq1 == 0.0) {
@@ -1441,9 +1458,8 @@ double *dphi; /* B1950.0 FK4 declination
Reference: Blaauw et al, MNRAS,121,123 (1960) */
{
double pos[3],pos1[3],r,dl,db,rl,rb,rra,rdec,dra,ddec;
- void v2s3(),s2v3();
int i;
- char *eqcoor, *eqstrn();
+ char *eqcoor;
dra = *dtheta;
ddec = *dphi;
@@ -1499,8 +1515,7 @@ double *dphi; /* Galactic latitude (b2)
{
double pos[3],pos1[3],r,dl,db,rl,rb,rra,rdec,dra,ddec;
- void v2s3(),s2v3();
- char *eqcoor, *eqstrn();
+ char *eqcoor;
int i;
/* spherical to cartesian */
@@ -1574,8 +1589,7 @@ double *dphi; /* J2000 declination in de
Reference: Blaauw et al, MNRAS,121,123 (1960) */
{
double pos[3],pos1[3],r,dl,db,rl,rb,rra,rdec,dra,ddec;
- void v2s3(),s2v3();
- char *eqcoor, *eqstrn();
+ char *eqcoor;
int i;
/* Spherical to cartesian */
@@ -1627,9 +1641,8 @@ double *dphi; /* Galactic latitude (b2)
{
double pos[3],pos1[3],r,dl,db,rl,rb,rra,rdec,dra,ddec;
- void v2s3(),s2v3();
int i;
- char *eqcoor, *eqstrn();
+ char *eqcoor;
/* Spherical to Cartesian */
dl = *dtheta;
@@ -1727,8 +1740,6 @@ double *dphi; /* B1950 declination in de
double epoch; /* Besselian epoch in years */
{
- void fk425e(), fk52ecl();
-
/* Convert from B1950 to J2000 coordinates */
fk425e (dtheta, dphi, epoch);
@@ -1755,8 +1766,6 @@ double epoch; /* Besselian epoch in year
double v1[3], v2[3], r;
double rmat[9], *rmati; /* Rotation matrix */
- void rotmat(), v2s3(), s2v3(), fk5prec();
-
/* Precess coordinates from J2000 to epoch */
if (epoch != 2000.0)
fk5prec (2000.0, epoch, dtheta, dphi);
@@ -1810,8 +1819,6 @@ double *dphi; /* Galactic latitude (b2)
double epoch; /* Besselian epoch in years */
{
- void ecl2fk5(), fk524e();
-
/* Convert from ecliptic to J2000 coordinates */
ecl2fk5 (dtheta, dphi, epoch);
@@ -1839,7 +1846,6 @@ double epoch; /* Besselian epoch in year
double rtheta, rphi, v1[3], v2[3];
double t, eps0, r;
double rmat[9]; /* Rotation matrix */
- void v2s3(),s2v3(), fk5prec(), rotmat();
rtheta = degrad (*dtheta);
rphi = degrad (*dphi);
@@ -1902,7 +1908,6 @@ double *dec; /* Dec in degrees mean equa
{
int i, j;
double pm[9], *pmi, v1[3], v2[3], rra, rdec, r;
- void v2s3(),s2v3(), mprecfk4();
rra = degrad (*ra);
rdec = degrad (*dec);
@@ -1950,7 +1955,6 @@ double *dec; /* Dec in degrees mean equa
{
int i, j;
double pm[9], *pmi, v1[3], v2[3], rra, rdec, r;
- void v2s3(),s2v3(), mprecfk5();
rra = degrad (*ra);
rdec = degrad (*dec);
@@ -2003,7 +2007,6 @@ double rmatp[9]; /* 3x3 Precession matri
*/
{
double bigt, t, tas2r, w, zeta, z, theta;
- void rotmat();
/* Interval between basic epoch B1850.0 and beginning epoch in TC */
bigt = ( bep0 - 1850.0 ) / 100.0;
@@ -2047,7 +2050,6 @@ double rmatp[9]; /* 3x3 Precession matri
*/
{
double t0, t, tas2r, w, zeta, z, theta;
- void rotmat();
/* Interval between basic epoch J2000.0 and beginning epoch (JC) */
t0 = ( ep0 - 2000.0 ) / 100.0;
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/tnxpos.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/tnxpos.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/tnxpos.c
@@ -47,10 +47,17 @@
#define max_niter 500
#define SZ_ATSTRING 2000
-static void wf_gsclose();
-static void wf_gsb1pol();
-static void wf_gsb1leg();
-static void wf_gsb1cheb();
+static void wf_gsclose(struct IRAFsurface *sf);
+static void wf_gsb1pol(double x, int order, double *basis);
+static void wf_gsb1leg(double x, int order, double k1, double k2, double *basis);
+static void wf_gsb1cheb(double x, int order, double k1, double k2, double *basis);
+struct IRAFsurface *wf_gsopen(char *astr);
+struct IRAFsurface *wf_gsrestore(double *fit);
+struct IRAFsurface *wf_gspset(int xorder, int yorder, int xterms, double *coeff);
+double wf_gseval(struct IRAFsurface *sf, double x, double y);
+double wf_gsder(struct IRAFsurface *sf, double x, double y, int nxd, int nyd);
+
+extern void wcsrotset(struct WorldCoor *wcs);
/* tnxinit -- initialize the gnomonic forward or inverse transform.
* initialization for this transformation consists of, determining which
@@ -75,9 +82,7 @@ tnxinit (header, wcs)
const char *header; /* FITS header */
struct WorldCoor *wcs; /* pointer to WCS structure */
{
- struct IRAFsurface *wf_gsopen();
char *str1, *str2, *lngstr, *latstr;
- extern void wcsrotset();
/* allocate space for the attribute strings */
str1 = malloc (SZ_ATSTRING);
@@ -166,7 +171,6 @@ double *xpos, *ypos; /*o world coordinat
double x, y, r, phi, theta, costhe, sinthe, dphi, cosphi, sinphi, dlng, z;
double colatp, coslatp, sinlatp, longp;
double xs, ys, ra, dec, xp, yp;
- double wf_gseval();
/* Convert from pixels to image coordinates */
xpix = xpix - wcs->crpix[0];
@@ -317,7 +321,6 @@ double *xpix, *ypix; /*o physical coordi
double s, r, dphi, z, dpi, dhalfpi, twopi, tx;
double xm, ym, f, fx, fy, g, gx, gy, denom, dx, dy;
double colatp, coslatp, sinlatp, longp, sphtol;
- double wf_gseval(), wf_gsder();
/* get the axis numbers */
if (wcs->coorflip) {
@@ -562,7 +565,6 @@ char *astr; /* the input mwcs attrib
int npar, szcoeff;
double *coeff;
struct IRAFsurface *gs;
- struct IRAFsurface *wf_gsrestore();
if (astr[1] == 0)
return (NULL);
@@ -737,7 +739,6 @@ int nxd, nyd; /* order of the derivative
struct IRAFsurface *sf2 = 0;
double *ptr1, *ptr2;
double zfit, norm;
- double wf_gseval();
if (sf1 == NULL)
return (0.0);
@@ -1121,7 +1122,6 @@ double *coeff; /* Plate fit coefficient
{
double *ycoeff;
- struct IRAFsurface *wf_gspset ();
wcs->prjcode = WCS_TNX;
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/zpxpos.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/zpxpos.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/zpxpos.c
@@ -50,7 +50,13 @@
#define max_niter 500
#define SZ_ATSTRING 2000
-static void wf_gsclose();
+
+static void wf_gsclose(struct IRAFsurface *sf);
+
+extern struct IRAFsurface *wf_gsopen(char *astr);
+extern double wf_gseval(struct IRAFsurface *sf, double x, double y);
+extern double wf_gsder(struct IRAFsurface *sf, double x, double y, int nxd, int nyd);
+extern void wcsrotset(struct WorldCoor *wcs);
/* zpxinit -- initialize the zenithal/azimuthal polynomial forward or
* inverse transform. initialization for this transformation consists of,
@@ -81,10 +87,8 @@ const char *header; /* FITS header */
struct WorldCoor *wcs; /* pointer to WCS structure */
{
int i, j;
- struct IRAFsurface *wf_gsopen();
char key[8], *str1, *str2, *lngstr, *latstr, *header1;
double zd1, d1, zd2,d2, zd, d, r;
- extern void wcsrotset();
/* allocate space for the attribute strings */
str1 = malloc (SZ_ATSTRING);
@@ -252,7 +256,6 @@ double *xpos, *ypos; /*o world coordinat
double colatp, coslatp, sinlatp, longp;
double xs, ys, ra, dec, xp, yp;
double a, b, c, d, zd, zd1, zd2, r1, r2, rt, lambda;
- double wf_gseval();
/* Convert from pixels to image coordinates */
xpix = xpix - wcs->crpix[0];
@@ -520,7 +523,6 @@ double *xpix, *ypix; /*o physical coordi
double s, r, dphi, z, dpi, dhalfpi, twopi, tx;
double xm, ym, f, fx, fy, g, gx, gy, denom, dx, dy;
double colatp, coslatp, sinlatp, longp, sphtol;
- double wf_gseval(), wf_gsder();
/* get the axis numbers */
if (wcs->coorflip) {
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/wcsinit.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/wcsinit.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/wcsinit.c
@@ -47,11 +47,13 @@
#include <stdlib.h>
#endif
-static void wcseq();
-static void wcseqm();
-static void wcsioset();
-void wcsrotset();
-char wcschar();
+void invert_wcs(struct WorldCoor *wcs);
+static void wcseq(char *hstring, struct WorldCoor *wcs);
+static void wcseqm(char *hstring, struct WorldCoor *wcs, char *mchar);
+static void wcsioset(struct WorldCoor *wcs);
+char wcschar(const char *hstring, const char *name);
+
+extern void wcsrotset(struct WorldCoor *wcs);
/* set up a WCS structure from a FITS image header lhstring bytes long
* for a specified WCS name */
@@ -242,11 +244,6 @@ char *wchar; /* Suffix character for on
double ut;
int nax;
int twod;
- extern int tnxinit();
- extern int zpxinit();
- extern int platepos();
- extern int dsspos();
- void invert_wcs();
wcs = (struct WorldCoor *) calloc (1, sizeof(struct WorldCoor));
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/wcs.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/wcs.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/wcs.c
@@ -89,12 +89,16 @@
static char wcserrmsg[80];
static char wcsfile[256]={""};
-static void wcslibrot();
-void wcsrotset();
static int wcsproj0 = 0;
static int izpix = 0;
static double zpix = 0.0;
+static void wcslibrot(struct WorldCoor *wcs);
+int wcspos(double xpix, double ypix, struct WorldCoor *wcs, double *xpos, double *ypos);
+int wcspix(double xpos, double ypos, struct WorldCoor *wcs, double *xpix, double *ypix);
+
+extern void wcsrotset(struct WorldCoor *wcs);
+
void
wcsfree (wcs)
struct WorldCoor *wcs; /* WCS structure */
@@ -2123,7 +2127,6 @@ double *xpos,*ypos; /* RA and Dec in deg
{
double xpi, ypi, xp, yp;
double eqin, eqout;
- int wcspos();
if (nowcs (wcs))
return;
@@ -2246,7 +2249,6 @@ int *offscl; /* 0 if within bounds, else
double xp, yp, xpi, ypi;
double eqin, eqout;
int sysin;
- int wcspix();
if (nowcs (wcs))
return;
@@ -2351,7 +2353,6 @@ double *ypos; /* y (dec) coor
{
int offscl;
int i;
- int wcsrev();
double wcscrd[4], imgcrd[4], pixcrd[4];
double phi, theta;
@@ -2392,7 +2393,6 @@ double *ypix; /* y pixel numbe
{
int offscl;
- int wcsfwd();
double wcscrd[4], imgcrd[4], pixcrd[4];
double phi, theta;
Index: sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/dateutil.c
===================================================================
--- sherpa-4.17.1.orig/extern/wcssubs/wcssubs-3.9.5/dateutil.c
+++ sherpa-4.17.1/extern/wcssubs/wcssubs-3.9.5/dateutil.c
@@ -313,11 +313,11 @@
#include "wcs.h"
#include "fitsfile.h"
-static double suntl();
-static void fixdate();
-static int caldays();
-static double dint();
-static double dmod();
+static double suntl(double dj, double ra, double dec, int sys);
+static void fixdate(int *iyr, int *imon, int *iday, int *ihr, int *imn, double *sec, int ndsec);
+static int caldays(int year, int month);
+static double dint(double dnum);
+static double dmod(double dnum, double dm);
static double longitude = 0.0; /* longitude of observatory in degrees (+=west) */
void