Skip to content

Commit 6c7a025

Browse files
thjsallmauviard
andauthored
Final updates - release v3.0.0 (#499)
* Version number update and some Changelog updates * Changelog updates completed * Fixed chi2 in residuals and Signal * Version number changed to 3.0.0 * All the tutorials rerun, except Global Surface Emission * Global Surface Emission rerun (with 1 code block commented out) * Changelog adjustments --------- Co-authored-by: lmauviard <lucien@mauviard.fr>
1 parent 6774015 commit 6c7a025

17 files changed

Lines changed: 737 additions & 735 deletions

CHANGELOG.rst

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,90 @@ and this project adheres to
3434
.. ^^^^^^^^^^^
3535
3636
37-
[v2.3.0-b] - 2024-12-06
38-
~~~~~~~~~~~~~~~~~~~~~~~~~
37+
[v3.0.0] - 2024-12-19
38+
~~~~~~~~~~~~~~~~~~~~~
3939

4040
Summary
4141
^^^^^^^
4242

43-
* Updates done during the 2024 hack week. Including making X-PSI Cython3 compatible.
43+
* This release upgrades X-PSI to be Cython3 compatible and provides many new features and examples, such as UltraNest sampling, Simulation-Based Inference, and reading data and instrument files that are in FITS format. A few deprecated features were also removed.
44+
45+
Fixed
46+
^^^^^
47+
48+
* Fixed Python3.12 related syntax warnings when installing X-PSI were fixed by adding 'r' in front of strings that contain a backslash.
49+
50+
* The default value for ``image_order_limit`` in the module generator was set to match what is said in the docstring (i.e. the default being ``None``).
51+
52+
Added
53+
^^^^^
54+
55+
* Added UltraNest as an example to the modelling tutorial and installation instructions.
56+
57+
* Added some docstrings to ``mesh_tools.pyx`` and ``effective_gravity_universal.pyx``.
58+
59+
* Added new optional plots for clustering of residuals.
60+
61+
* Added the possibility to print a user-defined credible level.
62+
63+
* Data (event list or spectrum) and responses (RMF, ARF, RSP) can now be loaded from FITS files.
64+
65+
* Added Simulation-Based Inference examples in the documentation, and wrapper class in the utilities.
66+
67+
* Added a new option ``star_shape`` for the Spacetime class to allow pulse calculation and inference with a spherical star (instead of an oblate spheroid).
68+
69+
* Added background, convergence, and "P-P" plots in the Post-processing tutorial.
70+
71+
* Multi-mode plotting was made possible in the corner plots (different modes from a MultiNest run done with ``multimodal=True`` can be now plotted separately).
72+
73+
* Added bolometric pulse and blurring of the residuals options in ``xpsi/PostProcessing/_residual.py``.
74+
75+
* Added a possibility to use a parameter vector instead of a random set of samples in all post-processing functions.
76+
77+
* Added a chi-squared calculation property to the Signal class.
78+
79+
Changed
80+
^^^^^^^
81+
82+
* X-PSI was upgraded to support Cython3 by updating the syntax and the structure of all the Cython files. Installation instructions were also updated. Using Cython3 is now recommended. The code seems to still run also with Cython version 0.29, but its functioning correctly and efficiently is not guaranteed.
83+
84+
* Residual plotting was updated to fix issues when using a logarithmic scale and including channel 0.
85+
86+
* Updated the installation instructions for Helios and Snellius, and updated the example job script.
87+
88+
* The desired precision of credible intervals can now be defined already when loading the runs.
89+
90+
* The Photosphere class atmosphere setter can now load by default atmosphere table files similar to those of NSX model used in NICER analyses (without the need for writing a CustomPhotosphere for this).
91+
92+
* Future plans, publications, etc. were updated in the documentation.
93+
94+
* The counts are **not divided by 2 anymore** for signal plots when 2 cycles are shown. The label was changed to "counts per cycle" to denote this change.
95+
96+
Removed
97+
^^^^^^^
98+
99+
* X-PSI Python 2 documentation (v1.x and earlier) was retired from the main online documentation (but can still be accessed via GitHub).
100+
101+
* Removed the deprecated ``is_secondary`` argument from the HotRegion class. **Note that setting ``is_secondary=True`` has now no effect, and will lead to wrong likelihood values if not replacing it with ``is_antiphased=True``**.
102+
103+
* Removed the ``TwoHotRegions`` class that nobody was known to be using.
44104

45105
Attribution
46106
^^^^^^^^^^^
47107

48-
X-PSI team
108+
Devarshi Choudhury,
109+
Bas Dorsman,
110+
Denis Gonzalez-Caniulef,
111+
Sebastien Guillot,
112+
Mariska Hoogkamer,
113+
Daniela Huppenkothen,
114+
Christine Kazantsev,
115+
Yves Kini,
116+
Lucien Mauviard-Haag,
117+
Evert Rol,
118+
Tuomo Salmi,
119+
Pierre Stammler,
120+
Anna Watts
49121

50122

51123
[v2.2.7] - 2024-07-13

docs/source/Emitting_patterns_2Dprojection.ipynb

Lines changed: 116 additions & 187 deletions
Large diffs are not rendered by default.

docs/source/Global_surface_emission.ipynb

Lines changed: 123 additions & 161 deletions
Large diffs are not rendered by default.

docs/source/Hot_region_complexity.ipynb

Lines changed: 66 additions & 103 deletions
Large diffs are not rendered by default.

docs/source/Importance_sampling.ipynb

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"/=============================================\\\n",
6161
"| X-PSI: X-ray Pulse Simulation and Inference |\n",
6262
"|---------------------------------------------|\n",
63-
"| Version: 2.3.0-b |\n",
63+
"| Version: 3.0.0 |\n",
6464
"|---------------------------------------------|\n",
6565
"| https://xpsi-group.github.io/xpsi |\n",
6666
"\\=============================================/\n",
@@ -164,7 +164,7 @@
164164
"\n",
165165
"# Commenting this as it takes a bit of time to run\n",
166166
"######################\n",
167-
"#importance(new_model.likelihood,\n",
167+
"# importance(new_model.likelihood,\n",
168168
"# old_model.likelihood,\n",
169169
"# '../../examples/examples_fast/Outputs/ST_live_1000_eff_0.3_seed42',\n",
170170
"# names = names,\n",
@@ -747,7 +747,7 @@
747747
"/=============================================\\\n",
748748
"| X-PSI: X-ray Pulse Simulation and Inference |\n",
749749
"|---------------------------------------------|\n",
750-
"| Version: 2.3.0-b |\n",
750+
"| Version: 3.0.0 |\n",
751751
"|---------------------------------------------|\n",
752752
"| https://xpsi-group.github.io/xpsi |\n",
753753
"\\=============================================/\n",
@@ -876,11 +876,16 @@
876876
"source": [
877877
"This will create exactly the same importance sampled output file as the prior-change example above."
878878
]
879+
},
880+
{
881+
"cell_type": "markdown",
882+
"metadata": {},
883+
"source": []
879884
}
880885
],
881886
"metadata": {
882887
"kernelspec": {
883-
"display_name": "Python 3 (ipykernel)",
888+
"display_name": "xpsi",
884889
"language": "python",
885890
"name": "python3"
886891
},
@@ -894,7 +899,7 @@
894899
"name": "python",
895900
"nbconvert_exporter": "python",
896901
"pygments_lexer": "ipython3",
897-
"version": "3.12.2"
902+
"version": "3.12.8"
898903
}
899904
},
900905
"nbformat": 4,

