# Miscentering Effects¶

If galaxy cluster centers are not properly identified on the sky, then quantities measured in annuli around that center will not match theoretical models. This effect is detailed in Johnston et al. (2007) and Yang et al. (2006).

To summarize, if a cluster center is incorrectly identified on the sky by a distance $$R_{\rm mis}$$ then the surface mass density becomes:

$\Sigma_{\rm mis}^{\rm single\ cluster}(R, R_{\rm mis}) = \int_0^{2\pi} \frac{{\rm d}\theta}{2\pi}\ \Sigma\left(\sqrt{R^2+R_{\rm mis}^2 + 2RR_{\rm mis}\cos\theta}\right).$

That is, the average surface mass density at distance $$R$$ away from the incorrect center is the average of the circle drawn around that incorrect center. To get the miscentered profiles of a single cluster you would use

from cluster_toolkit import miscentering
mass = 1e14 #Msun/h
conc = 5 #arbitrary
Omega_m = 0.3
#Calculate Rp and Sigma here, where Sigma is centered
Rmis = 0.25 #Mpc/h; typical value
Sigma_mis_single = miscentering.Sigma_mis_single_at_R(Rp, Rp, Sigma, mass, conc, Omega_m, Rmis)


As you can see Rp is passed in twice. It is first used as the location at which to evaluate Sigma_mis and then as the locations at which Sigma is known. So if you wanted those two radial arrays can be different.

The $$\Delta\Sigma$$ profile is defined the usual way

$\Delta\Sigma(R,R_{\rm mis}) = \bar{\Sigma}_{\rm mis}(<R,R_{\rm mis}) - \Sigma_{\rm mis}(R,R_{\rm mis})$

which can be calculated using this module using

DeltaSigma_mis_single = miscentering.DeltaSigma_mis_at_R(Rp, Rp, Sigma_mis_single)


## Stacked Miscentering¶

In a stack of clusters, the amount of miscentering will follow a distribution $$P(R'|R_{\rm mis})$$ given some characteristic miscentering length $$R_{\rm mis}$$. That is, some clusters will be miscentered more than others. Simet et al. (2017) for SDSS and Melchior et al. (2017) assume a Raleigh distribution for the amount of miscentering $$R'$$:

$P(R'|R_{\rm mis}) = \frac{R'}{R^2_{\rm mis}}\exp[-R'^2/2R_{\rm mis}^2]\,.$

In McClintock et al. (2019) we used a Gamma profile for the mistnering:

$P(R'|R_{\rm mis}) = \frac{R'}{R^2_{\rm mis}}\exp[-R'/R_{\rm mis}]\,.$

Both of these are available in the toolkit. We see that $$R_{\rm mis}$$ is a free parameter, giving rise to a miscentered projected stacked density profile:

$\Sigma_{\rm mis}^{\rm stack}(R) = \int_0^\infty{\rm d}R'\ P(R'|R_{\rm mis})\Sigma_{\rm mis}^{\rm single\ cluster}(R, R')$

which can then itself be integrated to get $$\Delta\Sigma_{\rm mis^{\rm stack}}$$. To calculate these in the code you would use:

from cluster_toolkit import miscentering
#Assume Sigma at R_perp are computed here
Sigma_mis = miscentering.Sigma_mis_at_R(R_perp, R_perp, Sigma, mass, concentration, Omega_m, R_mis)
DeltaSigma_mis = miscentering.DeltaSigma_mis_at_R(R_perp, R_perp, Sigma_mis)
{"ft_lang_label":"__label__en","ft_lang_prob":0.8272655,"math_prob":0.9972267,"size":2277,"snap":"2022-40-2023-06","text_gpt3_token_len":601,"char_repetition_ratio":0.1482622,"word_repetition_ratio":0.0,"special_character_ratio":0.24242425,"punctuation_ratio":0.12315271,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999833,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-27T14:26:27Z\",\"WARC-Record-ID\":\"<urn:uuid:d6a0313b-c779-4673-8f8e-b6944565879f>\",\"Content-Length\":\"17185\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9d4b453a-4f7e-43e0-a4db-b1d56653bd6f>\",\"WARC-Concurrent-To\":\"<urn:uuid:64813335-2943-451c-aa9b-80fbe6020054>\",\"WARC-IP-Address\":\"104.17.33.82\",\"WARC-Target-URI\":\"https://cluster-toolkit.readthedocs.io/en/latest/source/miscentering.html\",\"WARC-Payload-Digest\":\"sha1:2A7RCUM3OHMNGSUT7HEUN5U64FYFXYWY\",\"WARC-Block-Digest\":\"sha1:CXXOSXLX63INM4RA4TDN3ZRDVKJZUBJS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335034.61_warc_CC-MAIN-20220927131111-20220927161111-00783.warc.gz\"}"}