Load data
In this notebook, I'll show how to load cluster data using the XCOP-standard reduced data. This means data are reduced in the 0.7-1.2 keV band with a procedure detailed in Ghirardini & al. 2019 and Ettori & al. 2019. This is done using the Cluster
class. First, we must define the path to the data.
In [1]:
Copied!
import astropy.units as u
from xsb_fluc.data.cluster import Cluster
cluster = Cluster(
imglink='data/A2142/mosaic_a2142.fits.gz',
explink='data/A2142/mosaic_a2142_expo.fits.gz',
bkglink='data/A2142/mosaic_a2142_bkg.fits.gz',
reglink='data/A2142/src_ps.reg',
nhlink='data/A2142/A2142_nh.fits',
ra=239.58615,
dec=27.229433,
r_500=1.403*u.Mpc,
redshift=0.09,
)
import astropy.units as u
from xsb_fluc.data.cluster import Cluster
cluster = Cluster(
imglink='data/A2142/mosaic_a2142.fits.gz',
explink='data/A2142/mosaic_a2142_expo.fits.gz',
bkglink='data/A2142/mosaic_a2142_bkg.fits.gz',
reglink='data/A2142/src_ps.reg',
nhlink='data/A2142/A2142_nh.fits',
ra=239.58615,
dec=27.229433,
r_500=1.403*u.Mpc,
redshift=0.09,
)
WARNING: FITSFixedWarning: RADECSYS= 'FK5 ' / Stellar reference frame the RADECSYS keyword is deprecated, use RADESYSa. [astropy.wcs.wcs] WARNING: FITSFixedWarning: EQUINOX = '2000.0 ' / Coordinate system equinox a floating-point value was expected. [astropy.wcs.wcs]
Let's plot it !
In [2]:
Copied!
cluster.plot_cluster()
cluster.plot_cluster()
I implemented convenience functions to reduce the size of the images to a given fraction of $R_{500}$ using only the center and size supplied when creating the Cluster
.
In [3]:
Copied!
cluster.reduce_to_r500(r500_cut=1).plot_cluster()
cluster.reduce_to_r500(r500_cut=1).plot_cluster()
There are also convenience functions to rebin with a given factor. It can be chained with other functions on clusters. Here I rebin with a factor of 8 so that each new pixel is defined with a square of 8 smaller pixels.
In [4]:
Copied!
cluster.reduce_to_r500(r500_cut=1).rebin(8).plot_cluster()
cluster.reduce_to_r500(r500_cut=1).rebin(8).plot_cluster()