docs/source/Instrument_synergy.ipynb

Lines changed: 15 additions & 15 deletions
Large diffs are not rendered by default.

docs/source/Modeling.ipynb

Lines changed: 98 additions & 99 deletions
Large diffs are not rendered by default.

docs/source/Modeling_without_statistics.ipynb

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,14 @@
2626
"/=============================================\\\n",
2727
"| X-PSI: X-ray Pulse Simulation and Inference |\n",
2828
"|---------------------------------------------|\n",
29-
"| Version: 2.3.0-b |\n",
29+
"| Version: 3.0.0 |\n",
3030
"|---------------------------------------------|\n",
3131
"| https://xpsi-group.github.io/xpsi |\n",
3232
"\\=============================================/\n",
3333
"\n",
34-
"Check your emcee installation.\n",
35-
"Check your installation of emcee if using the EnsembleSampler\n",
34+
"Imported emcee version: 3.1.6\n",
3635
"Imported PyMultiNest.\n",
37-
"Check your UltraNest installation.\n",
38-
"Check your installation of UltraNest if using the UltranestSampler\n",
39-
"Warning: Cannot import torch and test SBI_wrapper.\n",
36+
"Imported UltraNest.\n",
4037
"Imported GetDist version: 1.5.3\n",
4138
"Imported nestcheck version: 0.2.1\n"
4239
]
@@ -1776,7 +1773,15 @@
17761773
"cell_type": "code",
17771774
"execution_count": 48,
17781775
"metadata": {},
1779-
"outputs": [],
1776+
"outputs": [
1777+
{
1778+
"name": "stdout",
1779+
"output_type": "stream",
1780+
"text": [
1781+
"mkdir: cannot create directory ‘images/frames_twospots’: File exists\r\n"
1782+
]
1783+
}
1784+
],
17801785
"source": [
17811786
"!mkdir images/frames_twospots\n",
17821787
"!mv images/*.png images/frames_twospots/."

docs/source/Polarization.ipynb

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,15 @@
5151
"/=============================================\\\n",
5252
"| X-PSI: X-ray Pulse Simulation and Inference |\n",
5353
"|---------------------------------------------|\n",
54-
"| Version: 2.2.7 |\n",
54+
"| Version: 3.0.0 |\n",
5555
"|---------------------------------------------|\n",
5656
"| https://xpsi-group.github.io/xpsi |\n",
5757
"\\=============================================/\n",
5858
"\n",
5959
"Imported emcee version: 3.1.6\n",
60-
"Check your PyMultiNest installation.\n",
61-
"Check your installation of PyMultiNest if using the NestedSampler\n",
62-
"Check your UltraNest installation.\n",
63-
"Check your installation of UltraNest if using the UltranestSampler\n",
64-
"Imported GetDist version: 1.5.2\n",
60+
"Imported PyMultiNest.\n",
61+
"Imported UltraNest.\n",
62+
"Imported GetDist version: 1.5.3\n",
6563
"Imported nestcheck version: 0.2.1\n",
6664
"Creating parameter:\n",
6765
" > Named \"frequency\" with fixed value 6.000e+02.\n",
@@ -406,7 +404,7 @@
406404
"name": "stdout",
407405
"output_type": "stream",
408406
"text": [
409-
"Time spent in integration (unpolarized): 3.311354875564575\n"
407+
"Time spent in integration (unpolarized): 3.8012921810150146\n"
410408
]
411409
},
412410
{
@@ -541,13 +539,6 @@
541539
"plot_QUplane()"
542540
]
543541
},
544-
{
545-
"cell_type": "code",
546-
"execution_count": null,
547-
"metadata": {},
548-
"outputs": [],
549-
"source": []
550-
},
551542
{
552543
"cell_type": "markdown",
553544
"metadata": {},
@@ -575,13 +566,6 @@
575566
"source": [
576567
"Modeling X-ray polarized data using Bayesian inference is not yet part of this tutorial. However, a preliminary example of a such procedure can be found in this example script: [TestRun_PolNum_split_inference.py](https://github.com/xpsi-group/xpsi/blob/main/examples/examples_modeling_tutorial/TestRun_PolNum_split_inference.py)."
577568
]
578-
},
579-
{
580-
"cell_type": "code",
581-
"execution_count": null,
582-
"metadata": {},
583-
"outputs": [],
584-
"source": []
585569
}
586570
],
587571
"metadata": {

docs/source/Post-processing.ipynb

Lines changed: 149 additions & 48 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)