DavidT3 / XGA

X-ray: Generate and Analyse is a module designed to make the analysis of XMM observations simple and efficient. It provides an interface with SAS for the creation of XMM data products, as well as a way to easily perform fits (scalable for multiple observations) and retrieve information about an object, all within a Python package.
BSD 3-Clause "New" or "Revised" License
30 stars 3 forks source link

Include interpolation method in BaseProfile1D #1168

Open DavidT3 opened 3 months ago

DavidT3 commented 3 months ago

Currently implementing some interpolation functionality in the SpecificEntropy class (in order to calculate entropy; issue #1167), and I suspect it should just be included in the BaseProfile1D method at some point - that would make it more accessible to the user in case they wish to see what the interpolation is actually doing - it could be quite important and things like cubic splines can misbehave with large uncertainties:

image

image

DavidT3 commented 3 months ago

The linear/piecewise interpolation of scipy interp1d would seem to perform a bit better (by eye) for a projected temperature profile:

image

On the outskirts particularly, even though this is with extrapolation turned on.