mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-23 03:18:03 +00:00
224 lines
425 KiB
Text
224 lines
425 KiB
Text
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Tests of velocities of haloes in CSiBORG"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import numpy as np\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"import csiborgtools\n",
|
||
|
"\n",
|
||
|
"%matplotlib inline\n",
|
||
|
"%load_ext autoreload\n",
|
||
|
"%autoreload 2"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## FoF vs SPH velocity"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"kind = \"main\"\n",
|
||
|
"nsnap = 99\n",
|
||
|
"nsim = 17417\n",
|
||
|
"\n",
|
||
|
"field_reader = csiborgtools.read.CSiBORG2Field(nsim, kind)\n",
|
||
|
"catalogue = csiborgtools.read.CSiBORG2Catalogue(nsim, nsnap, kind)\n",
|
||
|
"boxsize = csiborgtools.simname2boxsize(\"csiborg2_main\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"velocity_field = field_reader.velocity_field(\"SPH\", 1024)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"pos = catalogue[\"cartesian_pos\"] / boxsize\n",
|
||
|
"vel = catalogue[\"cartesian_vel\"]\n",
|
||
|
"mass = catalogue[\"totmass\"]\n",
|
||
|
"\n",
|
||
|
"spherical_pos = catalogue[\"spherical_pos\"]\n",
|
||
|
"RA = np.deg2rad(spherical_pos[:, 1])\n",
|
||
|
"dec = np.deg2rad(spherical_pos[:, 2])\n",
|
||
|
"\n",
|
||
|
"def project_radial(vx, vy, vz, RA, dec):\n",
|
||
|
" vr = vx * np.cos(dec) * np.cos(RA) + vy * np.cos(dec) * np.sin(RA) + vz * np.sin(dec)\n",
|
||
|
" return vr"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 36,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"vx, vy, vz = csiborgtools.field.evaluate_cartesian_cic(velocity_field[0], velocity_field[1], velocity_field[2], pos=pos)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 43,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABdEAAAGGCAYAAACUkchWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeZxP1f/A8de597PMvmEwdhUhtEuLhCxt2n9KKyVCiUpalDZRKUpJfYUirVQqElkqJCUhsu9jxuzLZ733/P64M5+ZO5+xG2M5z8djfr+Z8zn3fu7n+nbu/bzvOe+3kFJKFEVRFEVRFEVRFEVRFEVRFEUJo1X2ASiKoiiKoiiKoiiKoiiKoijK8UoF0RVFURRFURRFURRFURRFURRlH1QQXVEURVEURVEURVEURVEURVH2QQXRFUVRFEVRFEVRFEVRFEVRFGUfVBBdURRFURRFURRFURRFURRFUfZBBd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PWStgVEUesKIoinLETBNuuslahfTgg4cdTF82q+i7fdE1wDRMNF1jxbxVhxVEP1gqJ7qiKMoh6MZampNBMCLKSufiUM8iFUVRjrnq1eG66yr7KBRFUZTD8dtvMHq09fv48VY+3H1QCVoURVFOIqNGwYwZ8Oij1urSo+hYZPRSQXRFUZSDdLrM4i7WALDq9v4HzNu18e8tePI9x+LQFEVRTn7vvgtffFHZR6EoiqIcCa+X4F33WMv577kHOncGICM1m9Rte21dfYW+g1q5qCiKohzftq5PpfDnhTBkiNU
|
||
|
"text/plain": [
|
||
|
"<Figure size 1500x400 with 4 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fig, axs = plt.subplots(1, 4, figsize=(15, 4))\n",
|
||
|
"\n",
|
||
|
"axs[0].hexbin(vel[:, 0], vx, gridsize=50, bins=\"log\", mincnt=1)\n",
|
||
|
"axs[0].set_xlabel(r\"FoF $v_x$\")\n",
|
||
|
"axs[0].set_ylabel(r\"SPH $v_x$\")\n",
|
||
|
"\n",
|
||
|
"axs[1].hexbin(vel[:, 1], vy, gridsize=50, bins=\"log\", mincnt=1)\n",
|
||
|
"axs[1].set_xlabel(r\"FoF $v_y$\")\n",
|
||
|
"axs[1].set_ylabel(r\"SPH $v_y$\")\n",
|
||
|
"\n",
|
||
|
"axs[2].hexbin(vel[:, 2], vz, gridsize=50, bins=\"log\", mincnt=1)\n",
|
||
|
"axs[2].set_xlabel(r\"FoF $v_z$\")\n",
|
||
|
"axs[2].set_ylabel(r\"SPH $v_z$\")\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"vr_fof = project_radial(vel[:, 0], vel[:, 1], vel[:, 2], RA, dec)\n",
|
||
|
"vr_sph = project_radial(vx, vy, vz, RA, dec)\n",
|
||
|
"axs[3].hexbin(vr_fof, vr_sph, gridsize=50, bins=\"log\", mincnt=1)\n",
|
||
|
"axs[3].set_xlabel(r\"FoF $v_r$\")\n",
|
||
|
"axs[3].set_ylabel(r\"SPH $v_r$\")\n",
|
||
|
"\n",
|
||
|
"for i in range(4):\n",
|
||
|
" axs[i].axline([0, 0], [1, 1], color=\"red\", ls=\"--\")\n",
|
||
|
"\n",
|
||
|
"fig.tight_layout()\n",
|
||
|
"fig.savefig(\"../plots/velocity_comparison.png\")\n",
|
||
|
"fig.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Correlation between the peculiar velocity and total mass"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 27,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"SignificanceResult(statistic=-0.011239061725954754, pvalue=1.637324987020833e-17)\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"from scipy.stats import spearmanr\n",
|
||
|
"\n",
|
||
|
"kind = \"main\"\n",
|
||
|
"nsnap = 99\n",
|
||
|
"nsim = 17417\n",
|
||
|
"\n",
|
||
|
"catalogue = csiborgtools.read.CSiBORG2Catalogue(nsim, nsnap, kind)\n",
|
||
|
"\n",
|
||
|
"vel = catalogue[\"cartesian_vel\"]\n",
|
||
|
"mass = catalogue[\"totmass\"]\n",
|
||
|
"velmag = np.linalg.norm(vel, axis=1)\n",
|
||
|
"\n",
|
||
|
"print(spearmanr(mass, velmag))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 28,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkoAAAG0CAYAAADNUwhtAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9t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Q6iqSqNuddHpddnKqYqCqjimsamKkuVnFbLJdFOyOe5+iAqNYc/yA9RoWYXiFYv+q7UEAoFAIMgLhcqjpKoqY8aMYfHixWzatInSpUvb7a9bty4Gg4GNGzfatp09e5Zr167RuHFjABo3bszx48e5ffu2TWb9+vV4enpSpUoVm0zWNTJkMtZ43Fn16waeKjWS93t/xQd9vuapUiNZOW19trKlqpYA0Ga7SYAErh4u+Bf1tZNRVdU2/02SJFzcnQko5pcn/eIi4/ni6Uk8WXIE34+YxrDKr/B2p0+4duZmntYTCAQCgSCvFKqqt1GjRjF37lyWLl1KxYoVbdu9vLxsnp6RI0eyatUqZs6ciaenJy+99BIAu3btArT2ALVq1aJIkSJ89dVXhIWF8fTTT/Pcc8/x2WefAVp7gGrVqjF69GiGDRvGpk2bGDt2LCtXrqRjx4731LOgqt7yi+4eg0lNsk+4dnI1siJxTrbyF49eYfEPK7lw5AqdhrWhw5BWuHrYe94uH7/KPz+s4tzBi3Qe1pYOQx1lcsuG2dv48pkf7bbJskT/13rw3BeD87SmQCAQCAR5eX4XqtDblClTAGjVqpXd9t9//52hQ4cC8N133yHLMn379iUtLY2OHTsyefJkm6xOp2PFihWMHDmSxo0b4+bmxpAhQ/joo8xhraVLl2blypWMGzeOH374gWLFijF9+vRcGUkPA0VR2L/mCGGXb9N
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"mask = mass > 1e12\n",
|
||
|
"plt.figure()\n",
|
||
|
"plt.hexbin(np.log10(mass), velmag, mincnt=1, bins=\"log\")\n",
|
||
|
"\n",
|
||
|
"plt.xlabel(r\"$\\log M_{\\rm FoF} ~ [M_\\odot / h]$\")\n",
|
||
|
"plt.ylabel(r\"$|\\mathbf{V}| ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
||
|
"\n",
|
||
|
"plt.savefig(\"../plots/velocity_mass.png\", dpi=300, bbox_inches=\"tight\")\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "venv_csiborg",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.11.7"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|