2024-09-11 06:45:42 +00:00
{
"cells": [
{
"cell_type": "code",
2024-09-12 15:04:25 +00:00
"execution_count": 4,
2024-09-11 06:45:42 +00:00
"metadata": {},
2024-09-12 15:04:25 +00:00
"outputs": [],
2024-09-11 06:45:42 +00:00
"source": [
"# Copyright (C) 2024 Richard Stiskalek\n",
"# This program is free software; you can redistribute it and/or modify it\n",
"# under the terms of the GNU General Public License as published by the\n",
"# Free Software Foundation; either version 3 of the License, or (at your\n",
"# option) any later version.\n",
"#\n",
"# This program is distributed in the hope that it will be useful, but\n",
"# WITHOUT ANY WARRANTY; without even the implied warranty of\n",
"# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\n",
"# Public License for more details.\n",
"#\n",
"# You should have received a copy of the GNU General Public License along\n",
"# with this program; if not, write to the Free Software Foundation, Inc.,\n",
"# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n",
"from os.path import join\n",
"\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from astropy.io import fits\n",
"from tqdm import tqdm\n",
"from scipy.ndimage import gaussian_filter\n",
"import scienceplots\n",
"from warnings import warn\n",
"from astropy.cosmology import FlatLambdaCDM\n",
"from mpl_toolkits.axes_grid1 import make_axes_locatable\n",
"\n",
"import csiborgtools\n",
"\n",
"from reconstruction_comparison import simname_to_pretty\n",
"\n",
"%load_ext autoreload\n",
"%autoreload 2\n",
"%matplotlib inline\n",
"\n",
"paths = csiborgtools.read.Paths(**csiborgtools.paths_glamdring)\n",
"fdir = \"/mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity\"\n",
"\n",
"CLUSTERS = {\n",
" \"Shapley\": (-116.37827331, 69.68752732, -14.90318191),\n",
" \"Virgo\": (-3.48, 14.86, -2.21),\n",
" \"Norma\": (-50.26, -7.06, 6.44),\n",
" \"Coma\": (0.48, 72.79, 10.59),\n",
" \"Perseus\": (49.94, -10.73, -12.98),\n",
" \"Centaurus\": (-34.25, 14.93, -7.56)\n",
"}"
]
},
{
"cell_type": "code",
2024-09-12 15:04:25 +00:00
"execution_count": 5,
2024-09-11 06:45:42 +00:00
"metadata": {},
"outputs": [],
"source": [
"# from astropy.coordinates import SkyCoord\n",
"# from astropy.coordinates import Supergalactic\n",
"# from astropy.units import deg, Mpc\n",
"# from astropy.cosmology import FlatLambdaCDM\n",
"\n",
"# SPEED_OF_LIGHT = 299_792.458 \n",
"\n",
"\n",
"# cosmo = FlatLambdaCDM(H0=100, Om0=0.3)\n",
"\n",
"# RA = 196.490821\n",
"# dec = -33.067461\n",
"# dist = cosmo.comoving_distance(0.048)\n",
"\n",
"# c = SkyCoord(ra= RA * deg, dec= dec * deg, distance=dist)\n",
"# c = c.transform_to(Supergalactic)\n",
"# c.cartesian"
]
},
{
"cell_type": "code",
2024-09-12 15:04:25 +00:00
"execution_count": 6,
2024-09-11 06:45:42 +00:00
"metadata": {},
"outputs": [],
"source": [
"def get_field(simname, nsim, kind, MAS, grid):\n",
" # Open the field reader.\n",
" if simname == \"csiborg1\":\n",
" field_reader = csiborgtools.read.CSiBORG1Field(nsim)\n",
" elif \"csiborg2_\" in simname:\n",
" simkind = simname.split(\"_\")[-1]\n",
" field_reader = csiborgtools.read.CSiBORG2Field(nsim, simkind)\n",
" elif simname == \"csiborg2X\":\n",
" field_reader = csiborgtools.read.CSiBORG2XField(nsim)\n",
" elif simname == \"Carrick2015\":\n",
" folder = \"/mnt/extraspace/rstiskalek/catalogs\"\n",
" warn(f\"Using local paths from `{folder}`.\", RuntimeWarning)\n",
" if kind == \"density\":\n",
" fpath = join(folder, \"twompp_density_carrick2015.npy\")\n",
" return np.load(fpath).astype(np.float32)\n",
" elif kind == \"velocity\":\n",
" fpath = join(folder, \"twompp_velocity_carrick2015.npy\")\n",
" field = np.load(fpath).astype(np.float32)\n",
"\n",
" # Because the Carrick+2015 data is in the following form:\n",
" # \"The velocities are predicted peculiar velocities in the CMB\n",
" # frame in Galactic Cartesian coordinates, generated from the\n",
" # \\(\\delta_g^*\\) field with \\(\\beta^* = 0.43\\) and an external\n",
" # dipole \\(V_\\mathrm{ext} = [89,-131,17]\\) (Carrick et al Table 3)\n",
" # has already been added.\"\"\n",
" field[0] -= 89\n",
" field[1] -= -131\n",
" field[2] -= 17\n",
" field /= 0.43\n",
"\n",
" return field\n",
" else:\n",
" raise ValueError(f\"Unknown field kind: `{kind}`.\")\n",
2024-09-12 15:04:25 +00:00
" elif simname == \"CLONES\":\n",
" field_reader = csiborgtools.read.CLONESField(nsim)\n",
2024-09-11 06:45:42 +00:00
" elif simname == \"CF4\":\n",
" folder = \"/mnt/extraspace/rstiskalek/catalogs/CF4\"\n",
" warn(f\"Using local paths from `{folder}`.\", RuntimeWarning)\n",
"\n",
" if kind == \"density\":\n",
" fpath = join(folder, f\"CF4_new_128-z008_realization{nsim}_delta.fits\") # noqa\n",
" elif kind == \"velocity\":\n",
" fpath = join(folder, f\"CF4_new_128-z008_realization{nsim}_velocity.fits\") # noqa\n",
" else:\n",
" raise ValueError(f\"Unknown field kind: `{kind}`.\")\n",
"\n",
" field = fits.open(fpath)[0].data\n",
"\n",
" # https://projets.ip2i.in2p3.fr//cosmicflows/ says to multiply by 52\n",
" if kind == \"velocity\":\n",
" field *= 52\n",
"\n",
" return field.astype(np.float32)\n",
" elif simname == \"Lilow2024\":\n",
" folder = \"/mnt/extraspace/rstiskalek/catalogs\"\n",
" warn(f\"Using local paths from `{folder}`.\", RuntimeWarning)\n",
"\n",
" if kind == \"density\":\n",
" fpath = join(folder, \"Lilow2024_density.npy\")\n",
" field = np.load(fpath)\n",
" elif kind == \"velocity\":\n",
" field = []\n",
" for p in [\"x\", \"y\", \"z\"]:\n",
" fpath = join(folder, f\"Lilow2024_{p}Velocity.npy\")\n",
" field.append(np.load(fpath).astype(np.float32))\n",
" field = np.stack(field)\n",
"\n",
" return field.astype(np.float32)\n",
" else:\n",
" raise ValueError(f\"Unknown simulation name: `{simname}`.\")\n",
"\n",
" # Read in the field.\n",
" if kind == \"density\":\n",
" field = field_reader.density_field(MAS=MAS, grid=grid)\n",
" elif kind == \"velocity\":\n",
" field = field_reader.velocity_field(MAS=MAS, grid=grid)\n",
" else:\n",
" raise ValueError(f\"Unknown field kind: `{kind}`.\")\n",
" \n",
" # NOTE added here \n",
2024-09-12 15:04:25 +00:00
" if kind == \"density\" and (\"csiborg\" in simname or simname == \"CLONES\"):\n",
2024-09-11 06:45:42 +00:00
" Om0 = csiborgtools.simname2Omega_m(simname)\n",
" cosmo = FlatLambdaCDM(H0=100, Om0=Om0)\n",
" mean_rho_matter = cosmo.critical_density0.to(\"Msun/kpc^3\").value\n",
" mean_rho_matter *= Om0\n",
" field /= mean_rho_matter\n",
"\n",
" return field"
]
},
{
"cell_type": "code",
2024-09-12 15:04:25 +00:00
"execution_count": 16,
2024-09-11 06:45:42 +00:00
"metadata": {},
"outputs": [],
"source": [
"def make_slice(simname, xmin, xmax, ngrid):\n",
" boxsize = csiborgtools.simname2boxsize(simname)\n",
"\n",
" paths = csiborgtools.read.Paths(**csiborgtools.paths_glamdring)\n",
" nsims = paths.get_ics(simname)\n",
"\n",
" if simname in [\"Carrick2015\", \"Lilow2024\"]:\n",
" frame = \"galactic\"\n",
2024-09-12 15:04:25 +00:00
" elif simname in [\"CF4\", \"CLONES\"]:\n",
2024-09-11 06:45:42 +00:00
" frame = \"supergalactic\"\n",
" elif \"csiborg\" in simname:\n",
" frame = \"icrs\"\n",
" else:\n",
" raise ValueError(f\"Unknown frame for simulation: `{simname}`.\")\n",
"\n",
" out = np.full((len(nsims), ngrid, ngrid), np.nan)\n",
"\n",
" \n",
" for i, k in enumerate(tqdm(nsims, desc=simname)):\n",
" field = get_field(simname, k, \"density\", \"SPH\", 1024)\n",
" slice_values = csiborgtools.field.xy_supergalactic_slice(\n",
" field, boxsize, xmin, xmax, ngrid, frame)\n",
"\n",
" if simname == \"Lilow2024\":\n",
" slice_values[np.isnan(slice_values)] = 1\n",
"\n",
" out[i] = slice_values\n",
"\n",
" return out\n"
]
},
{
"cell_type": "code",
2024-09-12 15:04:25 +00:00
"execution_count": 22,
2024-09-11 06:45:42 +00:00
"metadata": {},
2024-09-12 15:04:25 +00:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Carrick2015: 0%| | 0/1 [00:00<?, ?it/s]"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_2071304/3695717891.py:12: RuntimeWarning: Using local paths from `/mnt/extraspace/rstiskalek/catalogs`.\n",
" warn(f\"Using local paths from `{folder}`.\", RuntimeWarning)\n",
"Carrick2015: 100%|██████████| 1/1 [00:03<00:00, 3.56s/it]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Lilow2024: 0%| | 0/1 [00:00<?, ?it/s]/tmp/ipykernel_2071304/3695717891.py:56: RuntimeWarning: Using local paths from `/mnt/extraspace/rstiskalek/catalogs`.\n",
" warn(f\"Using local paths from `{folder}`.\", RuntimeWarning)\n",
"Lilow2024: 100%|██████████| 1/1 [00:00<00:00, 3.58it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 1 6 12 15 28 32 34 37 42 44 47 53 55 56 58 67 81 87 88 95]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"CF4: 0%| | 0/20 [00:00<?, ?it/s]/tmp/ipykernel_2071304/3695717891.py:38: RuntimeWarning: Using local paths from `/mnt/extraspace/rstiskalek/catalogs/CF4`.\n",
" warn(f\"Using local paths from `{folder}`.\", RuntimeWarning)\n",
"CF4: 100%|██████████| 20/20 [00:05<00:00, 3.79it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"[15517 15617 15717 15817 15917 16017 16117 16217 16317 16417 16517 16617\n",
" 16717 16817 16917 17017 17117 17217 17317 17417]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"csiborg2_main: 100%|██████████| 20/20 [08:09<00:00, 24.46s/it]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"csiborg2X: 100%|██████████| 20/20 [00:10<00:00, 1.99it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"CLONES: 100%|██████████| 1/1 [00:04<00:00, 4.11s/it]\n"
]
}
],
2024-09-11 06:45:42 +00:00
"source": [
2024-09-12 15:04:25 +00:00
"load_from_disk = False\n",
2024-09-11 06:45:42 +00:00
"fname = \"/mnt/extraspace/rstiskalek/dump/XY_slices.npz\"\n",
"\n",
"xmin = -155\n",
"xmax = 155\n",
2024-09-12 15:04:25 +00:00
"ngrid = 1000\n",
2024-09-11 06:45:42 +00:00
"\n",
"if not load_from_disk:\n",
2024-09-12 15:04:25 +00:00
" xy_carrick = make_slice(\"Carrick2015\", xmin, xmax, ngrid) + 1\n",
2024-09-11 06:45:42 +00:00
" xy_lilow = make_slice(\"Lilow2024\", xmin, xmax, ngrid)\n",
" xy_CF4 = make_slice(\"CF4\", xmin, xmax, ngrid)\n",
" xy_CB2 = make_slice(\"csiborg2_main\", xmin, xmax, ngrid)\n",
" xy_CB2X = make_slice(\"csiborg2X\", xmin, xmax, ngrid)\n",
2024-09-12 15:04:25 +00:00
" xy_CLONES = make_slice(\"CLONES\", xmin, xmax, ngrid)\n",
2024-09-11 06:45:42 +00:00
"\n",
" np.savez(fname, carrick=xy_carrick, lilow=xy_lilow,\n",
2024-09-12 15:04:25 +00:00
" CF4=xy_CF4, CB2=xy_CB2, CB2X=xy_CB2X, CLONES=xy_CLONES)\n",
2024-09-11 06:45:42 +00:00
"else:\n",
" data = np.load(fname)\n",
" xy_carrick = data[\"carrick\"]\n",
" xy_lilow = data[\"lilow\"]\n",
" xy_CF4 = data[\"CF4\"]\n",
" xy_CB2 = data[\"CB2\"]\n",
" xy_CB2X = data[\"CB2X\"]\n",
2024-09-12 15:04:25 +00:00
" xy_CLONES = data[\"CLONES\"]\n",
2024-09-11 06:45:42 +00:00
" data.close()\n",
"\n",
"\n",
"\n",
"rsmooth = None\n",
"if rsmooth is not None:\n",
" sigma = rsmooth / ((xmax - xmin) / ngrid)\n",
" print(f\"Smoothing with sigma={sigma}\")\n",
"\n",
" for field in [xy_carrick, xy_CF4, xy_CB2, xy_CB2X]:\n",
" for i in range(len(field)):\n",
" field[i] = gaussian_filter(field[i], sigma=sigma)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Individual plots"
]
},
{
"cell_type": "code",
2024-09-12 15:04:25 +00:00
"execution_count": 23,
2024-09-11 06:45:42 +00:00
"metadata": {},
"outputs": [
{
"data": {
2024-09-12 15:04:25 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcQAAAHVCAYAAABv1YshAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOy9eZijZ3XmfWsrVZWkKm21qbZe3e2lbWMTjMH+MBgMZscOwSQ2ZklMhkAwmRkyZggeTIKHCR8EyAAJScBJIA6EBOKQYGCCQxzMYuMFL93t6qV21aJdVaWSVNL3R32/U4/KxrTpnoCDznXV1V0q6dX7PstZ7nOf83iazWZTbWlLW9rSlrb8nIv3p30DbWlLW9rSlrb8LEjbILalLW1pS1vaorZBbEtb2tKWtrRFUtsgtqUtbWlLW9oiqW0Q29KWtrSlLW2R1DaIbWlLW9rSlrZIahvEtrSlLW1pS1sktQ1iW9rSlra0pS2S2gaxLW1pS1va0hZJbYPYlra0pS1taYuktkFsy+PI61//ev3u7/7uU+a6bWlLW7bk+PHj8vv9P+3beEpK2yD+HMu3vvUtPfOZz1Rvb68SiYSe97zn6dixYz/t2/qZkB07dmh8fFy1Ws1e+/Vf/3X9j//xP356N/XvKDt27FB3d7fC4bCGhob09re/XfV6/ad9W09p2bFjh+68886f9m1oY2NDH/jAB7R//36FQiGNjIzoVa96lb773e/+tG/tpy5tg/hzKoVCQa94xSv0zne+U7lcTpOTk3rb294mn8/30761nxkplUr69Kc/fVLXeCobka997Wsql8v61re+pc9//vP61Kc+dcKffSo/9390ue666/TpT39an/rUp5TL5TQxMaFrr71WX/3qVx/3/T9Pc9k2iD+ncvjwYQWDQV1xxRXyer0Kh8N61atepbGxMUnS4uKiLr30UkUiEV122WXKZrP22SuuuEL9/f2Kx+N69atfbX8DqvnEJz6hgYEBjY2N6S//8i9/5D38zd/8jc4880zF43G9/OUv1+LioiTpsssu02c+8xl738rKiiKRiGZmZv4vjMSPlne84x16//vf3xIlIh//+Me1a9cu9fX16eqrr1ahUJAk3XHHHdqzZ49uvPFGJZNJ3Xjjjbrkkkv0nve8R+eff77C4bDe9KY3aX5+Xs973vPU09OjK6+8Uuvr65KkXC6nF73oRUomk+rr69N1111nf/tpyd69e3XxxRfroYce+pFz9njP/Z3vfEdPe9rT1NPTo+HhYX34wx+2a/7v//2/tXfvXiWTSV177bVaWVmRJH3mM5/R85//fHufC/81Gg395m/+ppLJpKLRqH7hF35By8vL/44j8X9Hpqen9eIXv1ixWExnnHGGvvzlL9vfVlZW9Ja3vEWpVEqxWEzXXHONpJ98nTzyyCP6zGc+o1tvvVUXX3yxOjo61NnZqVe+8pW68cYbJW2N+Sc/+UkNDw/r9a9/vSqVin7jN35Dg4ODGhsb00033aRGoyFJ+h//43/oV3/1V+07WAvutU5UJ/y0pW0Qn4KSW6nq1//iHs3l1yRJc/k1/fpf3KPcSvWEr3HaaaepWq3qV3/1V/X1r39dxWKx5e+f//zn9eEPf1hLS0va2NjQRz7yEfvbFVdcoWPHjunYsWMqlUq66aab7G8bGxv63ve+p8nJSd166616y1veosOHDz/m+7/3ve/p+uuv16233qqFhQXt379fb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nETinXr+G85see35bzhTkfjJwYs/bs62P/e+ffv0+c9/XouLi7rqqqv02te+1q5zyy23tFyHHGIoFNLa2ppdY2FhoeWa73jHO3Tffffp+9//vm6//XZ99rOfPalnejL
2024-09-11 06:45:42 +00:00
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure()\n",
"\n",
2024-09-12 15:04:25 +00:00
"img = np.mean(xy_CLONES, axis=0)\n",
2024-09-11 06:45:42 +00:00
"img = np.clip(img, None, np.percentile(img.ravel(), 99.75))\n",
"img = np.log10(img)\n",
"\n",
"plt.imshow(img, origin=\"lower\", cmap=\"gray_r\", extent=[xmin, xmax, xmin, xmax])\n",
"\n",
"kwargs = {\"marker\": \"x\", \"s\": 15}\n",
"for name, coords in CLUSTERS.items():\n",
" plt.scatter(*coords[:2], label=name, **kwargs)\n",
"\n",
"plt.scatter(0, 0, label=\"Local Group\", **kwargs)\n",
"\n",
"plt.xlabel(r\"$\\mathrm{SGX} ~ [\\mathrm{Mpc} / h]$\")\n",
"plt.ylabel(r\"$\\mathrm{SGY} ~ [\\mathrm{Mpc} / h]$\")\n",
"\n",
"plt.legend(loc='lower center', bbox_to_anchor=(0.5, 1.025),\n",
" ncol=4, fontsize=\"small\", frameon=False,\n",
" handletextpad=0.1, # Reduce space between marker and text\n",
" borderpad=0.1, # Reduce padding between legend and border\n",
" columnspacing=0.1) # Reduce space between columns\n",
"\n",
"plt.tight_layout()\n",
"plt.savefig(\"../../plots/slice_test.png\", dpi=450, bbox_inches=\"tight\")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### CF4 data check"
]
},
{
"cell_type": "code",
"execution_count": 227,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAzQAAAFmCAYAAAC7q9+iAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9t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u4srV65YycYLFy5YRYxl2yaaaKKJJppoookmmmiie5/e8YBGa8rrCK9XrlzBuXPn8OKLLwIAzp8/b6UKtW751atXV26baKKJJppoookmmmiiie59esfn0Fy/ft1GkwfyCLk6Uq2nzc1NXL9+HXt7e0u3TTTRRBNNNNFEE0000UTvDnrHA5qdnZ1isKjr168DSAM+Xb9+3UasVTp9+jSuX7++dNtEE0000UQTTTTRRBNN9O6gd3zIGZBGAFa6dOkSnn76aQBoels2Nzext7e3dFuLuvvuA3VdXj51CrNTp9ICpYlVT6B8XH/rFrpN2Q+ct9VTAKB0BiJgcfMWZu9/0JZJjs1TOZQ4zcux+7/3Co5/4IG8vnk3JTGA27/3Ko69/wG7B2ZKPwDMAIPSlPVm0/Li5suYbZ5KJ+G03m7F/YgpdxADi1f2sHFys+g4Kjoxraj7dP7qHmYPbFoHMLk+DXJ5kga4+f6l1J9EDCIgEIOIEbTPpQ+1TxXJv/m7r+L4B08WfQUmROsbN2Wk9UwAExY3X07P3veN9Ye771je7OLlPWw8sDl8SFVfsJsHAfNX9sp3kkb6Q+6RrG9exsb7H7D7176B9IlZNWw+7ffm772KEx/IfZObSXbL+j5Emdd3beP9D1ifsdy7vmO6n3+
"text/plain": [
"<Figure size 830x622.5 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"with plt.style.context(\"science\"):\n",
" fig, axs = plt.subplots(1, 2, figsize=(8.3, 8.3 * 0.75), sharex=True, sharey=True)\n",
"\n",
" kwargs = {\n",
" \"origin\": \"lower\", \"cmap\": \"viridis\", \"extent\": [xmin, xmax, xmin, xmax]}\n",
" im0 = axs[0].imshow(xy_CF4[0], **kwargs)\n",
" im1 = axs[1].imshow(xy_CF4[0] - xy_CF4[15], **kwargs)\n",
"\n",
" axs[0].set_title(\"Random sample\")\n",
" axs[1].set_title(\"Difference of two random samples\")\n",
"\n",
" # Adjust colorbars to be the same height as the plots using make_axes_locatable\n",
" labels = [r\"$\\delta$\", r\"$\\Delta \\delta$\"]\n",
" for i, im in enumerate([im0, im1]):\n",
" divider = make_axes_locatable(axs[i])\n",
" cax = divider.append_axes(\"right\", size=\"5%\", pad=0.1) # Create colorbar axis\n",
" fig.colorbar(im, label=labels[i], cax=cax, orientation=\"vertical\")\n",
"\n",
" for i in range(2):\n",
" axs[i].set_ylabel(r\"$\\mathrm{SGY} ~ [\\mathrm{Mpc / h}]$\")\n",
" axs[i].set_xlabel(r\"$\\mathrm{SGX} ~ [\\mathrm{Mpc / h}]$\")\n",
"\n",
" fig.tight_layout()\n",
" fig.savefig(\"../../plots/CF4_test.png\", dpi=450)\n",
" fig.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Paper plots"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1. Comparison of fields"
]
},
{
"cell_type": "code",
2024-09-12 15:04:25 +00:00
"execution_count": 27,
2024-09-11 06:45:42 +00:00
"metadata": {},
"outputs": [
{
"data": {
2024-09-12 15:04:25 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAzMAAAIkCAYAAAAqD3UhAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOy9WZBd53Ueuvbp6XSfntAAAUKUNUA3iuM4ZQkkLU+5dolgFMcSJZIYpLIuncgSZVUSvaQsSnFcrnIcS6RLqcT3JhYHK4otyyIB2bm6dZ8E5SEvdkQQiivJQ3xlhIlCYgZ67tPTOfcB/v7+9tdr/Xuf7gYJEL2qTp1z9vDvf1prfd/6h110u92u7cqu7Mqu7Mqu7Mqu7Mqu7Mqu3GbSeL0zsCu7siu7siu7siu7siu7siu7shXZJTO7siu7siu7siu7siu7siu7clvKLpnZlV3ZlV3ZlV3ZlV3ZlV3ZldtSdsnMruzKruzKruzKruzKruzKrtyWsktmdmVXdmVXdmVXdmVXdmVXduW2lF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+3IkSNJZ/kZCmC8cn7wgx8sjYKurKykgAhsAwfcFKho+dTOKLhheeSRR0LwUkVkzG4dMsN+CfXwyCOPlMgjly0iCWinhx56qBRpj0Zg0EZMWvDNZKbOyAw+73nPe6zdbpfy5UlEGH7yJ38yBec8Yqv3MtZ573vfG6Yd/cexBx98sDJv0THkDT41eg7nF9LpdNIMnzrYiO2O2Q3yx2SzFyLT7Xbtr/21v1a6X4PH2vZ875vf/OZS3jh469Vxri94to8
2024-09-11 06:45:42 +00:00
"text/plain": [
"<Figure size 830x556.1 with 6 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"with plt.style.context(\"science\"):\n",
" plt.rcParams.update({'font.size': 9})\n",
"\n",
" imshow_kwargs = {\"origin\": \"lower\", \"cmap\": \"gray_r\",\n",
" \"extent\": [xmin, xmax, xmin, xmax]}\n",
"\n",
" figwidth = 8.3\n",
" fig, axs = plt.subplots(2, 3, figsize=(figwidth, 0.67 * figwidth),\n",
" sharex=\"col\", sharey=True)\n",
" fig.subplots_adjust(wspace=0, hspace=0)\n",
"\n",
" # Carrick 2015\n",
" img = np.mean(xy_carrick, axis=0)\n",
" img = np.clip(img, None, np.percentile(img.ravel(), 99.75))\n",
" axs[0, 0].imshow(img, **imshow_kwargs)\n",
" axs[0, 0].text(\n",
" 0.05, 0.05, simname_to_pretty(\"Carrick2015\"), transform=axs[0, 0].transAxes,\n",
" bbox=dict(facecolor='white', alpha=0.75))\n",
"\n",
" # Lilow 2024\n",
" img = np.mean(xy_lilow, axis=0)\n",
" img = np.clip(img, None, np.percentile(img.ravel(), 99.75))\n",
" axs[0, 1].imshow(img, **imshow_kwargs)\n",
" axs[0, 1].text(\n",
" 0.05, 0.05, simname_to_pretty(\"Lilow2024\"), transform=axs[0, 1].transAxes,\n",
" bbox=dict(facecolor='white', alpha=0.75))\n",
"\n",
" # CF4\n",
" img = np.mean(xy_CF4, axis=0)\n",
" img = np.clip(img, None, np.percentile(img.ravel(), 99.9))\n",
" axs[0, 2].imshow(img, **imshow_kwargs)\n",
" axs[0, 2].text(\n",
" 0.05, 0.05, simname_to_pretty(\"CF4\"), transform=axs[0, 2].transAxes,\n",
" bbox=dict(facecolor='white', alpha=0.75))\n",
"\n",
" # csiborg2_main \n",
" img = np.mean(xy_CB2, axis=0)\n",
2024-09-12 15:04:25 +00:00
" img = np.clip(img, None, np.percentile(img.ravel(), 99))\n",
2024-09-11 06:45:42 +00:00
" img = np.log10(img)\n",
" axs[1, 0].imshow(img, **imshow_kwargs)\n",
" axs[1, 0].text(\n",
" 0.05, 0.05, simname_to_pretty(\"csiborg2_main\"), transform=axs[1, 0].transAxes,\n",
" bbox=dict(facecolor='white', alpha=0.75))\n",
"\n",
" # Manticore\n",
" img = np.mean(xy_CB2X, axis=0)\n",
2024-09-12 15:04:25 +00:00
" img = np.clip(img, None, np.percentile(img.ravel(), 99))\n",
2024-09-11 06:45:42 +00:00
" img = np.log10(img)\n",
" axs[1, 1].imshow(img, **imshow_kwargs)\n",
" axs[1, 1].text(\n",
" 0.05, 0.05, simname_to_pretty(\"csiborg2X\"), transform=axs[1, 1].transAxes,\n",
" bbox=dict(facecolor='white', alpha=0.75))\n",
"\n",
" # Jenny's field\n",
2024-09-12 15:04:25 +00:00
" img = np.mean(xy_CLONES, axis=0)\n",
" img = np.clip(img, None, np.percentile(img.ravel(), 99.))\n",
" img = np.log10(img)\n",
2024-09-11 06:45:42 +00:00
" axs[1, 2].imshow(img, **imshow_kwargs)\n",
" axs[1, 2].text(\n",
2024-09-12 15:04:25 +00:00
" 0.05, 0.05, simname_to_pretty(\"CLONES\"), transform=axs[1, 2].transAxes,\n",
2024-09-11 06:45:42 +00:00
" bbox=dict(facecolor='white', alpha=0.75))\n",
"\n",
" for i in range(2):\n",
" axs[i, 0].set_ylabel(r\"$\\mathrm{SGY} ~ [\\mathrm{Mpc} / h]$\")\n",
"\n",
" for i in range(3):\n",
" axs[-1, i].set_xlabel(r\"$\\mathrm{SGX} ~ [\\mathrm{Mpc} / h]$\")\n",
2024-09-12 15:04:25 +00:00
"\n",
2024-09-11 06:45:42 +00:00
" for i in range(2):\n",
" for j in range(3):\n",
" axs[i, j].scatter(0, 0, marker=\"x\", s=15, color=\"firebrick\")\n",
"\n",
" fig.tight_layout()\n",
" fig.savefig(\"../../plots/XY_slices.pdf\", dpi=450)\n",
" fig.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.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}