Synchronous-to-Newtonian transformation with positive spatial perturbations (source code)

= Synchronous-to-Newtonian transformation with positive spatial perturbations
{title2=$\Phi=-\mathcal HT-T',\quad\Psi=(h-h_S)/6+\mathcal HT$}

Define $\delta g_{ij}=a^2h_{ij}$ and $h_{ij}=h\delta_{ij}/3+(\hat k_i\hat k_j-\delta_{ij}/3)h_S$. Under the passive coordinate shift $\tilde\tau=\tau+T e^{i\mathbf k\cdot\mathbf x}$ and $\tilde x^i=x^i+i\hat k^iL e^{i\mathbf k\cdot\mathbf x}$, removing the traceless spatial perturbation gives $L=h_S/(2k)$. Removing the mixed time-space metric gives $T=L'/k=h_S'/(2k^2)$. The remaining diagonal metric components are the displayed Newtonian potentials. This sign convention is opposite to defining the synchronous perturbation by $g_{ij}=-a^2(\delta_{ij}+h_{ij})$.