domeckert / pyproffit

Pyproffit is a Python code for the analysis of X-ray brightness profiles from clusters of galaxies
GNU General Public License v3.0
18 stars 4 forks source link

SB profile extraction over a mosaic with data gaps #20

Closed KovacsOrsi closed 2 years ago

KovacsOrsi commented 2 years ago

I extract the surface brightness profile over a large mosaic image, which exhibits some data gap. I input a background map too (Chandra's stowed background), and its profile displays an unusual bump at a radial range where I have no full data coverage. Is this related to the the exposure/area normalization?

domeckert commented 2 years ago

Thanks for reporting this issue @KovacsOrsi .

I indeed think that the spike you are seeing comes from regions of very low exposure. One quick way of checking it is to set a low threshold on the exposure, and ignore the pixels that have a very low effective exposure. The exposure map can be accessed as the "exposure" attribute of the Data class. You can modify it in the following way:

expo = np.copy(dat.exposure) # get the exposure map maxexp =np.max(expo) # compute the maximum exposure lowexp = np.where(expo < 0.1 * maxexp) # here we cut out regions where the exposure is less than 10% of the maximum, you can adjust that expo[lowexp] = 0.0 # regions with 0 exposure are ignored dat.exposure = expo # replace the exposure map in the Data object

It may be worth adding an option to set automatically an exposure threshold in the surface brightness extraction, I'll consider that

domeckert commented 2 years ago

Added parameter "minexp" to the surface brightness profile extraction code, which is set to 0.05 by default.

See the following commit: https://github.com/domeckert/pyproffit/commit/e8dc03953c267cab98413c650b35cf08a2452dc7

Closing