forked from sherpa/sherpa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RELEASE_NOTES
3559 lines (2717 loc) · 163 KB
/
RELEASE_NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Release Notes
Sherpa 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
Details
-------
#1757 - Allow the wstat statistic to be used in the likelihood-ratio test
Allow the Likelihood Ratio Test (as used by plot_value) to be run when
using the WStat statistic. Fix #1745.
#1793 - XSPEC move from the xsFortran API to the FunctionUtility API (where possible)
Internal change to the XSPEC interface to use the FunctionUtility C++ API
rather than the XSFortran API. Fix #1225.
#1921 - Clean up of the IO code
Rework the astro data input and output code so that they take advantage of
the new data representation in sherpa.astro.io.types
#1949 - Initial support for Python 3.12
Initial support for building with Python 3.12
#1997 - Add support for XSPEC 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.
Sherpa 4.16.1
=============
This release of Sherpa includes various enhancements, documentation updates, bug fixes, and infrastructure changes.
* 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
Details
-------
#1608 - Remove the test setup.py option
Add the test configuration so that we can ensure the necessary testing
packages can be installed when the code is built. Support for running the
tests with 'python setup.py test' has been removed to match changes in the
Python packaging ecosystem.
#1679 - Automatically split a model expression into additive components and plot the results
Add plot_source_components and plot_model_components calls that will split
up a model like gal * (pl + line) into two lines: one for gal * pl and one
for gal * line. There are also corresponding get_source_components_plot and
get_model_components_plot calls, and the "source_components" and
"model_components" arguments can be used with the plot call.
#1684 -Fix fake_pha docs
Fix the documentation and some corner cases of sherpa.astro.fake.fake_pha.
There are several times when the simulated PHA output would not be correct
if the PHA contains at least one background component or a pileup model
was used.
#1926 - Let users know they should use load_xstable_model not load_table_model
Support for XSPEC table models in load_table_model was deprecated in the
4.9 release. Ensure users know that they should be using load_xstable_model
instead by adding a warning message whenever it is used.
#1934 - Zenodo broke the API we were using to request citation details.
Ensure that the sherpa.citation() command can query Zenodo for the release
information. Fix #1933.
#1938 - CI: temporarily remove ds9 tests on macOS
Avoid the DS9 tests on the macOS build to avoid the failure case we
currently often, but not always, trigger.
#1941 - Fix various typos
Updates from running codespell on source distribution
#1945 - Better error checks for table loads
Ensure that table models are sent numeric columns, to catch cases like #1943.
#1946 - versioneer: update to version 0.29
Update the vendored copy of versioneer from 0.28 to 0.29.
#1947 - Ensure tests can be run when the group library does not exist
Annotate several tests with the requires_group decorator.
#1952 - Tests: better support of optional region/wcs dependencies
Ensure that the tests can pass if the region or WCS code is not available.
#1954 - CI: avoid failures due to missing pyarrow installation
Allow the CI runs to pass with new changes to pandas warning messages
(completely unrelated to Sherpa but caused the tests to fail).
#1957 - CI: support pytest 8.0.0
Allow the tests to pass when run with pytest 8.0.0.
#1959 - Support logarithmic axes for 1D and 2D confidence plots
The projection and uncertainty plots, for both interval (1D) and region (2D),
now correctly create a logarithmic scale when requested. Fix #1561.
#1962 - Pick up latest Python micro version in conda workflow
This resolves the missing crypt.h issue being seen in the conda test workflow
by picking up the latest micro version of the python packages for the conda
test build workflows.
#1965 - Improve the error message when a plot backend is not available.
Improve the error message when a plot backend is not available. Fix #1964
#1968 - Remove Conda build 3.25 pin from deployments
Removes the conda version specification (3.25) to avoid compatibility issues
#1969 - Tests: group the DS9 tests so they can be run with one worker process
Ensure those tests that use the requires_ds9 decorator all have the same
group marker, so that they will be run within a single worker process when
using pytest-xdist to run tests in parallel. There is no change if
pytest-xdist is not installed.
#1970 - Bump the minimum pytest version
Pytest occasionally changes behavior and it does not seem worth our time to
maintain backwards compatibility with old versions of pytest - see #1960
#1972 - Remove excess brackets in model names
Remove excess brackets from model and parameter expressions. This is purely
a cosmetic change, but hopefully makes complicated model expressions easier
to read. Fix #780.
#1973 - Fix the requires_pylab decorator
Change the testing code to better-handle those tests that want to check
plotting when using the pylab backend. Fix #1971.
#1974 - Allow linked parameters to be fit without including them in the model expression
Treat linked parameters as part of the model expression (via the new lpars
attribute and get_thawed_pars routine) so that they can be included in a
fit without including the linked model as part of the model expression.
Fix #777
#1976 - Fix bug in multi-panel plotting in bokeh
Fix bug in multi-panel plotting in bokeh
#1977 - model: improve examples in docstrings
Allow model.py, parameter.py, and regrid.py to be included in the
docstring pytest run.
#1984 - Rework x errorbar support to better-match community expectations
Improve the "x errorbar" handling for histogram-style data (including PHA),
including support for the wavelength setting (fix #1985), to better match
community expectations (e.g. #1817).
#1994 - Tests: improve coverage of parameter module
Improve the test coverage of the parameter module.
#1996 - docs: update examples to match current behavior
Update the ReadTheDocs documentation to match the current code.
#1998 - Cleanup XSPEC interface
A small number of XSPEC model parameter values have been changed to match
the default frozen state of XSPEC version 12.13.1.
#2000 - CM-481: update codecov action to v4, add upload token
Updates version of codecov being used
#2003 - Minor plot work
Internal clean up of the plotting code in preparation for future changes.
The ARFPlot class will now generate an IOErr rather than PlotErr if sent
a non-PHA dataset (to better match other calls). The DataHistogramPlot
class now treats xerr as a property that can not be changed, and is fixed
to be the half-width of the X bins, although note that this field is not
really used and may be removed at some point in the future.
#2004 - Minor improvements to the RMF plot capability
Improve the RMF plot display so that it recognizes the current units
setting and allows the choice of energies to be over-ridden by the user.
#2006 - Use a separate context when handling multiprocessing calls
Ensure that Sherpa does not change the global multiprocessing state but
instead uses the (new) sherpa.utils.parallel.context attribute. Fix #1015.
#2011 - Specialize the residual-style plots for histogram data
Improve the display of residual-style plots for integrated datasets.
Fix #1817.
#2012 - [CI] Update ci-conda-workflow.yml to pin back to macos-12
Pin back to macos-12. This version is specific to macOS-intel. 13 doesn't
work as conda is removed from it.
#2019 - update clone link and versions and DOI
This is a documentation update to fix the incorrect link in the source
install example. I also updated the version and DOI link in the description
of the source installation.
#2020 - CI: bump the checkout actions versions
Internal change to how the GitHub actions are run for CI.
#2021 - Update Conda Deployment Workflow Action Versions
Updates internal actions in the deployment workflow
#2025 - Improve support for NumPy 2.0
Improvements for running Sherpa with NumPy 2.0.
#2029 - Swap oldest-supported-numpy with numpy in requirements
Sherpa 4.16.0
=============
This release of Sherpa includes various enhancements, documentation updates, bug fixes, and infrastructure changes.
* 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.
* documentation changes:
* added doc strings for sherpa data classes
* several updates to in code and RTD documentation
* Infrastructure changes:
* revamp of plotting backends from modules to classes and adding support for multiple backends
* 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)
Details
-------
#1382 - Plot changes: Step 1 A- Draft API for backend classes
Plotting infrastructure changes that make the plotting backends classes
instead of modules.
#1617 - Pass keyword arguments to models
Allow keyword arguments to be passed to models and ensure these arguments
are respected by the model cache.
#1629 - Note when a XSPEC model is changed to F77 form (double precision)
Update a script used when updating the XSPEC support to point out models
that use the double-precision FORTRAN support. There is no functional
change to the code.
#1653 - Allow arbitrary functions for linking parameters
Provide a way to use any Python function to be used for linking
parameters. Fix #1652
#1730 - Update xspec model creation
Update the code created by the sherpa.astro.utils.xspec routines to
account for changes in the XSPEC interface in Sherpa. This only affects
users who call these routines directly.
#1734 - Unify the fake and fake_pha calls
The fake_pha call now accepts a method argument to match the fake call.
#1735 - Allow use of the NumPy random generator API
Take advantage of the NumPy random-number generator classes to provide
random numbers, and move away from using the global state provided by
numpy.random.seed and random.seed routines.
#1738 - Return more-useful information when an XSPEC model fails
Include the model name and parameter values in the error message of a failed XSPEC model.
#1750 - Replace pkg_resources as it is deprecated
Remove the use of the deprecated pkg_resources module and replace with use
of importlib.resources. Fix #1723
#1763 - Allow load_image to change the coordinate system
Ensure that the coordinate setting used in load_image calls is properly
handled (when not set to the default value of "logical"). Fix #1762
#1770 - Drop python2 ism in the fit code
Internal clean up of the fit code to replace a Python 2 method with a
Python 3 version and to use f-strings.
#1771 - utils: make sure OutOfBoundErr is an actual exception
Ensure that OutOfBoundErr is an exception (this is an internal feature).
#1772 - Tweak resample data code
Internal changes to the ReSampleData class to better handle invalid input.
#1773 - Internal clean up of estmethods
Code clean up of sherpa.estmethods.
#1775 - Change a single test to use explicit rather than implicit random state
from NumPy
Simplify a single test. There is no functional change.
#1776 - Move the parallel code into a separate module
Move the parallal_map code from sherpa.utils to the new sherpa.utils.
parallel module (the symbols are still accessible from the original
location but code should be updated to use the new location, including the
renames of _ncpus and _multi to ncpus and multi).#1777 - Change get_sample
to require named arguments
#1778 - Optmethods cleanup
Move testing code out of the optmethods modules and into a separate test,
along with a number of code clean ups. There is no functional change.
#1780 - Fix model plot display when factor is set for grouped PHA data (issue
#1779)
Ensure that model plots can be created for PHA data when set_analysis
routine is used to set factor > 0 and the data is grouped. Fixes #1779 and
#1784
#1781 - utils: remove the numpy_convolve routine
Remove the sherpa.utils.numpy_convolve routine.
#1785 - Add docs to Sherpa data classes
Add docstring to most Sherpa dataclasses.
#1791 - Tests: ensure repeatable test of get_draws
Ensure tests of get_draws use a fixed seed to make the results
reproducible. There are no functional changes in this commit.
#1794 - docs: note requirement on ar for building Sherpa
Add ar to the list of requirements for building Sherpa. Fix #1792
#1795 - Add docs to describe the inputs for the ``calc`` function of a user
model
Add docs that describe the arguments of the calc function for user models.
#1797 - model: explicitly send parameter argument to calc
Ensure that the calc method for models begins with the parameter array
(explicitly given) rather than extracting it from the named arguments sent
to the routine. This should not change any user code.
#1800 - utils: minor code clean up
Internal clean up of the sherpa.ui.utils module.
#1805 - Clean up display of dataset ids during fits
Ensure dataset ids are listed without leading brackets in the fit and
staterror string outputs (remove an accidental change made in #1770). Fix
#1804
#1806 - Activate sphinx directive to make plots
Use the Sphinx plot directive to generate (some of) the plots in the docs.
#1807 - NumPy 1.25 support
Remove deprecation warnings seen when using NumPy 1.25.0.
#1808 - Use Sherpa install instead of code only to build docs
Switches from building the documentations from the source directory, to
building it from an installed version of Sherpa.
#1809 - Update the hardcoded Zenodo releases to include the 4.14/4.15 releases
Update the stored Zenodo releases to include the 4.14.* and 4.15.* Sherpa
releases. Users should see no difference (other than avoiding the need for
an http call to retrieve this information) when calling sherpa.citation().
#1810 - RTD: fix script name for XSPEC updates
Improve the documentation on how to update to a new XSPEC version by
ensuring the correct helper script is run in an example.
#1811 - ui: use the default pickle version when dumping the state
Use the default version when pickling data (used by the UI save call)
rather than an old version. Fix #1243
#1812 - Autoupdate copyright year in sphinx docs
Autoupdate copyright year in sphinx docs.
#1813 - Fix ReadTheDocs warnings and then make RTD fail on warnings in CI
Fix ReadTheDocs warnings and then make RTD fail on warnings in CI.
#1819 - CI: hide NumPy 1.25 array ndim>0 deprecation warnings
Allow the tests to run with NumPy 1.25 and with Crates (from CIAO 4.15) as
the I/O backend. There are no functional changes.
#1821 - parallel: tweak ordering of checks for parallelization
Internal change to the decision of whether to use the multiprocessing
module to run code or not.
#1823 - sherpa_test: tweak how pytest/plugins are installed
Internal changes to how we check for test requirements used by the
sherpa_test script.
#1824 - remove non-existent datastack plotting backend initialization attribute
Clean up error condition by removing the sherpa.plot.backend.
initialize_backend attribute as no longer exists.
#1828 - Improve PHA source plots: support type=counts and factor above 1
Source plots for PHA data now follow the rate and factor analysis
settings. Prior to this the rate setting was ignored and the factor
setting produced incorrect values for factor=1 and factor=2). Fix #1825
#1829 - Limit precision in the comparison of string outputs
Update the tests to support running on ARM/AARCH64 platforms where numeric
differences can complicate string comparisons. Fix #1815.
#1832 - astropy: rework RMF input (fix #1344)
Allow the AstroPy backend to read in HRC-I RMF data. Fixes #1344.
#1835 - Note compatibility with XSPEC 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 calls 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
#1867 - First fixes for NumPy 2.0
Internal code changes to improve support for NumPy 2.0.
#1874 - save_all improvements for set_psf and load_xstable_model
Ensure that save_all includes set_psf calls, supports XSPEC table models,
and improve the support for data sets created with load_arrays or
dataspace1d/dataspace2d. Fixes #1873.
#1877 - un-whitelist deprecation warnings
Cleaned up deprecation warning exceptions from test white list
#1878 - Tests: better handle case where both astropy and crates are available
Fix up tests that would fail when both astropy and crates packages were
installed and the pyfits backend was chosen (the tested functionality was
not wrong, just they were testing the wrong things).
#1883 - Update setup_ds9.sh for DS9 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.
Sherpa 4.15.1
=============
This release of Sherpa includes various enhancements, documentation updates, bug fixes, and infrastructure changes.
* enhancements:
* 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
Details
-------
#1396 - XSPEC minimum version is now 12.10.1
Bump the minimum-supported version of XSPEC from 12.9.0 to 12.10.1.
(superseded by #1609)
#1472 - tests: remove work-around for #1334 from #1336
Remove a test work around for our CI tests failing (issue #1334)
#1486 - Improve filtering/grouping behavior
Changing the grouping array of a PHA dataset (with set_grouping from the UI layer
or by setting the grouping attribute of a DataPHA object) will now re-create the
filter, to fix #1160.
It is suggested that the filter expression (e.g. as returned by the get_filter
routine for uses of the UI layer) is checked to ensure the result is still sensible.
#1502 - Cleanup template code
Improve the documentation and testing of the template-model code. There is no
significant change in behavior, but some use cases will generate more-appropriate
errors than they used to.
#1591 - Document params and return values for root finding functions
Add docstrings for root finding functions
#1607 - Fix an issue when binning values into a 1D histogram
Fix a problem when binning data into a histogram (issue #1605).
#1609 - XSPEC minimum version is now 12.12.0
Bump the minimum supported XSPEC version to version 12.12.0.
#1611 - Post 4.15.0 updates
Add the 4.15.0 DOI to the README.md.
#1613 - Allow testing of the documentation
Adds the ability to run doctests in py and rst files. Those tests will run
automatically, if doctestplus is installed (not on CI in the current setup) and
the file is not explicitly blacklisted for doctestplus.
#1621 - Fix a cache error with TableModel
Fix cache errors with the TableModel class (#1622), add validation of input
values, and minor additions to the documentation.
#1630 - Add support for XSPEC 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)
#1698 - Update versioneer to 0.28
Update the version of versioneer included in Sherpa from 0.21 to 0.28. Fix #1677.
#1708 -Ensure string id can be used for the background id in the DataPHA notice/ignore call
Allow a string identifier to be used for the bkg_id argument to the
DataPHA.notice (and ignore) method, fixing #1709 (it does not affect users
using the ui layer).
#1711 - plot: add linewidth option
Add the linewidth option for line and histogram plots (e.g. plot_data,
plot_model, plot_fit) with the matplotlib backend.
#1715 - utils: rework the error-column saving code
Internal clean up of the save_*error routines. There is no change in behavior.
#1716 - utils: tweak internal _save_type routine
Minor internal change to a routine in the utils code. There is no change in
behavior.
#1720 - Fix get_stat_info output for individual components
Fix the get_stat_info output for multiple PHA data when the data has a different
number of background components (fix #1721). The get_bkg_model routine will now
use the source PHA for a response if the background has no response (to match
what fit and fit_bkg do, fix #1724).
#1733 - Allow fake_pha to be called with a list of ARF/RMF names of length 1
Allow fake_pha to be called with a list of ARF and RMF names that only contains
one element. Fix #1722
#1739 - pyfits: be more lenient with FITS files with messed-up headers
Allow some FITS files with an invalid header to be used with the AstroPy I/O
backend.
#1747 - reduce chance of plot_pvalue getting stuck in a bad parameter space
Ensure that each simulation step for the likelihood ratios code, as used by
plot_pvalue, starts with the same parameter values to reduce the chance that the
results can get stuck in certain areas of parameter space. The ratios field of
the LikelihoodRatioResults structure - e.g. the return value of
get_pvalue_results() - can be plotted to see if this has happened (e.g. large
ranges where the ratio is close to zero.
#1751 - Explicitly require attrs module when testing Sherpa
Ensure that the attrs module is available for testing Sherpa.
#1752 - Drop Python 3.8 and Pick up Python 3.11 as a beta
move to be NEP-29 compliant with python version
#1753 - Initial support for Python 3.11
Basic support of Python 3.11.
#1755 - Tests: replace use of attrs package by dataclass
Change a test file to use data classes rather than use the attrs module, which
means that attrs is no-longer needed to test Sherpa. There is no functional
change in this PR.
#1756 - Fix broken URL in docs
Updated URLS which are no longer valid
#1759 - updated plot_pvalue docs
Updated docstring for plot_pvalue to include reference to the algorithm
#1760 - Tweak test tolerances mac arm
Improve test reliance when running on the macOS ARM platform
Sherpa 4.15.0
=============
This release of Sherpa includes various enhancements, documentation updates, bug fixes, and infrastructure changes.
* enhancements: