-
Notifications
You must be signed in to change notification settings - Fork 49
/
RELEASE_NOTES
2394 lines (1835 loc) · 112 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.14.1
=============
This release of Sherpa includes various enhancements, documentation updates, bug fixes, and infrastructure changes.
* 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
Details
-------
#1030 - Update lev3fft test to use PHYSICAL not WCS
Update a 2D image test to use physical rather than WCS coordinates for the fit.
#1185 - Simplify switching the astro.io backend
Add dummy_module, docs, and test case for switching the sherpa.astro.io backend.
io backend are now tried in a default order (crates, pyfits, dummy)
#1191 - Make it easier to switch the plotting backend
Make is easier to switch the plotting backend (note that we currently only have on
backend implemented anyway)
#1207 - Improve OGIP headers in PHA files
Improve the FITS headers created when writing out a PHA file (to better match OGIP
standards). Fixes #488 and #1209
#1314 - test: add requires_data decorator
Add a needed decorator for a test. There's no functional change to the code.
#1317 - Add requires group test decorators
Ensure the tests that require the group library are marked with the requires_group
decorator.
#1318 - Adjust a test for python 3.10
Adjust a test so that it passes with Python 3.10
#1326 - Write-up that environment variable in setup.cfg need to be expanded
Add a detail to developer docs about compiling in a conda ciao environment
#1328 - Versioneer cleanup
Update the versioneer module we use from 0.14 to 0.21 (latest).
#1331 - optmethods: remove Deprecation warning about invalid escape string
Remove a deprecation warning from sherpa.optmethods.optfcts and update some fake_pha
tests to each use a fixed random seed.
#1332 - Add Instrument test
improved the psf tests, adding low-level tests of the tcdData class
#1337 - Fix import statements
Change from using __import__ to importlib.import_module.
#1338 - clean up some C/C++ code in the _psf.cc file
Minor clean up of C/C++ code
#1339 - Add codecov.yml to fix path issue and update codecov uploader
Fix path parsing issue on codecov as well as updated for the new codecov uploader
#1340 - Change how the sherpa config file is accessed
Support environments where the HOME environment variable is not set when accessing
the Sherpa configuration file.
#1347 - Refactored array classes cause std::vector has non-virtual destructor
std::vector has non-virtual destructor so in this PR the refactored Array (1D and 2D)
classes no longer inherit from std::vector
#1348 - Minor internal code cleanup tracking errors
Minor internal changes to how some errors are raised. There should be no
user-visible differences due to this changes.
#1351 - Update the sherpa-test-data repo to the latest from main
updates that reference to the latest copy
#1353 - Fix issue with delete_model_component
The delete_model_component call could fail in certain circumstances, so fix those
cases. Fixes #16
#1355 - Minor cleanup of the I/O code
Minor internal clean-up of the I/O code. There should be no user-visible changes.
#1359 - Improve writing out data objects as a table (fix #47)
Fix writing out of PHA datasets as a generic table (both ASCII and FITS formats).
Fixes #47
#1360 - Add missing export statement to clang 12 note
Update documentation to be clearer on how to build on clang 12 and avoid compiler
error on implicit function declarations
#1361 - Ensure FITS column access is case insensitive for the pyfits I/O backend (fix #143)
Allow FITS colummn access with the pyfits backend to be case insensitive. Fixes #143.
#1365 - Simplify a test (fix #541)
Remove duplicated code in a test (fix #541).
#1370 - Minor tweaks to handling of PHA settings
Improve the checking of the factor and rate settings of set_analysis and the
plot_fac attribute of the DataPHA class, and add a few tests that exercise some
corner cases of the DataPHA class.
#1374 - Address aarch/ppc64le test failures
Update tests to that they pass on aarch64. Fixes #1372
#1376 - Very-minor tweaks to docs/tests
Fix a minor test issue and an unused reference in the documentation.
#1387 - minimize C++ code duplications (rebase)
Remove code duplication in the XSPEC module.
#1399 - Allow conf/covar/proj to be used with XSPEC model parameters (regression)
Ensure that conf, covar, and proj can be called with an XSPEC model parameter.
Fixes #1397.
#1401 - Modified region code to remove implicit prototype error
This change updates the extern region code in sherpa to resolve a missing prototype
which causes build issues with clang 12.0.
#1403 - Updates to fix typos in the plot documentation
Update to fix a few typos in the plot documentation
#1410 - Add script and docs for pre-commit hook to update copyright
Add example script for a git pre-commit hook that checks the copyright is up to date.
#1411 - Add sphinx_rtd_theme to sphinx extensions and set min version
Our readthedocs pages have had some visual issues (in particular, bullets point
where missing from output) for a while. This fixes that by ensuring we are using
a recent version of the sphinx theme.
#1413 - Add more editor/OS exclusions to .gitignore
Add a VSCode workspace summary files and MacOS directory preview files to .gitignore
#1414 - Improve the handling of image coordinates
Address an error when converting between different coordinate systems for images.
Fixes #1380.
#1415 - RTD fix missing and changed symbols
Update the ReadTheDocs build to cope with changes in #1191
#1418 - Fix minor test issues
Address several minor test issues.
#1419 - Keep .rc file backwards compatible
Default rc files will work in older version of sherpa as well.
#1421 - Address usability issues with Data2DInt and DataIMGInt classes
Fix issues using the Data2DInt and DataIMGInt classes (#1379).
#1423 - fix a compiler bug on macOS
update to address compiler issue when compiling on macOS
#1424 - rm primini stat method
This PR removes the primini iterative statistical method. Please see issue #1392
for details
#1425 - Allow users to freeze models
Models can now be frozen or thawed, which just calls the requested on all the
parameters of the model (except for "alwaysfrozen" parameters which are skipped).
This is only relevant for users who are accessing the objects directly since the ui
versions of freeze and thaw already implemented this behavior. Fixes #1080.
#1429 - Tests: fix up test problems shown by pytest 7.0.0
Fix up several tests so they can be run with pytest 7.0.0. Fixes #1428
#1434 - Fix aarch64 test failures
Allow the tests to pass on aarch64 (numerical precision checks).
#1435 - Minor clean up of the data code
Improves the docstrings for DataPHA, adds tests for several corner-cases, and makes
some minor code improvements to the code.
#1440 - Minor clean up of the data routines
Address several minor code-style changes in the data handling (code and tests).
#1441 - Clean up the data tests
Clean up of the data tests which were added as part of the data-class rework in #614.
#1442 - Ensure channel and count fields for PHA are aliases of independent and dependent axes
Ensure that channel and the independent axis and counts and the dependent axis are
synonymous for the DataPHA class.#1451 - Tests: ensure sherpa smoke tests are done
in a clean environment
#1453 - Tests: mark those that require the group module
Note a number of tests that require the group module.
#1454 - RTD: update copyright year and fix WCS library
Update the sphinx build instructions so that changes from PR #1414 will be documented
correctly on systems where the documentation is being built without first compiling
the code (such as read-the-docs).
#1455 - RTD: update the build-from-CIAO documentation
Update the "build with CIAO" documentation to match the CIAO 4.14 conda instructions
and automate the process.
#1458 - Improve several issues when building and testing Sherpa
Minor improvements to the build and test installation. The use of setuptools has
been restricted to match the current advice from NumPy (< 60, from
https://numpy.org/devdocs/reference/distutils_status_migration.html).
#1461 - Minor grouping cleanup
Minor internal change to how the group routines work for PHA objects.
#1462 - Docs: fix up documentation of ui.set_grouping
Fix the documentation for set_grouping to match the code.
#1463 - rm a redundant call to calc_h
Removed a redundant call the the calc_h method in the class fdJac
#1464 - RTD: include the DataOgipResponse class in the documentation
Add a missing class (DataOgipResponse) to the documentation.
#1473 - Data test minor cleanup
Minor test clean-ups.
#1474 - Add basic tests of data validation
Ensure we test a number of corner cases related to data validation.
#1484 - Include ciao region patch
Allow the CXC Data Model library to be used to parse region files, if available.
This is primarily intended for building Sherpa as part of CIAO.
#1485 - get_header_data is an official method of the astro.io backend
An internal change to make sure that the get_header_data routine is part of the
astro I/O backend API.
#1490 - Basic support for XSPEC 12.12.1
Allow Sherpa to be built with XSPEC 12.12.1. It does not provide access to the three
new models - polconst, pollin, and polpow - added in this release of XSPEC.
#1492 - Make tests pass on 3.10
One of the tests fails in Python 3.10 because the error message has been changed.
#1493 - Remove deprecated distutils.version.LooseVersion
The distutils.version.LooseVersion class is now marked as deprecated so remove its
use when building Sherpa and when importing the Sherpa XSPEC module.
#1494 - Update AX_PYTHON_DEVEL.m4 from serial 17 to 25
This update covers the cleanup of distutils in the configure files for grplib (and
stklib in the case of standalone sherpa).
#1495 - Note that we support Python 3.10
Note that Sherpa can be built using Python 3.10 and add two Python 3.10 CI test runs.
#1496 - DS9 update from 8.2.1 to 8.3
Update to use ds9 v8.3 since v8.2.1 is no longer available
#1497 - Tests: ensure matplotlib windows are closed after all tests are run
Ensure that our tests can run on CI cleanly.
Sherpa 4.14.0
=============
This release of Sherpa includes various documentation updates, bug fixes, enhancements, and infrastructure changes.
* enhancements:
* filtering and grouping for binned (1D) spectral data have been improved
with changes to the default behavior and many bug fixes resulting in
differences to the statistics, degrees-of-freedom and energy flux in
comparison to the previous version for the same data with the same filter.
* the output of get_filter() for 2D region filter expressions now correctly
describe complicated shapes (e.g. when used with calc_data_sum2d)
* updates allowing to change the hard limits of XSPEC model parameters and
also to use XSPEC models that use “out-of-bounds” values to switch certain
behaviour such as for example the fpl parameter of the xsoptxagn model
* 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
Details
-------
#1031 - Update fwhm calculation
Update the estimation of FWHM for 1D profiles, and hence the guess method for
Gauss1D and related routines. The 2D models use the same routine so see these
changes.
#1073 - Allow fake_pha to be called with an identifier of None
The fake_pha command now treats id=None as the default id. This addresses #1064.
#1106 - The sample_flux routine now returns the correct information for the clip column
The sample_flux routine now returns correct information for the clip column
(that is, it matches the clipping done by this routine). There may be changes to
the reported error ranges because of this change.
#1107 - Add some grating related keywords for _repr_html_ for ARF, RMF, PHA
Add keywords to the default output in the _repr_html_ for some X-ray classes.
#1113 - XSPEC: support etable table models
Allow XSPEC ETABLE table model files to be read by load_xstable_model by
setting the etable parameter.
#1118 - Improve test cases for source plots with PHA data
Add additional test cases for source plots with PHA data to check out
rarely-used combinations.
#1127 - PHA filtering changes
Improve some corner cases for filtering PHA data, including fixing #921 (channel
bounds are integers, not half-integers).
#1131 - Test: fix a test failure when XSPEC installed but no fits backend
Avoid running a test we know to fail for an uncommon combination of options.
#1134 - This is a doc-string only update for load_multi_XXX
The previous example implied that a spectrum may contain both positive and
negative orders in the same spectrum. That can happen only after coadding -
and in that case one would co-add the arfs as well.
#1135 - Added docstring and removed unused no-op class
Remove sherpa.astro.models.MultiResponseSumModel which did nothing and seems
to be unused (except in a test that explicitly skip this class).
#1136 - Replace error message "too few columns" with a more generic word
Change the wording of an error message. Potentially breaking if someone tests
for the wording of the error message in their code, but certainly more correct.
#1137 - Correct docstring for fake_pha
The old docstring claims that the background is just scaled and not simulated,
but there is definitely a call to poisson_noise for the background in the code.
#1138 - Address NumPy 1.20 bool/int/float deprecation warnings
NumPy 1.20 notes that numpy.bool, numpy.int, and numpy.float will be removed
and users should just use bool, int, and float instead, so these symbols have
been changed. This is a follow on to #1092
#1140 - Fix some remaining master/main renames
clean up references to master with main
#1143 - add basic test and documentation for Integrate1D
Add basic testing of the integrate1d model class and improve its documentation.
#1144 - A minor cleanup of estmethods
A minor cleanup of the sherpa.estmethods code.
#1147 - Tests: support use of data directory being local, not absolute
Allow a test to pass when given a relative path for the test data directory.
#1154 - Update docs on RTD builds
Update docs on how the docs are build in CI
#1155 - Remove Meta class for fits hdu headers
Remove Meta class for header information that is used only rudimentary and
acts almost, but not quite, like a dict
#1163 - XMM/RGS triggers a notice/ignore bug because channels are in reverse-energy order in RMF
Recent work on the ignore / notice logic in #1127 implicitly assumes that the
energy grid in PHA/ARF/RMF files is in increasing order, which does not hold
true for XMM/RGS data
#1164 - Fix plots with wavelength general:visualization type:bug
For some data files, plots with a reversed grid (i.e. plots in wavelength) were
drawn with disjoint lines since #906.
#1165 - Add a section on running the tests to the developer docs
Add a section on running the tests to the developer docs
#1168 - Logging tweaks
Include the sherpa.utils.logging module in the documentation and update a test
to use the caplog feature of pytest (the code had been written to work with
python 2.7 version of unittest).
#1170 - Update Python and particularly number versions in documentation
Updates to doc pages that list dangerously old numpy versions
#1171- Improve the grouping/filtering tests
Add a number of tests for corner cases of filtering and grouping of PHA data.
#1172 - Improve data pha docs
Improve the documentation of the filtering and grouping of PHA data.
#1173 - Improve DataPha documentation
Minor improvements to the documentation of the DataPHA class.
#1175 - Store UI contour plots in a dictionary, not directly
Change the internal storage handling of contour objects
#1177 - minor rework of image handling for ui layer
Change the internal storage handling of image objects and improved testing
#1178 - Define physical constant hc in fewer places
hc (as in "Planck constant * speed of light") is a physical constant that does
not depend on the DataPHA and thus it should not be defined as a class attribute.
#1180 - Minor improvements to model/parameter documentation
Minor fixes and improvements to the documentation (both docstrings and RTD)
for the model- and parameter-related code.
#1182 - Simulations with multiple responses
Enable simulations with multiple ARF/RMF present (e.g. LETG/HRC).
#1183 - Check parameter link behavior
Minor tweaks to the parameter tests.
#1184 - Better pha model component plotting (fix #1020)
The use of plot_model_component and get_model_component will now automatically
add the response for PHA data sets, if there is one. Model expressions which
contain a response will not be changed. Fixes #1020.
#1187 - Conda GCC 9.3.0 update issue
update to support environment changes due to conda defaults updates for
gcc 9.3.0
#1192 - Remove Python 3.6 and add Python 3.9
updates to switch python support to python 3.7-3.9
#1194 - datastack: Improve show_stack and add _repr_html_ for stack
Improve datastack display (via show_stack and in the notebook) for datastacks.
#1198 - XSPEC test cleanup
Very minor improvement to the XSPEC test suite.
#1199 - Move the regrid code out into a separate method
Very minor code reorganization for the regrid code.
#1203 - Update GitLab Conda recipe to numpy 1.19
updates gitlab conda recipe to python 1.19+ and adds run time pin
#1204 - region lib updates for CIAO 4.14
updates to fold in changes to CIAO region lib for CIAO 4.14. Specifically,
fixes for SM-89: bug in pie shape (extent/inside logic), SL-243: region -
deprecate obsoleted Warning.
#1205 - Remove the SherpaTestCase class
Remove the SherpaTestCase class from sherpa.utils.testing and switch the tests
that used it to use pytest functionality where appropriate.
#1208 - Fix get_xerr for Data1DInt when all data is filtered
The get_xerr method of Data1DInt would fail if all bins had been ignored and
it now returns the empty list.
#1215 - Restrict the values used in PHA notice/filter calls
Ensure that the low and high limits for notice and ignore calls for DataPHA
objects are sensible (hi >= lo and that for energy or wavelength filters they
are >= 0). When filtering DataPHA objects in channel units the lo and hi
arguments must be integers otherwise an error is raised.
#1216 - filter improvements for DataPHA and Data1DInt
Energy and wavelength filters (with notice and ignore) for PHA data are now
treated as lo <= x < hi in all cases, and channel filters are lo <= x <= hi
(where the channel values must be integers). For Data1DInt cases the notice
and ignore filters are treated as lo <= x < hi. This changes address a number
of corner cases.
This can result in slightly different fit results because the data used in the
fit can be changed and hence changing the number of degrees of freedom (by one
or two depending on whether the first and last bins have been removed).
#1218 - Update fftw from version 3.3.8 to 3.3.9
This change updates the version of the fftw module in sherpa's external
dependencies (extern) directory to utilize version 3.3.9 (www.fftw.org) instead
of the previous version 3.3.8
#1219 - Fix filter expressions
Filter expressions for Data1DInt and DataPHA cases now report the start and end
value of each set of grouped data rather than use the end points. For PHA data
sets users now see the same ranges displayed whether the data is grouped or not.
The actual filter remains the same even if the filter expressions has changed
slightly.
#1223 - XSPEC 12.12.0 support
Support the new additive and multiplicative models in XSPEC 12.12.0 - XSgrbjet,
XSwdem, XSvwdem, XSvvwdem are additive and XSzxipab is multiplicative - and
note the additional abundance tables that are available when running with XSPEC
12.12.0 (lpgp and lpgs).
#1227 - Support AstroPy 4.3 for tests
The AstroPy FITS reader is less tolerant of invalid FITS files in AstroPy 4.3
which trips one of our tests. The test has been updated with a FITS file that
doesn't trigger the error case. There is no functional change in this commit.
#1228 - Fix three parameter names for XSPEC models
Fix three XSPEC models which had some internal confusion over parameter names:
XSzkerrbb should have uses fcol but had instead used hd, and XSzashift and
XSzmshift used Redshift instead of Velocity. The old names have been kept as
aliases.
#1230 - Update submodule to pick up submodule README
Updates submodule to pick up the submodule README
#1231 - Remove __init__.py from tests directory
Clean up of a test directory. There is no functional change in this commit.
#1236 - Remove compiler warnings
Avoid compiler warnings from clang, fixing #1232 and several other warnings.
#1241 - to get sherpa to run Apple M1 (arm)
Initial support of sherpa for ARM build
#1244 - Fix "unable to parse region string: None" errors (issue #1214)
In certain circumstances (such as plot_pvalue with an explicit 2D PSF
convolution operator read from a file) the code would fail with the error
unable to parse region string: None (issue #1214). This PR fixes this problem
and several minor related issues.
#1246 - Image region filters are now specified correctly (Fix #1245)
Update the image filter code so that the region description matches what the
filter actually is: rather than use & to combine regions we now use | as it
is a logical or rather than logical and. This is mainly going to affect users
who: have used the output of get_filter() as input to calc_data_sum2d, have
very-complex spatial filters, or are restoring Sherpa sessions created by save
or save_all.
#1247 - Allow save_all to work well with images with no filters (Fix #437)
Fix a problem with the output of the save_all command if an image had been
loaded but no region filter applied (fix #437): the output file would contain
a notice2d_id call with a filter of "" which would fail if you tried to load
the file back in. It now no-longer creates this line.
#1248 - Docs: note that set_stat can be sent a stats object
Update the documentation for set_stat to note you can send in a stats object
#1250 - Stop odd interaction between plot_model and PHA filters (Fix #1024)
plot_model(), if done before calling notice or ignore, could lead to strange
filters (e.g. filter not getting applied). This has been fixed. Fixes #1024
#1253 - More numpy 1.20 warning fixes
Avoid warnings from NumPy 1.20 about using the deprecated np.int symbol.
#1254 - FIX: #1235 change XSPEC chatter to 10 from 0
Change the default X-Spec chatter level from 0 to 10. This may result in screen
output the first time an XSPEC model is evaluated (e.g. from a plot_model or
fit call). There have been a number of cases where APEC models appeared to be
creating no output because of missing data files (due to old ~/.xspec/Xspec.init
settings) which would have been more obvious with this change. To get back to
the previous behavior users can call set_xschatter(0).
#1259 - XSPEC parameter changes - you can change the hard limits of most XSPEC parameters
XSPEC model parameters now use the same limits for soft and hard (the hard
limit from the model.dat file). This is handled by the XSBaseParameter class
which is used for XSPEC table models. The XSParameter class, which extends this
and is used by most other parameters, allows the user to change the hard limits
of the model. This follows XSPEC, and allows using some models which are
documented as supporting a value outside the normal parameter range (normally
by setting the value to a negative value). Note that this is potentially
dangerous (it could crash the program) so should be used carefully. It is
strongly suggested that any parameter set to a value outside of the original
limits is also frozen.
#1260 - Add a module to parse XSPEC model.dat and helper scripts #1260
Add support for parsing XSPEC model.dat files (useful for updating the XSPEC
module or if you want to use XSPEC local models).
#1261 - update to match recent XSPEC model.dat settings
Update the XSPEC models to match the latest model.dat file (from HEASOFT 6.29 /
XSPEC 12.12.0). This primarily changes the hard limits of the models, but there
are some changes to the default parameter values as well, as well as some unit
changes, including adding and removing units.
#1264 - Fix crash from grouping data using an unsupported method
It was possible to cause Sherpa to crash by passing an invalid function as the
groupfunc argument to apply_filter and apply_group. The code now errors out
instead. There are improvements to the documentation (docstring and RTD) for
PHA filtering and grouping.
#1268 - Doc: switch default sphinx role
Multiply the number of working references on readthedocs, while at the same
time reduce verbosity in the docstrings.
#1270 - Cleanup setup
Update the Python supported status in the package metadata (drop 3.5, add 3.8)
and bump the minimum version to 3.6.
#1273 - crates backend strip preceding/trailing whitespace when determining ascii file colnames (Fix #1262)
This change modifies the crates backend ascii file handling to resolve issue
#1262 where a test added in PR #1253 causes the tests to fail. This change may
potential result in behavior changes for crates use on ascii data files (see
caveat section for details).
#1276 - Fix Inconsistent behavior in save_arrays when optional parameter ascii = True/False (Fixes issue #1251)
Updates the data I/O so that write_arrays behaves consistently whether writing
ascii or fits files via the pyfits backend.
#1279 - rm the platform cause no longer need it
rm the platform module since it is not needed for ARM support
#1281 - RTD: include parse_xspec_model_description
Fix a link on the Read The Docs pages from PR #1260
#1282 - Add Zenodo details for 4.13.1
Include the Zenodo details for the 4.13.1 release into the hard-coded list of
releases.
#1285 - Added an option to reflect minim about the boundary
This PR adds the option on how the optimization minim will behave if the free
parameter is beyond the limit. The default parameter reflect is True (will
reflect by an equal amount about the limit). If reflect is set to False then
model function will return DBL_MAX (~1e308) and therefore it will not be
included in the simplex.
#1287 - Remove C++ warning when compiling the pileup code
Use unique_ptr rather than auto_ptr in the pileup code to avoid C++ warnings.
Fix #505
#1288 - Improve the PHA simulation documentation
Fix up some links in the RTD documentation for simulating PHA data.
#1290 - Fix the string output of CDFPlot
Corrected the order of the points, x, and y values when displaying a CDFPlot
object, improve support for a list argument, and made minor additions to the
documentation in the sherpa.plot module.
#1291 - Comment: add link to the OSTI.GOV URL for the optimizing document
Add a reference to the OSTI.GOV technical report in the comments in the C++
code used for testing the optimization functions.
#1292 - Update tests that were changed by #1246
Fix tests that started to fail once #1246 was merged.
#1293 -RTD: add a "how to optimize a function" example
Add a section to the ReadTheDocs site explaining how to "optimize a function"
as this is something we can do but only really with the low-level code.
#1294 - RTD: Fix some sphinx warnings (sherpa.models.regrid)
Fix a minor warning when generating the Read The Docs pages.
#1295 - Update XSkerrconv model for #1275
Rename the first two parameters of the XSPEC XSkerrconv convolution model from
Index/Index1 to Index1/Index2. Fixes #1275
#1296 - Document the neldermead reflect flag from #1285
Add documentation for the reflect keyword added in #1285 for the neldermead
optimizer
#1303 - Updated Introductory Section of the MCMC page
Added additional details regarding sherpa's MCMC inplementation to the
documentation
#1308 - Docs: fix get_filter examples
Fix the examples in the get_filter documentation.
#1310 -Update the python check for python setup.py installs to 3.7
Updates the minimum supported version of python supported in setup.py to use
python 3.7
Caveats
-----------
* Crates behavior change - PR #1273 fixes an issue with the crates backend where
supplying a column filter "opt colnames=none" for an ascii file would utilize
default column names 'col1..coln' instead of the column names specified in the
file. Code which relied on the old behavior may now produce an IO error such
as "IOErr: Required column 'col1' not found in [ <list of valid column names>]"
Sherpa 4.13.1
=============
This release of Sherpa includes various documentation updates, bug fixes, and infrastructure changes. The default branch in github has been migrated from master to main.
* 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
Details
-------
#754 - sample_flux now returns statistic values for each row
The sample_flux command now returns a statistic value for each iteration,
even if those rows are not used in the reported flux distribution. Fixes #751.
#769 - add basic cache tracking
Adds the cache_status and cache_clear methods to models for verifying the
cache behavior (this is only expected to be used in rare cases). The cache
code has seen documentation improvements.
#946 - rework stats tests
Update the stats tests to use pytest.
#960 - Fix model evaluation when changing the integrate setting (fix #958)
Fixes an issue with cache evaluation on 1D models using integrated bins and
the user has changed the integrate setting of the model.
#978 - Use C99 def for INFINITY, NAN, isfinite and isnan to build on aarch64 (fix issue #970)
Use the math constants (IFINITIY, NAN) and funcs (isfinite, isnan, signbit)
from a C99 compliant compiler if the compiler option -std=c99 or greater is
used, otherwise use the quantities as defined by the library.
#991 - lint changes
Applies a number of flake8-reported warnings to the code base (e.g. excessive
or missing spaces and new lines).
#1000 - Improve sherpa.citation (fix #994 #987)
Fixes the sherpa.citation() command with its default argument (issue #994) and
adds release 4.12.2 to the hard-coded list of releases. A typo in a warning
message was fixed (#987).
#1001 - Allow command-line arguments for sherpa_test
Allow command-line arguments to be passed to the sherpa_test script. This allows
running optional tests (e.g. the --runzenodo argument) and to configure the
pytest configuration (e.g. to run coverage checks with --cov sherpa).
#1002 - Fix error with clobber=False for paging - issue #996
Fix an error with clobber=False when the output file exists for several paging
commands (e.g. show_data and sherpa.citation). Instead of getting a Sherpa IOErr
being raised a NameError was being raised.
#1003 - Fix serialization of iter method data - issue #997
If set_iter_fit_method has been called with a value other than 'none' then the
output of save_all would be incorrect for the options for the iter-fit method.
#1004- flake8 F811 - fix repeated test names
Clean up of several test files to fix repeated test names.
#1005 - Add explicit get/set_datadir routines to sherpa.utils.testing
Internal changes to how the test data directory location is set and queried,
including removing direct support from SherpaTestCase. Added tests for some
of this functionality, and updated several test files to remove SherpaTestCase
or use the new datadir functionality.
#1008 - rm warning msgs, fix issue #980
Fix the compiler warning messages, by defining kwlist to be static const then
use the C++ const_cast to remove the const to conform to PyArg_ParseTupleAnd
Keywords prototype
#1012 - Tests: allow test_ui tests to be run with pytest-xdist
Allow the tests to be run with pytest-xdist.
#1016 - Jupyter notebook representation not ideal if model components don't have unique names - issue: #1013
Fix an error in the HTML display of a model (used in the notebook) when two
model components have the same name.
#1017 - reword remark on normalization of Lorentz function
Updated the comments pertaining to Lorentz function for clarity
#1018 - Fix ShekelModifiedInit missing init par vals
This PR fixes the missing initial fitted parameter values for the
ShekelModifiedInit function. A fix for issue #1011
#1028 - Update region lib code to correct build issues with gcc 7.3.0 compile
Corrects issue building with gcc 7.3.0+ compilers with the
-Werror=format-security compilation flag
#1034 - Add contextmanager and docs on how to control the output level of sherpa
Sherpa uses logging for much of its output, this adds a docs and a context
manager for controlling the output level for a particular piece of code.
#1039 - Add docs for basic.TableModel
Added missing documentation for TableModel class
#1049 - CI: pip submodule test to report coverage
Report the coverage data from the pip CI run. This only changes the GitHub
Actions runs.
#1053 - Release 4.13.0
Updates to support the 4.13.0 release
#1054 - Post 4.13.0 updates
Updates the Zenodo DOI reference in the README.md to include 4.13.0.
#1057 - Fix plot_source clearwindow setting
The plot_source function was ignoring the clearwindow parameter (always using
True) in calls to plot_source for non-PHA data. This was only for
sherpa.astro.ui.plot_source (so sherpa.ui.plot_source did not have this problem).
#1058 - Store the opstr of model combinations (unary and binary)
Store the operator string as well as the operator when creating the unary and
binary operator expressions for models.
#1062 - Minor code cleanup of sherpa.astro.ui.utils
The sherpa.astro.ui.utils module has seen a number of minor clean-ups, addressing
pylint-reported issues.
#1067 - Improve testing of sherpa.astro.ui.utils
Improve coverage of the sherpa.astro.ui.utils and require pytest 3.9.0 or later
for testing Sherpa.
#1068 - clean up typos in sherpa/plot code
Fixed several typos noticed while reviewing plot related fix for #1057
#1072 - Update load_data to match load_pha for PHA2 data
Ensure that load_data behaves like load_pha when given a PHA2 dataset.
#1076 - sample_flux now uses the id argument
The sample_flux routine now uses the id argument rather than always using the
data from the default dataset. Fixes #752
#1078 - Add error checking for exceptional cases for sample_flux
Ensure that sample_flux errors out if the Xrays argument is False (as this code
path is currently broken) or if the confidence argument is invalid.
#1082 - Improve documentation for notice2d
Minor improvements to the documentation of notice2d and ignore2d set of commands.
Fixes #1059
#1086 - Use the logging infrastructure for sample_flux output
The screen output from sample_flux is now generated by the Sherpa logger and
so can be hidden by the user if required.
#1088 - Allow two optimization test to pass
Address an issue in the optimization tests that meant two tests were failing.
This only changes the test code and makes no change to the behavior of the
optimizers.
#1092- Numpy 1.20 warnings
Avoid test failures due to new warnings added by NumPy 1.20
#1094 - Cleanup multi-plot code
Rework the code that handles the plot_fit_xxx and plot_bkg_fit_xxx calls.
There should be no user-visible changes.
#1096 - Reduce direct access to plot objects
Changes to the internals of the plot code, to access information via methods
rather than direct access, which improves encapsulation and reduces code
repetition.
#1098 - Bump DS9 version to 8.2 for CI
Bump DS9 version used in CI tests from 8.1 to 8.2.
#1100 - Address reg_proj and reg_unc failures (fix #1093)
Calls to reg_proj and reg_unc could error out when the min or max arguments
were set to tuples rather than lists. The code now converts these attributes
to lists, which can result in changes to the string output of the objects (use
of '[]' brackets rather than '()'). Fixes #1093
#1101 - Address upper limit issues with sample_flux (fix #457)
sample_flux no-longer excludes samples at the parameter bounds (soft) when
calculating the flux distribution. This could lead to an over-estimation of
the flux for upper limits (Fix #457).
#1104 - Add basic documentation for the low-level optimization code
Add and update documentation on the interfaces used by the low-level
optimization code. Ensure that the plot classes are fully included in the
documentation.
#1105 - Consolidate and harmonize the validation of dataset identifiers
Simplify the code used to validate dataset identifiers. Several names can
no-longer be used as an identifier ('astrocompmodel', 'astrocompsource',
'astrodata', 'astromodel', 'astrosource', 'model_component', and
'source_component') and two can now be used ('energy' and 'photon').
#1108 - Read RMFs where N_CHAN is an array
Allow the pyfits backend to read a wider range of RMF files
#1111 - Minor test updates
Minor updates to the test code, including a small enhancement to the tests run by
the smoke_test command.
#1112: XSPEC: require model evaluation to be sent low and high grid values
XSPEC model classes must now be evaluated with bin edges - that is with
low,high bins. The support for sending in a single grid and treating it a
consecutive set of bins has been marked as deprecated from the model class
interface. This feature is still supported for anyone evaluating the models
directly from the sherpa.astro.xspec._xspec module or via the _calc method.
#1116: Add parameter-based tests for the PSF model
Adds several tests of edge-case handling of parameters for PSF convolution models.
#1117 - Docs: improve cache discussion and documentation
Improve the discussion of the cache support when evaluating models.
#1120 - Switch default branch to main
Change the default branch from master to main. Also includes minor documentation
updates (CONTRIBUTING.md updates to switch to main, to reference GitHub Actions
instead of Travis, and to remove a note about Python 3.5 support).
#1121- Hide AstroPy 4.2.1 FITS-related warnings
astropy.io.fits.open now creates warning messages about invalid FITS structures
when given a non-FITS file. This updated hides those warning messages since
routines such as sherpa.astro.io.load_data attempts to open files (including ascii
files) as FITS.
#1122 - Update ds9 download
Update DS9 tests to use ubuntu18 and darwinhighsierra as ubuntu14 and darwinsierra
are no longer supported. The DS9 version has been bumped from 8.2 to 8.2.1 as this
is the latest version.
#1125: Support Matplotlib 3.4
Matplotlib 3.4 changes how the drawstyle argument is handled in some functions.
This change removes the use of this argument for those functions.
#1126 - Tweak plot docs
Adds a new notebook that shows off a number of plots created with matplotlib and
exports the ScatterPlot, TracePlot, CDFPlot, PDFPlot, and LRHistogram classes from
sherpa.plot.
#1130: Fix save_data when the output file exists
Fix problems when save_data is used with clobber=False but the output file already
exists. Fixes #1071
#1132 - Update XQuartz for GH Actions workflow
Updates the xQuartz download location and version for the GitHub Actions Conda tests
#1139 - Fix typo in Zenodo test that made it fail
Fixed a typo in the zenodo test which gets only run via the --runzenodo flag
#1142 - Add instruction for source build on Mac
Add instruction for source building on Mac that were previously only part of the
internal release notes.
Sherpa 4.13.0
=============
This release of Sherpa coincides with the CIAO 4.13 release. The release contains a few minor documentation updates, a version number update to coincide with CIAO version 4.13.0, and infrastructure changes to migrate from Travis-CI to GitHub Actions for testing. No additional functionality has been introduced.
Details
-------
#1043 - RTD: install more packages via pip
Install sphinx-astropy and ipykernel via pip instead of Conda for the Read the Docs
builds to avoid current indirect requirement conflicts.
#1035 - Travis to GitHub Actions
Replaces the Travis test infrastructure with two GitHub Actions workflows.
#1036 - Cleaned up several typos in the RELEASE_NOTES file
Updates the RELEASE_NOTES file to correct several typos.
#1038 - Docs: note Python version and new build status
Updates the build status badge to track GitHub Actions rather than Travis-CI and
report the python versions as 3.6, 3.7, and 3.8.
Sherpa 4.12.2
=============
This release contains numerous enhancements and fixes and it is the first Sherpa release to fully support Python version 3.8.
The main areas with the enhancements include
* plotting improvements:
* improved support for matplotlib (linestyle changes in matplotlib 3.3, support of alpha channels)
* overplot support for plot_fit_* plt_bkg_fit_*
* updates to histograms, residual plots
* data I/O and data handling:
* several bug fixes to handling of the PHA, ARF, RMF files
* improvements to handling the PHA data filtering to address long-standing issues
* modeling:
* support for regrid models in the binary expressions
* improvements and bug fixes to background treatment in spectral models
* improvements in the flux calculations and resampling
* added the Voigt model
* documentation changes:
* improvements to Sherpa display in IPython/Jupyter notebooks
* updates to the content of the docstrings for generation of ahelp files python package.
Details
-------
Testing and infrastructure fixes are not shown.
#351 - fix handling of AREASCAL column in PHA files (fix #350)
Adds support for handling the AREASCAL value (either scalar of vector) for PHA
data sets. This array is used in XMM RGS data to handle missing chips.
#385 - Properly handle Swift RMF when using Astropy backend
Fixes an issue where some low lever xpa calls were returning byte strings rather
than strings in Python 3. This had particular impact on the image_getregion
function.
#483 - An initial release of simultaneous fit on multicores (slower for most…
Distributes the evaluations of the multiple independent data sets using the
multi-cores built-in the user's workstation. The current default setting for this
PR is to evaluate the multiple independent data sets sequentially since the
overhead for distributing the workload across multi-cores is high if the evaluation