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
29 stars 3 forks source link

Overdensity radius measurement system (a la hydrostatic mass profile method) for the gas mass profiles #1137

Open DavidT3 opened 4 months ago

DavidT3 commented 4 months ago

Megan had the great thought that we should make $R_{\Delta}$ measurements for LoVoCCS with gas mass.

A new feature can be added to the gas mass profile class which works in exactly the same way as the HydrostaticMass profile overdensity radius measurement method (stepping along the profile and finding the inversion point of the difference between target overdensity and profile overdensity, then refining), but allowing the user to pass an assumed gas-to-total-mass fraction which we'll just multiply the gas mass profile by.

DavidT3 commented 3 months ago

I have started on this now - first step was essentially just copying the overdensity_radius method of HydrostaticMass profile. This measures a set of masses within user-specified radius brackets, in steps of radius also specified by the user - then it identifies the broad radius bin where the difference of average density from the mass profile to the critical density at the specified redshift in the specified cosmology flips sign. Then a more refined grid in 1kpc steps is used to find the closest radius.

Then swapping out the hydrostatic masses for gas masses, and scaling to a total mass using an input baryon fraction - and bam it is essentially the same process

My main current annoyance is that (actually like the hydrostatic mass version of this method) I haven't really thought how to implement uncertainties - I have a horrible feeling its going to involve a LOT of integrations, which would be slow.

Unfortunately on that note I'm starting to consider a pipeline using this feature, much like the XGA luminosity-temperature-radius pipeline, that works iteratively to converge on the targeted overdensity radius.

DavidT3 commented 3 months ago

Looking at a few of the radii coming out, they are making some sort of sense, so that's good

DavidT3 commented 3 months ago

The first-pass-pipeline (say that five times fast) ran through okay, handling some sources dropping out and producing sensible-ish looking radii:

{'LoVoCCS-4B': [1000.0], 'LoVoCCS-5': [1000.0, 1031.5, 1000.5, 1030.5, 1000.5], 'LoVoCCS-7': [1000.0, 1222.5, 1157.5000000000002, 1175.5, 1166.5], 'LoVoCCS-9': [1000.0, 1606.5], 'LoVoCCS-10': [1000.0, 1073.5000000000002, 1044.5, 1052.5, 1051.5000000000002], 'LoVoCCS-13': [1000.0, 917.5, 944.5000000000001, 933.5, 938.5], 'LoVoCCS-15': [1000.0, 697.4999999999999, 755.5000000000002, 748.5000000000001, 750.5], 'LoVoCCS-18': [1000.0, 1057.5, 1057.5, 1057.5, 1057.5], 'LoVoCCS-22': [1000.0, 1050.5, 1000.5, 1048.5, 1000.5], 'LoVoCCS-24': [1000.0, 1141.5, 1088.5, 1112.5, 1102.5]}

I note some ping-pong behaviour between values for a couple of them, so I'll try to look into that a bit more - and I'll be interested to see what happens if I choose a smaller starting aperture.

The whole pipeline needs to be polished up a bit, which will include making the returns dataframes, and allowing them to be saved to disk, but this is a good start. I also don't know what will happen currently with clusters that have radii that converged earlier than others (XGA doesn't necessarily seem to be good at retrieving density profiles that it has already made) - so I'll look into that.