Inclusion of an overhauled version of the first PyXspec walkthrough notebook #260
Inclusion of an overhauled version of the first PyXspec walkthrough notebook #260DavidT3 wants to merge 56 commits into
Conversation
…long with an index file
…o the HEASARC-tutorials resource. Content is essentially identical to the original in this first pass, and as such will not execute (data files are missing, etc.). Some changes to imports and line lengths have had to be made however, just to pass the precommit checks. For issue #251
…e required spectrum and response file. Uses the S3 https link, and a built-in Python library. For issue #251
…removed the use of jupyter cell magic to change directories for the spectrum loading (we use contextlib instead now). For issue #251
…used in a more 'correct' (for want of a better word) way now. For issue #251
…matting of its tick labels.
…y as 'model_one' in the long term though.
…elta chi-squared 'residuals'. For issue #251
…dness of fit test simulations. Rather than extracting plotting values from PyXspec Plot, we fetch the actual chi-squared distribution array and make our own histogram. For issue #251
…ics.md notebook. For issue #251
…ms of making the legend nicer/clearer. For issue #251
…etic purposes. Couple of small typo fixes.
…otted as different lines, with a 'total' output being the combined model. Should ask if there is a dynamic way to retrieve only additive model components from PyXspec, for fully automatic plotting like this. For issue #251
…ow to calculate delta-chi-square values for specific confidence percentages (1, 2, and 3 sigma in this instance). For issue #251
…ontour level mistype and to show the user how to calculate delta-chi-square values for particular probabilities. Next big step is to go through and make plotting data safer by storing it in differently named variables. For issue #251
… commented out legacy plotting code. For issue #251
…some commentary and added more for context. Also stored the retrieved plotting data in a dictionary rather than in variables that are in danger of being re-used. For issue #251
…ndexing the return...
…a stepped model line in the renormalized model plot. For issue #251
…on to plot spectrum, model, and residuals. That happens a few times in this notebook so we might as well avoid repeating code. For issue #251
…alization, makes more sense to me in that order.
…ative variable names even if we never user them.
…subsection names to the alternative model testing section - makes it much easier to navigate the different models.
…an just the theoretical models. Also tried collapsing the cell output of the steppar call, as it gets so long. For issue #251
… avoid steppar outputs appearing in the next cell's outputs when running all - I NEED TO TELL CRAIG ABOUT THAT. For issue #251
|
Happily it executed fine - time for polishing. I've added the 'skip-doc-build' label to disable triggering automatic rebuilds on any commits I make until the badge is removed. The free resources we get from CircleCI are limited, so we try to be as efficient as possible. |
… pyxspec-basics. For issue #251
…xample dataset a hyperlink rather than just a URL.
… in subsubsections now, which I hope will be a little easier to parse. Also shifted some of that commentary to the goodness of fit section, and also altered that section's title. Finally, added a link in the additional resources section that goes to the general page where the parallel settings are defined in a docstring. For issue #251 and PR #260
… so PyCharm's grammar checker will stop passive-aggressively highlighting them. For PR #260
|
@xspector @krutkow @c181gordon I've added you all as potential reviewers - the notebook as it stands is pretty complete, though I admit that I now have XSPEC/notebook fatigue and it might still need some more attention particularly towards the end. Something I wanted to talk about is the multi-additive-component model demonstration in this notebook; the column density currently used for the fixed nH is quite a bit larger than the current HI4PI value from nH, which sort of undermines the point being made about how the absorbed powerlaw is under predicting soft counts (particularly because the two-additive-component fit doesn't look like much of a better fit). Clearly the tutorial needs a demonstration of a two continuum component fit, but any thoughts on what we should do about that? |
…-basics.md, while also fixing a bug that would have resulted in the wrong label being applied to a smooth model line. For PR #260
… function defined in pyxspec-basics.md. Also made sure that the non-staircase model line plotter had the same linewidth as the staircase plotter.

The first step in making the PyXspec tutorials and demonstrations available through HEASARC-tutorials (and thus on Fornax as well), a revamped version of the first PyXspec walkthrough notebook.
The overall content currently remains the same, no major sections have been added or removed (though we might consider some changes on that front).
All plotting code has been altered.
Some previous bugs have been fixed (the contour plot had mislabeled axes, and wasn't showing the 1, 2, and 3 sigma levels that was claimed in the commentary).
More commentary has been added at certain points.
The notebook has been put into the markdown format required by HEASARC-tutorials, and now matches the template in style. Sections and subsections have been introduced.
Science review checklist
Formatting checklist
Tech review checklist
try/exceptstatements that are narrow in scope?