csiborgtools/notebooks/flow/void_test.ipynb

498 lines
278 KiB
Text
Raw Normal View History

2024-09-23 09:24:07 +00:00
{
"cells": [
{
"cell_type": "code",
2024-10-02 17:07:30 +00:00
"execution_count": 2,
2024-09-23 09:24:07 +00:00
"metadata": {},
"outputs": [],
"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 exists\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from corner import corner\n",
"from getdist import plots\n",
"import scienceplots\n",
"from os.path import exists\n",
"import seaborn as sns\n",
"\n",
"\n",
"from reconstruction_comparison import *\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\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Quick checks"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"catalogue = \"CF4_TFR_i\"\n",
"simname = \"IndranilVoid_exp\"\n",
"zcmb_max=0.05\n",
"sample_beta = None\n",
"no_Vext = True\n",
"\n",
"fname = paths.flow_validation(\n",
" fdir, simname, catalogue, inference_method=\"bayes\",\n",
" sample_alpha=False, sample_beta=sample_beta,\n",
" no_Vext=no_Vext, zcmb_max=zcmb_max)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"X = samples_to_getdist(get_samples(fname, False), \"Test\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"params = [\"rLG\", \"sigma_v\"]\n",
"\n",
"\n",
"# params = [\"beta\", f\"a_{catalogue}\", f\"b_{catalogue}\", f\"e_mu_{catalogue}\"]\n",
"# params = [\"Vmag\", \"l\", \"b\", \"sigma_v\", \"beta\", f\"mag_cal_{catalogue}\", f\"alpha_cal_{catalogue}\", f\"beta_cal_{catalogue}\", f\"e_mu_{catalogue}\"]\n",
"\n",
"with plt.style.context(\"science\"):\n",
" g = plots.get_subplot_plotter()\n",
" g.settings.figure_legend_frame = False\n",
" g.settings.alpha_filled_add = 0.75\n",
" \n",
" g.triangle_plot(X, params=params, filled=True, legend_loc='upper right')\n",
" plt.gcf().suptitle(catalogue_to_pretty(catalogue), y=1.025)\n",
" plt.gcf().tight_layout()\n",
" plt.gcf().show()\n",
" # plt.gcf().savefig(f\"../../plots/method_comparison_{simname}_{catalogue}.png\", dpi=500, bbox_inches='tight')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# catalogue = [\"LOSS\", \"Foundation\"]\n",
"catalogue = \"CF4_TFR_i\"\n",
"simname = \"IndranilVoid_exp\"\n",
"zcmb_max = 0.05\n",
"sample_alpha = False\n",
"\n",
"fname = paths.flow_validation(\n",
" fdir, simname, catalogue, inference_method=\"mike\",\n",
" sample_mag_dipole=True,\n",
" sample_beta=False,\n",
" sample_alpha=sample_alpha, zcmb_max=zcmb_max)\n",
"\n",
"\n",
"samples = get_samples(fname, convert_Vext_to_galactic=True)\n",
"\n",
"samples, labels, keys = samples_for_corner(samples)\n",
"fig = corner(samples, labels=labels, show_titles=True,\n",
" title_kwargs={\"fontsize\": 12}, smooth=1)\n",
"# fig.savefig(\"../../plots/test.png\", dpi=250)\n",
"fig.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Paper plots"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 1. No $V_{\\rm ext}$ and no $\\beta$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for simname in [\"IndranilVoid_exp\", \"IndranilVoid_gauss\", \"IndranilVoid_mb\"]:\n",
" X = []\n",
" for catalogue in [\"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]:\n",
"\n",
" fname = paths.flow_validation(\n",
" fdir, simname, catalogue, inference_method=\"bayes\",\n",
" sample_alpha=False, sample_beta=None,\n",
" no_Vext=True, zcmb_max=0.05)\n",
"\n",
" X_i = samples_to_getdist(get_samples(fname, False), catalogue_to_pretty(catalogue))\n",
" X.append(X_i)\n",
"\n",
" params = [\"rLG\", \"sigma_v\"]\n",
" with plt.style.context(\"science\"):\n",
" g = plots.get_subplot_plotter()\n",
" g.settings.figure_legend_frame = False\n",
" g.settings.alpha_filled_add = 0.75\n",
"\n",
" g.triangle_plot(X, params=params, filled=True, legend_loc='upper right')\n",
" plt.gcf().suptitle(simname_to_pretty(simname), y=1.025)\n",
" plt.gcf().tight_layout()\n",
" plt.gcf().show()\n",
" plt.gcf().savefig(f\"../../plots/void_{simname}_noVext_nobeta.png\", dpi=500, bbox_inches='tight')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 2. No $V_{\\rm ext}$ but sampling $\\beta$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for simname in [\"IndranilVoid_exp\", \"IndranilVoid_gauss\", \"IndranilVoid_mb\"]:\n",
" X = []\n",
" for catalogue in [\"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]:\n",
"\n",
" fname = paths.flow_validation(\n",
" fdir, simname, catalogue, inference_method=\"bayes\",\n",
" sample_alpha=False, sample_beta=True,\n",
" no_Vext=True, zcmb_max=0.05)\n",
"\n",
" X_i = samples_to_getdist(get_samples(fname, False), catalogue_to_pretty(catalogue))\n",
" X.append(X_i)\n",
"\n",
" params = [\"rLG\", \"sigma_v\", \"beta\"]\n",
" with plt.style.context(\"science\"):\n",
" g = plots.get_subplot_plotter()\n",
" g.settings.figure_legend_frame = False\n",
" g.settings.alpha_filled_add = 0.75\n",
"\n",
" g.triangle_plot(X, params=params, filled=True, legend_loc='upper right')\n",
" plt.gcf().suptitle(simname_to_pretty(simname), y=1.025)\n",
" plt.gcf().tight_layout()\n",
" plt.gcf().show()\n",
" plt.gcf().savefig(f\"../../plots/void_{simname}_noVext_beta.png\", dpi=500, bbox_inches='tight')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 3. Yes $V_{\\rm ext}$ and no $\\beta$ "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for simname in [\"IndranilVoid_exp\", \"IndranilVoid_gauss\", \"IndranilVoid_mb\"]:\n",
" X = []\n",
" for catalogue in [\"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]:\n",
"\n",
" fname = paths.flow_validation(\n",
" fdir, simname, catalogue, inference_method=\"bayes\",\n",
" sample_alpha=False, sample_beta=False,\n",
" no_Vext=None, zcmb_max=0.05)\n",
"\n",
" X_i = samples_to_getdist(get_samples(fname, False), catalogue_to_pretty(catalogue))\n",
" X.append(X_i)\n",
"\n",
" params = [\"rLG\", \"sigma_v\", \"Vx\", \"Vy\", \"Vz\"]\n",
" with plt.style.context(\"science\"):\n",
" g = plots.get_subplot_plotter()\n",
" g.settings.figure_legend_frame = False\n",
" g.settings.alpha_filled_add = 0.75\n",
"\n",
" g.triangle_plot(X, params=params, filled=True, legend_loc='upper right')\n",
" plt.gcf().suptitle(simname_to_pretty(simname), y=1.025)\n",
" plt.gcf().tight_layout()\n",
" plt.gcf().show()\n",
" plt.gcf().savefig(f\"../../plots/void_{simname}_Vext_nobeta.png\", dpi=500, bbox_inches='tight')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 4. Yes $V_{\\rm ext}$ and yes $\\beta$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for simname in [\"IndranilVoid_exp\", \"IndranilVoid_gauss\", \"IndranilVoid_mb\"]:\n",
" X = []\n",
" for catalogue in [\"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]:\n",
"\n",
" fname = paths.flow_validation(\n",
" fdir, simname, catalogue, inference_method=\"bayes\",\n",
" sample_alpha=False, sample_beta=True,\n",
" no_Vext=None, zcmb_max=0.05)\n",
"\n",
" X_i = samples_to_getdist(get_samples(fname, False), catalogue_to_pretty(catalogue))\n",
" X.append(X_i)\n",
"\n",
" params = [\"rLG\", \"sigma_v\", \"beta\", \"Vx\", \"Vy\", \"Vz\"]\n",
" with plt.style.context(\"science\"):\n",
" g = plots.get_subplot_plotter()\n",
" g.settings.figure_legend_frame = False\n",
" g.settings.alpha_filled_add = 0.75\n",
"\n",
" g.triangle_plot(X, params=params, filled=True, legend_loc='upper right')\n",
" plt.gcf().suptitle(simname_to_pretty(simname), y=1.025)\n",
" plt.gcf().tight_layout()\n",
" plt.gcf().show()\n",
" plt.gcf().savefig(f\"../../plots/void_{simname}_Vext_beta.png\", dpi=500, bbox_inches='tight')"
]
},
{
"cell_type": "markdown",
2024-09-23 09:24:07 +00:00
"metadata": {},
"source": [
"### 5. $V_{\\rm ext}$ along the model axis and $\\beta = 1$"
]
2024-09-23 09:24:07 +00:00
},
{
"cell_type": "code",
2024-10-02 17:07:30 +00:00
"execution_count": 10,
2024-09-23 09:24:07 +00:00
"metadata": {},
2024-10-02 17:07:30 +00:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_exp_2MTF_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 09:39:52\n",
"Removed no burn in\n",
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_exp_SFI_gals_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 10:11:18\n",
"Removed no burn in\n",
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_exp_CF4_TFR_i_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 10:01:14\n",
"Removed no burn in\n",
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_exp_CF4_TFR_w1_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 10:01:20\n",
"Removed no burn in\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_2151114/3148255757.py:36: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.\n",
" plt.gcf().tight_layout()\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_gauss_2MTF_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 09:46:13\n",
"Removed no burn in\n",
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_gauss_SFI_gals_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 10:27:30\n",
"Removed no burn in\n",
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_gauss_CF4_TFR_i_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 10:09:19\n",
"Removed no burn in\n",
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_gauss_CF4_TFR_w1_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 09:56:52\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:root:auto bandwidth for rLG very small or failed (h=0.0005439226807811613,N_eff=8994.407942602313). Using fallback (h=0.0028506479348732166)\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Removed no burn in\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_2151114/3148255757.py:36: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.\n",
" plt.gcf().tight_layout()\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_mb_2MTF_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 10:01:37\n",
"Removed no burn in\n",
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_mb_SFI_gals_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 10:18:28\n",
"Removed no burn in\n",
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_mb_CF4_TFR_i_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 10:23:29\n",
"Removed no burn in\n",
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_IndranilVoid_mb_CF4_TFR_w1_bayes_zcmb_max_0.05_no_Vext_sample_Vmag_vax.hdf5\n",
"Last modified: 27/09/2024 10:40:41\n",
"Removed no burn in\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_2151114/3148255757.py:36: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect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U/fBcAMDAwgBkzZsRfnzFjBvr7+1G7qgkelRrBw29Ds/qOko+TEEKmgpGREQSDQVnvodFooNfrZb0HSY9Ck0zCggTUvYCPN38IA/3m0t//2FFw1TVQzpwNABgeHkZlZWX89RkzZqCnpwcAYP78l+H+6Y8pNBFCSB5GRkbw61//uiSh6ZOf/CQFpzKi6TmZhHgJRpUSYINwBUrfCsv7wh4YH9sS//Xw8DAqKiriv7ZarfEdrlVLboNwox/8jf5SD5MQQia9YDCIYDAIjuOgVqtl+eA4Ln6fbHR3d6O5uRlWqxWNjY0JG/aOPh77iDW/bGxsRHt7uyx/TlMBhaY0+vr6sH79euzZsyfna8MCYFGrIbJ+OP2lXdMk+rwInzoOzdpbTaLGhiaLxRIPTQzDwLB+A3y/e76k4ySEkKlEoVBAqVTK8qFQZD8x5HK58OCDD2Lnzp1wOp3o6upCY2NjwutPP/00enp64h979+6V449kyqHQlEZ9fT327duHLVu2ZD55jLAgwapRQ2D9Ja80Bd56Fdp7PgCGvfXX63A4YLPdarymUCjA8zxiDeH1D6+H/6XfQxLK1x6BEEJI4Q4fPgwAaGlpARD9JrnQrVJi32Tn+tpUQ6FJJhEBsKnVCEl+eEOlDU3+l/8I3QMPxX8tSRIikQhUKlXCeQaDASMjIwAA1mCEatFShN7rKulYCSGEFFcsLG3cuBGdnZ0Fv193d3fSvesyvTYVUWiSSUSQYNNq4YvIuzBwLCkUQvj8GagWL48f83q98VYDo1mtVjidzvivdQ9+CP79L5ZknIQQQuRz4cIFANHgZLVax61T2r59O5qbm+Mfvb295Rj
"text/plain": [
"<Figure size 600x600 with 6 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk0AAAJrCAYAAAD9D6dzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAD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FCCCHlZLfbcfjwYQBAV1cXOjo60NfXB7fbDQDYv39/0Zqmrq4u7Nq1Cz6fDwDgcDjgdDrR19dX8LmFjDJNJTBqAaZoCmaaZO8YJLMlk2lKJpMAx4MpSpVHSwghhADbt29Ha2srent7S37d+Pg4jh8/jvb2doyPj2eCokLPLWSUaSoBzwEc+IJBk+IdRdJkhuFSpimZTIK32aAEfBDstAM2IYQsVJJUuVmFUq7d09OD3t5e7N69G3a7HT09PfB4PJlap1LZ7fa8hd6FnluIKGgqgcIYOA6pQnApdyG4PDaChMEE66VMUyKRgOBwQfaOUdBECCELkF6vh16vRywWU90WYDb3KWbTpk3o7u7G6tWrAQButxuPP/74jIMbt9udmeor5bmFiIKmAqb2aWJg4MAVnp4bG0Ncb8xMz4VCIfAOF5RxKgYnhJCFyGQy4WMf+9ic2UbFbrdj//792L9/f87nC02jLYYpttmgoKmAqX2aGGPgOQ4GUYOonK+maRQxvWFi9ZwkQXA4IVPQRAghC5bJZKLtTRYBKgQvAQPAcww6vkBNk28cMW2qR5MoikgmkxAcLihe6tVECCGEzGcUNJWAAdCIMgSmzx80Bf2ICWJWpol3uqhXEyGEEDL
"text/plain": [
"<Figure size 600x600 with 6 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk0AAAJrCAYAAAD9D6dzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeXhcZ3k3/u85Z/Z9RqsleRt5SewstuQQshGSSAQIMZBYNoZQKCUWvHR5W4qNW1paWn7BKZSXvqVgh/JCWUxsJYDLUpCSQEJWW7KdzXFsSV60L7No9uWc8/tjMmMts5wzc2aRdH+uy1eiM2d5tN+6n/u5H0YURRGEEEIIISQrttwDIIQQQghZDChoIoQQQgiRgIImQgghhBAJ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+Kf36vHCxfiiPPKJBKHhobQ0NCAzZs345VXXlHkniSz2IV+AAAlggkhpHJQ0FRB/vviy/jAmi1476pr8OTI2bx/Yf76TAzbr1Fja5MKp0d4RcY2ODiI5uZmbN26FWfOnFHkniQzfmoSACBGImUeCSGEkCQKmirICxODuLV+HbScGmvNVeifmZR9D1EUMTojYLWDw6Y6Dm+MKxM0jY2NYcWKFXA4HHC73ZQBKTLe7QJrtUMMFLdGghBCiHQUNFUIQRQwEvCg0WgDANxU58Tz4/K7qk74RdSZE5/WjbUszk4oEzRNTU2huroaDMPAarXC6/Uqcl+SHu9xQdW0EgIFTYQQUjGoELxCXPS5sNaSCEoAoLV6NZ4
"text/plain": [
"<Figure size 600x600 with 6 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
2024-10-02 17:07:30 +00:00
"def profile2vvoid(profile):\n",
" if \"mb\" in profile:\n",
" return 1586\n",
" elif \"gauss\" in profile:\n",
" return 2018\n",
" elif \"exp\" in profile:\n",
" return 2307\n",
" else:\n",
" raise ValueError(\"Invalid profile\")\n",
"\n",
"\n",
"for simname in [\"IndranilVoid_exp\", \"IndranilVoid_gauss\", \"IndranilVoid_mb\"]:\n",
" X = []\n",
" for catalogue in [\"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]:\n",
"\n",
" fname = paths.flow_validation(\n",
" fdir, simname, catalogue, inference_method=\"bayes\",\n",
" sample_alpha=False, sample_beta=None,\n",
" no_Vext=True, zcmb_max=0.05, sample_Vmag_vax=True)\n",
2024-10-02 17:07:30 +00:00
"\n",
" Xi = get_samples(fname, False)\n",
" Xi[\"Vvoid\"] = Xi[\"Vext_axis_mag\"] - profile2vvoid(simname)\n",
"\n",
" X_i = samples_to_getdist(Xi, catalogue_to_pretty(catalogue))\n",
"\n",
" X.append(X_i)\n",
"\n",
2024-10-02 17:07:30 +00:00
" params = [\"rLG\", \"sigma_v\", \"Vvoid\"]\n",
" with plt.style.context(\"science\"):\n",
" g = plots.get_subplot_plotter()\n",
" g.settings.figure_legend_frame = False\n",
" g.settings.alpha_filled_add = 0.75\n",
"\n",
" g.triangle_plot(X, params=params, filled=True, legend_loc='upper right')\n",
" plt.gcf().suptitle(simname_to_pretty(simname), y=1.025)\n",
" plt.gcf().tight_layout()\n",
" plt.gcf().show()\n",
" plt.gcf().savefig(f\"../../plots/void_{simname}_Vext_along_axis_no_beta.png\", dpi=500, bbox_inches='tight')"
]
2024-09-23 09:24:07 +00:00
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"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
}