Hastings ratio for ensemble samplers This question is about the "stretch move" affine-invariant ensemble sampler  (Goodman & Weare, 2010), in particular the value of the conditional probability for the proposal.
The aim of the algorithm is producing a sample with p.d.f $\;p(x)\propto f(x)$
, with $f(x)$ given.
Summing up briefly, the algorithm starts with a set of points $\Omega = \{X_i\}_{i=1}^{L}$ with $X_i \in \mathbb{R}^n$. Then for each point $X_k$:

*picks a random point $X_j$ from $\Omega -\{X_k\}$

*generates a random number $Z$ with
$$p(Z)dz \propto (Z)^{-1/2}\;,\;\;Z \in [1/a,a]$$
where $a$ is an hyperparameter greater than one

*proposes
$$Y=X_j+Z(X_k−X_j)$$
as the new value for $X_k$
At this point it is necessary to compute the ratio of the conditional probabilities
$$r=\frac{P(X_k|Y)}{P(Y|X_k)}$$
since the acceptance probability that ensures detailed balance is respected is $α=1 \wedge rf(Y)/f(X_k)$
The article states that (this part is unclear to me):
$$P(X_k|Y) \propto ||Y−X_j||^{n−1}$$
$$P(Y|X_k) \propto ||X_k−X_j||^{n−1}$$
so that $r=Z^{n−1}$
How can this calculation be carried out?

To simplify the algorithm, consider the case when a fixed point $\xi\in\mathbb R^n$ is used as a pivot and the proposal is
$$Y_t=\xi+Z_t(X_t-\xi)\qquad Z_t\sim p(z)\propto 1/\sqrt{z}\quad z\in(a^{-1},a)$$
To simplify even further, we can consider $\xi=0$. This means that the proposal is changing the radius of $X_t$ by a factor $z$, while the angle of $X_t$ does not change. Using polar coordinates, rather than Euclidean ones, the density of $X_t$ writes as
$$\underbrace{\|x\|^{n-1} j(x/\|x\|)}_\text{Jacobian}\,\times\,f(x)$$
Therefore the density of the radius $\varrho(x)$ of $x$ conditional on the angles $\theta$ of $x$ (corresponding to the unit vector $x\|x\|$) is proportional to
$$\varrho(x)^{n-1} f(\varrho(x) x/\|x\|)$$
The Metropolis-Hastings acceptance probability is thus
$$1\wedge\dfrac{\varrho(y)^{n-1} f(\varrho(y) x/\|x\|)}{\varrho(x)^{n-1} f(\varrho(x) x/\|x\|)}\times\underbrace{\dfrac{p(\varrho(x))}{p(\varrho(y))}}_{=1}$$
equal to
$$1\wedge\dfrac{\|y\|^{n-1} f(y)}{\|x\|^{n-1} f(x)}$$
