Open DavidT3 opened 4 weeks ago
Could Jeremy’s region definition program be adapted to Xmm?
Sent from my iPhone
On Oct 28, 2024, at 3:12 PM, David Turner @.***> wrote:
There is no branch yet, but I have started prototyping spectral property measurements in two spatial dimensions, which will be included in XGA to produce things like temperature, metallicity, and entropy maps.
Started off with simple square pixels, as considerably easier to mess around with than abstract polygons. The SAS selection language can easily be used for this.
I think in the final implementation, when there will probably be an option for square pixels, I may not generalise them to polygons, because I suspect that would be considerably slower than just using the box region.
When it gets to the property map classes though, they should be generalised as polygons.
My test case is Abell 3667, which has a very interesting thermal structure, and has had temperature maps measured before. I will include updates (and the prototyping notebook) in this issue when possible.
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/DavidT3/XGA/issues/1232__;!!HXCxUKc!wSSAeBecl6PTfkMKK7t1LocQdapyQGsBQs6mCr21E5bUr_n0MiUPruXjqdk7R3ps8pjQJUUCR3CIb2JUiU9tQ4d2YQ$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ASKK4PZME5FHLOMD4RLKMILZ5Z5ALAVCNFSM6AAAAABQYEAZK2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGYYTSMZRGM4TANI__;!!HXCxUKc!wSSAeBecl6PTfkMKK7t1LocQdapyQGsBQs6mCr21E5bUr_n0MiUPruXjqdk7R3ps8pjQJUUCR3CIb2JUiU_VzG_9Dg$. You are receiving this because you are subscribed to this thread.Message ID: @.***>
First pass didn't go well:
Was far too ambitious in terms of number of pixel regions - also the grid is meant to be evenly spaced in RA and DEC and for some reason there is overlap in DEC (significant) in the boxes specified as the 'pixels'. I almost certainly screwed up something wrt projection of a spherical coordinate system, because I always do.
I appear to have knitted a scarf
Not my greatest plot, but it is a start:
And one with coords:
So the prototype does function somewhat, not that I was expecting the spectrum generation and XSPEC fitting to be the hard parts here.
My main worry right now is the seemingly messed up spacing in RA:
(these are meant to be square)
Probably me screwing up some projection thing as I mentioned earlier - but does mean that in the RA direction this map's pixels overlap significantly, so that above image should not be trusted.
The other caveats of this prototype map is that I'm not sure the background is actually working for these fits, and I am not accounting for the PSF effects (i.e. cross-arf, that is gonna be a fun one for something like this).
I also reduced the detmap resolution used to weight ARFs to make it run faster, but I'm not feeling too bad for that, as the small region size of each spectrum likely means the ARF doesn't have much spatial variation anyway.
I also had the fear earlier that the sky coordinate systems for XMM detectors across different observations/instruments might not have the same rotation. So 'pixels' with coverage from multiple observations/instruments might not have spectra with the same region.
As another indication of the RA woes, here are some debug images for the spectra generated (for the same ObsID-inst in this case, for demonstrative purposes) - these images represent the exact spatial selection used for the spectra. When I set the cross-hairs for all of them to match the same RA-DEC coords, we can see that the dec binning is working perfectly:
But the RA alignment is way off:
In the RA direction each pixel will be overlapping by almost half...
But then an equally spaced grid overlaid by DS9 looks like this:
HOW DO RA-DEC MAPPING TO OTHER COORDINATE SYSTEMS ALWAYS MANAGE TO CONFUSE ME THIS MUCH?!
There is no branch yet, but I have started prototyping spectral property measurements in two spatial dimensions, which will be included in XGA to produce things like temperature, metallicity, and entropy maps.
Started off with simple square pixels, as considerably easier to mess around with than abstract polygons. The SAS selection language can easily be used for this.
I think in the final implementation, when there will probably be an option for square pixels, I may not generalise them to polygons, because I suspect that would be considerably slower than just using the box region.
When it gets to the property map classes though, they should be generalised as polygons.
My test case is Abell 3667, which has a very interesting thermal structure, and has had temperature maps measured before. I will include updates (and the prototyping notebook) in this issue when possible.