2024-07-01 10:48:50 +00:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-16 10:12:32 +00:00
|
|
|
"execution_count": 1,
|
2024-07-01 10:48:50 +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",
|
|
|
|
"import numpy as np\n",
|
|
|
|
"import matplotlib.pyplot as plt\n",
|
|
|
|
"from corner import corner\n",
|
|
|
|
"from getdist import plots\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
"from astropy.coordinates import angular_separation\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"import scienceplots\n",
|
|
|
|
"from os.path import exists\n",
|
|
|
|
"import seaborn as sns\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"from reconstruction_comparison import *\n",
|
|
|
|
"\n",
|
|
|
|
"%load_ext autoreload\n",
|
|
|
|
"%autoreload 2\n",
|
|
|
|
"%matplotlib inline\n",
|
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"paths = csiborgtools.read.Paths(**csiborgtools.paths_glamdring)\n",
|
|
|
|
"fdir = \"/mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity\""
|
2024-07-01 10:48:50 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-09-11 06:45:42 +00:00
|
|
|
"## Quick checks"
|
2024-07-01 10:48:50 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
2024-09-11 06:45:42 +00:00
|
|
|
"catalogue = \"CF4_TFR_i\"\n",
|
|
|
|
"simname = \"Carrick2015\"\n",
|
|
|
|
"zcmb_max=0.05\n",
|
|
|
|
"sample_beta = None\n",
|
|
|
|
"sample_alpha = True\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"fname_bayes = paths.flow_validation(\n",
|
|
|
|
" fdir, simname, catalogue, inference_method=\"bayes\",\n",
|
|
|
|
" sample_alpha=sample_alpha, sample_beta=sample_beta,\n",
|
|
|
|
" zcmb_max=zcmb_max)\n",
|
|
|
|
"\n",
|
|
|
|
"fname_mike = paths.flow_validation(\n",
|
|
|
|
" fdir, simname, catalogue, inference_method=\"mike\",\n",
|
|
|
|
" sample_alpha=sample_alpha, sample_beta=sample_beta,\n",
|
|
|
|
" zcmb_max=zcmb_max)\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"X = []\n",
|
|
|
|
"labels = [\"Full posterior\", \"Delta posterior\"]\n",
|
|
|
|
"for i, fname in enumerate([fname_bayes, fname_mike]):\n",
|
|
|
|
" samples = get_samples(fname)\n",
|
|
|
|
" if i == 1:\n",
|
|
|
|
" print(samples.keys())\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" X.append(samples_to_getdist(samples, labels[i]))\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"params = [f\"a_{catalogue}\", f\"b_{catalogue}\", f\"c_{catalogue}\", f\"e_mu_{catalogue}\",\n",
|
|
|
|
" \"Vmag\", \"l\", \"b\", \"sigma_v\", \"beta\", f\"alpha_{catalogue}\"]\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",
|
|
|
|
"\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().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",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"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",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"samples = get_samples(fname, convert_Vext_to_galactic=True)\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"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"
|
|
|
|
]
|
|
|
|
},
|
2024-09-12 15:04:25 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### 0. LOS velocity example"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"fpath = \"/mnt/extraspace/rstiskalek/catalogs/PV/CF4/CF4_TF-distances.hdf5\"\n",
|
|
|
|
"\n",
|
|
|
|
"loader_carrick = csiborgtools.flow.DataLoader(\"Carrick2015\", [0], \"CF4_TFR_i\", fpath, paths, ksmooth=0, )\n",
|
|
|
|
"loader_lilow = csiborgtools.flow.DataLoader(\"Lilow2024\", [0], \"CF4_TFR_i\", fpath, paths, ksmooth=0, )\n",
|
|
|
|
"loader_cb2 = csiborgtools.flow.DataLoader(\"csiborg2_main\", [i for i in range(20)], \"CF4_TFR_i\", fpath, paths, ksmooth=0, )\n",
|
|
|
|
"loader_cb2X = csiborgtools.flow.DataLoader(\"csiborg2X\", [i for i in range(20)], \"CF4_TFR_i\", fpath, paths, ksmooth=0, )\n",
|
|
|
|
"loader_CF4 = csiborgtools.flow.DataLoader(\"CF4\", [i for i in range(20)], \"CF4_TFR_i\", fpath, paths, ksmooth=0, )\n",
|
|
|
|
"loader_CLONES = csiborgtools.flow.DataLoader(\"CLONES\", [0], \"CF4_TFR_i\", fpath, paths, ksmooth=0, )\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"angdist = angular_separation(\n",
|
|
|
|
" np.deg2rad(loader_carrick.cat[\"RA\"]), np.deg2rad(loader_carrick.cat[\"DEC\"]),\n",
|
|
|
|
" np.deg2rad(csiborgtools.clusters[\"Virgo\"].spherical_pos[1]),\n",
|
|
|
|
" np.deg2rad(csiborgtools.clusters[\"Virgo\"].spherical_pos[2]))\n",
|
|
|
|
"k = np.argmin(angdist)\n",
|
|
|
|
"print([loader_carrick.cat[\"RA\"][k], loader_carrick.cat[\"DEC\"][k]])\n",
|
|
|
|
"print(csiborgtools.clusters[\"Virgo\"].spherical_pos[1:])\n",
|
|
|
|
"print(csiborgtools.clusters[\"Virgo\"].spherical_pos[0])"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"loaders = [loader_carrick, loader_lilow, loader_CF4, loader_cb2, loader_cb2X, loader_CLONES]\n",
|
|
|
|
"simnames = [\"Carrick2015\", \"Lilow2024\", \"CF4\", \"csiborg2_main\", \"csiborg2X\", \"CLONES\"]\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"with plt.style.context(\"science\"):\n",
|
|
|
|
" plt.rcParams.update({'font.size': 9})\n",
|
|
|
|
" plt.figure()\n",
|
|
|
|
" cols = plt.rcParams['axes.prop_cycle'].by_key()['color']\n",
|
|
|
|
"\n",
|
|
|
|
" for i, (simname, loader) in enumerate(zip(simnames, loaders)):\n",
|
|
|
|
" r = loader.rdist\n",
|
|
|
|
" vrad = loader.los_radial_velocity[:, k, :]\n",
|
|
|
|
"\n",
|
|
|
|
" if simname == \"Carrick2015\":\n",
|
|
|
|
" vrad *= 0.43\n",
|
|
|
|
"\n",
|
|
|
|
" if len(vrad) > 1:\n",
|
|
|
|
" ylow, yhigh = np.percentile(vrad, [16, 84], axis=0)\n",
|
|
|
|
" plt.fill_between(r, ylow, yhigh, alpha=0.66, color=cols[i],\n",
|
|
|
|
" label=simname_to_pretty(simname))\n",
|
|
|
|
" else:\n",
|
|
|
|
" plt.plot(r, vrad[0], label=simname_to_pretty(simname), c=cols[i])\n",
|
|
|
|
"\n",
|
|
|
|
" plt.xlabel(r\"$r ~ [\\mathrm{Mpc} / h]$\")\n",
|
|
|
|
" plt.ylabel(r\"$V_{\\rm rad} ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
"\n",
|
|
|
|
" plt.xlim(0, 90)\n",
|
|
|
|
" plt.ylim(-1000, 1000)\n",
|
|
|
|
" plt.legend(ncols=2, fontsize=\"small\")\n",
|
|
|
|
" plt.axvline(12.045, zorder=0, c=\"k\", ls=\"--\", alpha=0.75)\n",
|
|
|
|
"\n",
|
|
|
|
" plt.tight_layout()\n",
|
|
|
|
" plt.savefig(\"../../plots/LOS_example.pdf\", dpi=450, bbox_inches='tight')\n",
|
|
|
|
" plt.show()"
|
|
|
|
]
|
|
|
|
},
|
2024-09-11 06:45:42 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### 1. Evidence comparison"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"zcmb_max = 0.05\n",
|
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
"sims = [\"Carrick2015\", \"Lilow2024\", \"csiborg2_main\", \"csiborg2X\", \"CLONES\", \"CF4\",]\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"catalogues = [\"LOSS\", \"Foundation\", \"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]\n",
|
|
|
|
"\n",
|
|
|
|
"y_BIC = np.full((len(catalogues), len(sims)), np.nan)\n",
|
|
|
|
"y_lnZ = np.full_like(y_BIC, np.nan)\n",
|
|
|
|
"\n",
|
|
|
|
"for i, catalogue in enumerate(catalogues):\n",
|
|
|
|
" for j, simname in enumerate(sims):\n",
|
|
|
|
" fname = paths.flow_validation(\n",
|
|
|
|
" fdir, simname, catalogue, inference_method=\"mike\",\n",
|
|
|
|
" sample_alpha=simname != \"IndranilVoid_exp\",\n",
|
|
|
|
" zcmb_max=zcmb_max)\n",
|
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" # y_BIC[i, j] = get_gof(\"BIC\", fname)z\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" y_lnZ[i, j] = get_gof(\"neg_lnZ_harmonic\", fname)\n",
|
|
|
|
"\n",
|
|
|
|
" y_lnZ[i] -= y_lnZ[i].min()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"with plt.style.context('science'):\n",
|
|
|
|
" plt.rcParams.update({'font.size': 9})\n",
|
|
|
|
" figwidth = 8.3\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" fig, axs = plt.subplots(2, 3, figsize=(figwidth, 0.5 * figwidth))\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" fig.subplots_adjust(hspace=0)\n",
|
|
|
|
"\n",
|
|
|
|
" x = np.arange(len(sims))\n",
|
|
|
|
" y = y_lnZ\n",
|
|
|
|
" for n in range(len(catalogues)):\n",
|
|
|
|
" i, j = n // 3, n % 3\n",
|
|
|
|
" ax = axs[i, j]\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" ax.text(0.1, 0.875, catalogue_to_pretty(catalogues[n]),\n",
|
|
|
|
" transform=ax.transAxes, #fontsize=\"small\",\n",
|
|
|
|
" verticalalignment='center', horizontalalignment='left',\n",
|
|
|
|
" bbox=dict(facecolor='white', alpha=0.5),\n",
|
|
|
|
" )\n",
|
|
|
|
" ax.scatter(x, y[n], c=\"k\", s=7.5)\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
|
|
|
" y_min, y_max = ax.get_ylim()\n",
|
|
|
|
" y_offset = (y_max - y_min) * 0.075 # Adjust the fraction (0.05) as needed\n",
|
|
|
|
"\n",
|
|
|
|
" for k, txt in enumerate(y[n]):\n",
|
|
|
|
" ax.text(x[k], y[n, k] + y_offset, f\"({y[n, k]:.1f})\",\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" ha='center', fontsize=\"small\")\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
|
|
|
" ax.set_ylim(y_min, y_max + 2 * y_offset)\n",
|
|
|
|
"\n",
|
|
|
|
" for i in range(3):\n",
|
|
|
|
" axs[1, i].set_xticks(\n",
|
|
|
|
" np.arange(len(sims)),\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" [simname_to_pretty(sim) for sim in sims], rotation=35)\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" axs[0, i].set_xticks([], [])\n",
|
|
|
|
"\n",
|
|
|
|
" for i in range(2):\n",
|
|
|
|
" for j in range(3):\n",
|
|
|
|
" axs[i, j].set_xlim(-0.75, len(sims) - 0.25)\n",
|
|
|
|
"\n",
|
|
|
|
" axs[i, j].tick_params(axis='x', which='major', top=False)\n",
|
|
|
|
" axs[i, j].tick_params(axis='x', which='minor', top=False, length=0)\n",
|
|
|
|
" axs[i, j].tick_params(axis='y', which='minor', length=0)\n",
|
|
|
|
"\n",
|
|
|
|
" axs[i, 0].set_ylabel(r\"$-\\Delta \\ln \\mathcal{Z}$\")\n",
|
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" fig.tight_layout()\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" fig.savefig(f\"../../plots/lnZ_comparison.pdf\", dpi=500, bbox_inches='tight')\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
" fig.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-09-11 06:45:42 +00:00
|
|
|
"### 2. Dependence of the evidence on smoothing scale"
|
2024-07-01 10:48:50 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-16 10:12:32 +00:00
|
|
|
"execution_count": 2,
|
2024-07-01 10:48:50 +00:00
|
|
|
"metadata": {},
|
2024-09-16 10:12:32 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_2MTF_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 15:27:56\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_2MTF_mike_smooth_1_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:32:04\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_2MTF_mike_smooth_2_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:35:10\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_2MTF_mike_smooth_3_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:35:08\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_2MTF_mike_smooth_4_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:34:31\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_SFI_gals_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 15:28:34\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_SFI_gals_mike_smooth_1_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:37:11\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_SFI_gals_mike_smooth_2_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:39:21\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_SFI_gals_mike_smooth_3_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:41:15\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_SFI_gals_mike_smooth_4_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:43:31\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_i_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 10:48:49\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_i_mike_smooth_1_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:44:13\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_i_mike_smooth_2_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:46:11\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_i_mike_smooth_3_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:46:57\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_i_mike_smooth_4_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:48:46\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_2MTF_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 12:03:40\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_2MTF_mike_smooth_1_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:52:24\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_2MTF_mike_smooth_2_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:53:39\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_2MTF_mike_smooth_3_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:58:54\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_2MTF_mike_smooth_4_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 11:59:21\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_SFI_gals_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 12:05:48\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_SFI_gals_mike_smooth_1_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 12:07:50\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_SFI_gals_mike_smooth_2_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 12:06:30\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_SFI_gals_mike_smooth_3_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 12:06:41\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_SFI_gals_mike_smooth_4_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 12:14:03\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_i_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:13:55\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_i_mike_smooth_1_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 12:20:28\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_i_mike_smooth_2_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 12:27:13\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_i_mike_smooth_3_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 12:32:47\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_i_mike_smooth_4_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 13/09/2024 12:36:56\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2024-07-01 10:48:50 +00:00
|
|
|
"source": [
|
2024-09-11 06:45:42 +00:00
|
|
|
"zcmb_max = 0.05\n",
|
|
|
|
"\n",
|
|
|
|
"ksmooth = [0, 1, 2, 3, 4]\n",
|
|
|
|
"scales = [0, 2, 4, 6, 8]\n",
|
|
|
|
"sims = [\"Carrick2015\", \"csiborg2_main\"]\n",
|
|
|
|
"catalogues = [\"2MTF\", \"SFI_gals\", \"CF4_TFR_i\"]\n",
|
|
|
|
"\n",
|
|
|
|
"y = np.full((len(sims), len(catalogues), len(ksmooth)), np.nan)\n",
|
|
|
|
"for i, simname in enumerate(sims):\n",
|
|
|
|
" for j, catalogue in enumerate(catalogues):\n",
|
|
|
|
" for n, k in enumerate(ksmooth):\n",
|
|
|
|
" fname = paths.flow_validation(\n",
|
|
|
|
" fdir, simname, catalogue, inference_method=\"mike\",\n",
|
|
|
|
" sample_alpha=True, smooth=k,\n",
|
|
|
|
" zcmb_max=zcmb_max)\n",
|
|
|
|
" if not exists(fname):\n",
|
|
|
|
" raise FileNotFoundError(fname)\n",
|
|
|
|
"\n",
|
|
|
|
" y[i, j, n] = get_gof(\"neg_lnZ_harmonic\", fname)\n",
|
|
|
|
"\n",
|
|
|
|
" y[i, j, :] -= y[i, j, :].min()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-16 10:12:32 +00:00
|
|
|
"execution_count": 3,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-16 10:12:32 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"Carrick2015 2MTF 322.1943359375\n",
|
|
|
|
"Carrick2015 SFI_gals 414.5947265625\n",
|
|
|
|
"Carrick2015 CF4_TFR_i 835.421875\n",
|
|
|
|
"csiborg2_main 2MTF 760.97265625\n",
|
|
|
|
"csiborg2_main SFI_gals 800.328125\n",
|
|
|
|
"csiborg2_main CF4_TFR_i 1914.80859375\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
|
|
|
"for i, simname in enumerate(sims):\n",
|
|
|
|
" for j, catalogue in enumerate(catalogues):\n",
|
|
|
|
" print(simname, catalogue, y[i, j, -1])"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-16 10:12:32 +00:00
|
|
|
"execution_count": 4,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-16 10:12:32 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
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NIFoY8VHiuac4OnU7z86UGf39XT9MaLZeFzh+RpDga1Wu3Mk2k0GlmzZk23/Joi07pg2LQ3woWPZMF0ULFP/h6z1CUmuSseK5pB3gGD8v4cvLn412w89ARFdSdICZs96nOaBoPBWTwN5OF6RkaGczW9KyLTumDIvH+HnLcSL8AOCm95iC4YMsIfHySx/hG8v/Qxqq4v4P2lj42qYDrIzc3tdmw2m/ssoiYyrQsGpKVGTvYL8tbGuz+XC5IFRMq7eNa84FLz3BWP9TQnIhqNhry8PFQqFRaLhQ0bNqBUKntkWu86ZIeemdhFnKYA05vw6fchdjnc/JZc6hbg9vdda9ckYNIlIRaZ2wUeTdNF+OQHYH4DEtbBtX+FkHhXW+V2iMztAoEnYGuFlzVgb4OVf4Gk9ZM+ecZYIzK3CwSTkboSCIwG32C4/jmIThaxlmOIWAgSCNwVuw2+/jO8thD2yzkJmHGTEMwxRniaAoE7YjkCux6C8i9g4fdh8SOutshjEKIpELgb9Wfg9SUQlgB3fuKxKdpcxZiLptVq7Rb+YjQaUSqVqFQq9u3bR3JyMkqlEoPBgNlsRqVSYTabnfuu+2oXCDwOy1GImAuhM0H3MiTcBj6BrrbK4xizOc2CggKys7NZs2ZNt/YtW7ag0WhITEx0CiiAXq8nIyODtLQ05/X9tQsEHkN7E+zOgu0L5VAigKR0IZguYsw8zbS0NGfmnq6kpqY691c7MBgM3bxRrVZLbm4uSqWy13aHgE5GHPvKNRqNM8g9OTnZ6ZX3l4z4ci88MzOzxy4jB44+UlNTUSqVZGdnk5GRgUajobCwkJSUFHQ63YDJjy9/3WQyodFouiUa6YuCggI
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 350x262.5 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
|
|
|
"with plt.style.context('science'):\n",
|
|
|
|
" plt.rcParams.update({'font.size': 9})\n",
|
|
|
|
" cols = plt.rcParams['axes.prop_cycle'].by_key()['color']\n",
|
|
|
|
" plt.figure()\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" ls = [\"-\", \"--\", \"-.\", \":\"]\n",
|
|
|
|
" for i, simname in enumerate(sims):\n",
|
|
|
|
" for j, catalogue in enumerate(catalogues):\n",
|
|
|
|
" plt.plot(scales, y[i, j], marker='o', ms=2.5, ls=ls[i],\n",
|
|
|
|
" label=catalogue_to_pretty(catalogue) if i == 0 else None, c=cols[j],)\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" plt.xlabel(r\"$R_{\\rm smooth} ~ [\\mathrm{Mpc} / h]$\")\n",
|
|
|
|
" plt.ylabel(r\"$-\\Delta \\ln \\mathcal{Z}$\")\n",
|
|
|
|
" plt.legend()\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" plt.tight_layout()\n",
|
|
|
|
" plt.savefig(\"../../plots/smoothing_comparison.pdf\", dpi=450)\n",
|
|
|
|
" plt.show()\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-09-12 15:04:25 +00:00
|
|
|
"### 3. External flow consistency"
|
2024-09-11 06:45:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-12 15:04:25 +00:00
|
|
|
"execution_count": 23,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-12 15:04:25 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:26:54\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:28:43\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:20:11\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:19:39\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:27:13\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:28:48\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:19:59\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:26:53\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:54:29\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 17:10:19\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:27:52\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:58:15\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:59:53\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 17:16:15\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:39:34\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:01:55\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 17:12:11\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 14:07:26\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:23:47\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:19:35\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:49:16\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:50:20\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:52:12\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:51:03\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
2024-09-12 15:04:25 +00:00
|
|
|
"sims = [\"Carrick2015\", \"Lilow2024\", \"csiborg2_main\", \"csiborg2X\", \"CF4\", \"CLONES\"]\n",
|
|
|
|
"# sims = [\"Carrick2015\", \"Lilow2024\", \"CF4\", \"csiborg2_main\", \"csiborg2X\"]\n",
|
|
|
|
"# cats = [[\"LOSS\", \"Foundation\"], \"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"cats = [\"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
"# cats = [\"2MTF\", \"SFI_gals\", \"CF4_TFR_not2MTForSFI_i\"]\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
"X = {}\n",
|
|
|
|
"\n",
|
|
|
|
"for sim in sims:\n",
|
|
|
|
" for cat in cats:\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" fname = paths.flow_validation(\n",
|
|
|
|
" fdir, sim, cat, inference_method=\"bayes\",\n",
|
|
|
|
" sample_alpha=True, zcmb_max=0.05)\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" if not exists(fname):\n",
|
|
|
|
" raise FileNotFoundError(fname)\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" with File(fname, 'r') as f:\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" X[f\"{sim}_{cat}\"] = np.linalg.norm(f[f\"samples/Vext\"][...], axis=1)"
|
2024-09-11 06:45:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-12 15:04:25 +00:00
|
|
|
"execution_count": 24,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-12 15:04:25 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
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d1DButRTITh4lVT+YUfTDo6OrDZbHz961/32yMOlKamJv74xz/S0dEx5jnOnz8PDCh1BkMpL1ACvV/duu7u62PTpk2eFoLeGqCYTCZWrFjhuXbWrl0bdBXKCWuVZGoTmBOeFoy5hAxf4RF3LziAFStWsHPnTtavX++RdCwoKGD9+vUeL2/Tpk3k5eX5faF5+8Jw6z8XFBSMWzNlUknJhMzp0QFn3bp17Ny5c4jh3rlzp+dGmgjeOqZMdVlzMElISCA1NXWqp+Ex2IPvs8F4uydBDIW6Na7z8/M90quAR75Xr9cPCVF4C52Ohq/7dXiXJbeA1WjjtLW1ee7xUCgh3rGLk76E1deuXeuJVeXn5w/poFJQUDBCUcxfhourb9q0adrE9WYKa9euHeFhe+vf56vTUUxMDDt27PA8Artvvk2bNnntmOJP5yNvXVWGd1Dat2+f5713ciMMN+Xl5YD4/xQTE+P5TEZrdjC4UYL7vcMbmhQVFbF582bP9ol8mQ+/X4cLyY31lLd7927P9eStgcdEua30uAPBl7B6eXm5x6CeP3+eLVu2UFBQgF6v9/xMVFx937595ObmYjQaA2qPJDEgrbtx40ZPnHE4bk+uqKiI1atXe56Y3I2ECwsLWb9+Pfv27eOll15i586dHsPg7QZzdz5yxyzdjYgHGxq3kdm8efMQI2MymTzGRK/Xs3bt2juyEcZg3F2dYED4q6ysbMxmB24lzl27dnltaPLmm28CeMIWJpOJgoICVqxYMeFmCIMN9eAGLN4Yfr1s2rSJHTt2eMTOgsEda7h94TbO7sc
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 350x291.5 with 4 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
|
|
|
"with plt.style.context('science'):\n",
|
|
|
|
" plt.rcParams.update({'font.size': 9})\n",
|
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
"\n",
|
|
|
|
" fig, axs = plt.subplots(2, 2, figsize=(3.5, 2.65 * 1.1))\n",
|
|
|
|
" fig.subplots_adjust(hspace=0, wspace=0)\n",
|
|
|
|
"\n",
|
|
|
|
" for k, cat in enumerate(cats):\n",
|
|
|
|
" i, j = k // 2, k % 2\n",
|
|
|
|
" ax = axs[i, j]\n",
|
|
|
|
"\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" for sim in sims:\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" sns.kdeplot(X[f\"{sim}_{cat}\"], fill=True, bw_adjust=0.75, ax=ax,\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" label=simname_to_pretty(sim) if i == 0 else None)\n",
|
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" ax.text(0.725, 0.85, catalogue_to_pretty(cat),\n",
|
|
|
|
" transform=ax.transAxes, fontsize=\"small\",\n",
|
|
|
|
" verticalalignment='center', horizontalalignment='center',\n",
|
|
|
|
" bbox=dict(facecolor='white', alpha=0.5, edgecolor='none'))\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" ax.set_ylabel(None)\n",
|
|
|
|
" ax.set_yticklabels([])\n",
|
|
|
|
" ax.set_xlim(0)\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" handles, labels = axs[0, 0].get_legend_handles_labels()\n",
|
|
|
|
" fig.legend(handles, labels, loc='upper center', bbox_to_anchor=(0.5, 1.1),\n",
|
|
|
|
" ncol=3)\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" for i in range(2):\n",
|
|
|
|
" axs[-1, i].set_xlabel(r\"$|\\mathbf{V}_{\\rm ext}| ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
" axs[i, 0].set_ylabel(\"Normalised PDF\")\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" fig.tight_layout()\n",
|
|
|
|
" fig.savefig(f\"../../plots/Vext_comparison.pdf\", dpi=450)\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" fig.show()"
|
2024-07-01 10:48:50 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-09-12 15:04:25 +00:00
|
|
|
"### 4. What $\\beta$ is preferred by the data? "
|
2024-09-11 06:45:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-12 15:04:25 +00:00
|
|
|
"execution_count": 25,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-12 15:04:25 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_LOSS_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:40:54\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_Foundation_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:41:00\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_2MTF_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:46:00\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_SFI_gals_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:43:45\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:45:45\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:50:00\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_LOSS_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 23:39:28\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_Foundation_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 23:50:52\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_2MTF_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 31/08/2024 00:00:28\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_SFI_gals_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 31/08/2024 00:11:47\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 07/09/2024 22:28:11\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 07/09/2024 22:21:46\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_LOSS_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 23:39:58\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_Foundation_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 23:45:08\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_2MTF_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 31/08/2024 00:07:52\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_SFI_gals_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 31/08/2024 00:13:49\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 07/09/2024 22:30:15\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 07/09/2024 22:10:20\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_LOSS_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:58:32\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_Foundation_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:18:50\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_2MTF_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:31:31\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_SFI_gals_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:23:06\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:49:59\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:37:20\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_LOSS_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:08:39\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_Foundation_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:31:31\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_2MTF_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:10:52\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_SFI_gals_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:14:59\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:19:05\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha_sample_beta.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:22:35\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
2024-09-12 15:04:25 +00:00
|
|
|
"sims = [\"Lilow2024\", \"csiborg2_main\", \"csiborg2X\", \"CF4\", \"CLONES\"]\n",
|
|
|
|
"cats = [\"LOSS\", \"Foundation\", \"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]\n",
|
|
|
|
"# cats = [\"2MTF\", \"SFI_gals\", \"CF4_TFR_not2MTForSFI_i\"]\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
"X = {}\n",
|
|
|
|
"for sim in sims:\n",
|
|
|
|
" for cat in cats:\n",
|
|
|
|
" fname = paths.flow_validation(\n",
|
|
|
|
" fdir, sim, cat, inference_method=\"bayes\",\n",
|
|
|
|
" sample_alpha=True, zcmb_max=0.05, sample_beta=True)\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" if not exists(fname):\n",
|
|
|
|
" raise FileNotFoundError(fname)\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" with File(fname, 'r') as f:\n",
|
|
|
|
" X[f\"{sim}_{cat}\"] = f[f\"samples/beta\"][...]"
|
2024-09-11 06:45:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-12 15:04:25 +00:00
|
|
|
"execution_count": 26,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-12 15:04:25 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAW8AAAIBCAYAAACGKj6jAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAADhDklEQVR4nOy9d3xU95nv/z7T+4xGvaBKB2OQcE81yOlOYiOz3s3WG0OSzd3d3F1MyN5td29iYJPN725JDKRsyoYYiJ04ie1Ywr2DBBjT0aghoTKarunl98doRhr1NqN23q+XXmhO+34Hfc/nPOf5Ps/zFWKxWAwRERERkUWFZL47ICIiIiIyfUTxFhEREVmEiOItIiIisggRxVtERERkESKKt4iIiMgiRBRvERERkUWIKN4iIiIiixBRvEVEREQWIaJ4i4iIiCxCRPEWERERWYSI4i0iIiKyCBHFW0RERGQRIoq3iIiIyCJENpuTO6wD9HsCc9WXMcnWKVmRo530uKqqKg4cOMCOHTtStjscDrKysrDb7ZhMJgRBIJOFFA8fPsyBAwcA2LFjR/L3BLW1tdhsNhobGzPWJwDc7eC3prcNVQ7oS9Pbhsi0cVrdeN3+tLah0asw5uindGxTUxOPPPIIFosFs9k85n0yX4x3/zY1NVFXVzdqO0BDQwOHDh3i+PHjyW0nTpxg7969AGzfvp1Dhw7Num8zFu8O6wA1X/0NvmBk1p2YCLVCSuP+T05JwMfCZDLR2NiIyWSa245NAYvFQn19Pc3NzTgcDmpqaqiqqmLXrl1AfADYbLaM9wt3OxxdB2FvetuRaeDhS5MKeG1tLadPn8Zut4/aV1NTg8PhoL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iXW1mQyJecLEv7m4RFFBw8eTJmgOnz4MHv37qWysjIpDMOPHx6RkIgGSMxNjEysGBm5NDwawmw2J/u9ULnZ0scP/u4XGQkV/LN/fpDCity0tDGXLLr7d5AZi/diSdIRGYMFlqQjkjkWWpKOyMyZsXjDwkqPF5kmYnr8smWhpceLzIxZibeIiIiIyPywpCYsRURERJYLoniLiIiILEJE8RYRERFZhIjiLSIiIrIImVV6fLuvF2vIOVd9GZMcuZFSdV5a21iW3GwHe5qjTbJyoHDq0SaJuseJ1OhEkkWm42/nst73eMX8E/HhDodjzorziywvZize7b5e1r3+P/BG0xsqqJEouXTP96cs4BMJQKKWSGVlZbIA0YEDB1JSVSdb+WZJcLMd7l8H/jTHeas08PSlKQl4IiPtwIEDySJFI0tvzpbJalAkmKt63+MV83/ooYd44oknkiUREtnAYlErkekwY/G2hpx4owG+VvEwZar0WMZt/l6+0XIUa8g5JfGeigAMr+k7vCBUQtAnWvlmyWC3xoX7ka9BUZoyLLva4Mg34m1NQbx3797Nrl27Uv6v59riHquu93hMp+2ZLMYxfImsea3pLrJomXVVwTJVHqu1JXPRl1kzXQFIrIiREPjJVr5ZchSVQdnCWIwhse7feIxXlH+itPjhBftXr17NiRMnaGpqSlrWU7luopxnombJ8ePHpyzsEy3GMfx7nT59OkXMRUSmwpKasGxoaJhy8RmHw8HBgwex2WxJS3ysIukjbzaRuWesesrDmago/2TXTdTePnr0aHKZqoRwT+W6J06cYPv27TQ3N9Pc3Dzjt4GRxfwhXsMlsRTeQq6HIrIwWTL1vCcTgAR79+5NThQllksai8TNNhdrzYlMTOJvNp5PerKi/BORqL09FlO5bnV1dbJKXGIhiNkuxpEgMbYSpYeX7BueSFpYMuI9mQAkGOnz3rZtG/v27Rtzua2RN5tI+khEXMz1BPFs/37bt2+nsbExucLLkSNHRk1kT7eY/0hqa2s5dOiQKN4i02JJuU2mG3JVWVn
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 350x477 with 6 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
|
|
|
"with plt.style.context('science'):\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" plt.rcParams.update({'font.size': 9})\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" fig, axs = plt.subplots(3, 2, figsize=(3.5, 2.65 * 1.8))\n",
|
|
|
|
" fig.subplots_adjust(hspace=0, wspace=0)\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" for k, cat in enumerate(cats):\n",
|
|
|
|
" i, j = k // 2, k % 2\n",
|
|
|
|
" ax = axs[i, j]\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" for sim in sims:\n",
|
|
|
|
" sns.kdeplot(X[f\"{sim}_{cat}\"], fill=True, bw_adjust=0.75, ax=ax,\n",
|
|
|
|
" label=simname_to_pretty(sim) if i == 0 else None)\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" ax.text(0.1, 0.85, catalogue_to_pretty(cat),\n",
|
|
|
|
" transform=ax.transAxes, fontsize=\"small\",\n",
|
|
|
|
" verticalalignment='center', horizontalalignment='left',\n",
|
|
|
|
" bbox=dict(facecolor='white', alpha=0.5, edgecolor='k')\n",
|
|
|
|
" )\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" ax.axvline(1, c=\"k\", ls=\"--\", alpha=0.75)\n",
|
|
|
|
" ax.set_ylabel(None)\n",
|
|
|
|
" ax.set_yticklabels([])\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" handles, labels = axs[0, 0].get_legend_handles_labels()\n",
|
|
|
|
" fig.legend(handles, labels, loc='upper center', bbox_to_anchor=(0.5, 1.075),\n",
|
|
|
|
" ncol=3)\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" # for i in range(3):\n",
|
|
|
|
" for j in range(2):\n",
|
|
|
|
" axs[-1, j].set_xlabel(r\"$\\beta$\")\n",
|
|
|
|
"\n",
|
|
|
|
" for i in range(3):\n",
|
|
|
|
" axs[i, 0].set_ylabel(\"Normalised PDF\")\n",
|
|
|
|
"\n",
|
|
|
|
" fig.tight_layout()\n",
|
|
|
|
" fig.savefig(f\"../../plots/beta_comparison.pdf\", dpi=450)\n",
|
|
|
|
" fig.show()"
|
2024-09-11 06:45:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-09-12 15:04:25 +00:00
|
|
|
"### 5. Bulk flow in the simulation rest frame "
|
2024-09-11 06:45:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-12 15:04:25 +00:00
|
|
|
"execution_count": 31,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-12 15:04:25 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAU0AAAD1CAYAAADUHqdoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAABlU0lEQVR4nO2dd3hcV5n/P9NHozYa9WZLI9txjyPbKQRS5QAhMSGRbQwk1FhL+cHuAnYclmVhFxwZdhe2sFgJLYEYR0ozaUSTHkixJcd24q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KfJc2my3yfYe37XuM8HHGWr7Bvu/Kysp+tnQWi2VEM5d169aRm5sbMW6ZDSYtc7tPUwmCuwWikslanIYSUqizN5GzfPwzzY2G7qCHE64LU3qOMEujszFpJmZGcrHj9sVUVlYOcNouLy+P9I2GJ0wL95MWFRWN++YNzyQZ/lHZbDY2b948q70x/V4/LXXOaTlXUoYZnUE34nYVFRXs2LGDTZs2RfoMw1NSjNY1fTjn9clyU+/7ffe1ixstxcXFOByOCd1zk80cF80QdJ0HyzKSMxMwROmpOd0w5aJ5wnWBtW9/fUrPEabi6v8lP278g1tDubn3ZSin7QcffJDS0tKIeIafhxmPG/u9995LeXl55AcY7vifzaLZUufkN99/fFrO9aV/vYv03OQRtwt/HyD+9G6++WYKCgrG5Jq+e/fuIZ3XB3NTt1qtE/q+ExMTx9RFEJ6SurS0FLvdzqZNm9i9e/eMDwbNadGsbfWy8Z5vs7XIwdatW8lclErNqan
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 350x262.5 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
2024-09-12 15:04:25 +00:00
|
|
|
"sims = [\"Carrick2015\", \"Lilow2024\", \"csiborg2_main\", \"csiborg2X\", \"CLONES\", \"CF4\"]\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"with plt.style.context('science'):\n",
|
|
|
|
" plt.rcParams.update({'font.size': 9})\n",
|
|
|
|
" cols = plt.rcParams['axes.prop_cycle'].by_key()['color']\n",
|
|
|
|
"\n",
|
|
|
|
" plt.figure()\n",
|
|
|
|
" for i, sim in enumerate(sims):\n",
|
|
|
|
" r, B = get_bulkflow_simulation(sim, convert_to_galactic=True)\n",
|
|
|
|
" B = B[..., 0]\n",
|
|
|
|
"\n",
|
|
|
|
" if sim == \"Carrick2015\":\n",
|
|
|
|
" B *= 0.43\n",
|
|
|
|
"\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" if sim in [\"Carrick2015\", \"Lilow2024\", \"CLONES\"]:\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" plt.plot(r, B[0], label=simname_to_pretty(sim), color=cols[i])\n",
|
|
|
|
" else:\n",
|
|
|
|
" ylow, yhigh = np.percentile(B, [16, 84], axis=0)\n",
|
|
|
|
" plt.fill_between(r, ylow, yhigh, alpha=0.5,\n",
|
|
|
|
" label=simname_to_pretty(sim), color=cols[i])\n",
|
|
|
|
"\n",
|
|
|
|
" plt.xlabel(r\"$R ~ [\\mathrm{Mpc} / h]$\")\n",
|
|
|
|
" plt.ylabel(r\"$|\\mathbf{B}| ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
" plt.xlim(5, 200)\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" plt.legend(ncols=2)\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
|
|
|
" plt.tight_layout()\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" plt.savefig(\"../../plots/bulkflow_simulations_restframe.pdf\", dpi=450)\n",
|
|
|
|
" plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-09-12 15:04:25 +00:00
|
|
|
"### 6. Bulk flow in the CMB frame"
|
2024-09-11 06:45:42 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-16 10:12:32 +00:00
|
|
|
"execution_count": 5,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-16 10:12:32 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:26:54\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:28:43\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:20:11\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:19:39\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:27:13\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:28:48\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:19:59\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Lilow2024_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:26:53\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:54:29\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 17:10:19\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:27:52\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2_main_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 12:58:15\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 16:59:53\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 17:16:15\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:39:34\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:01:55\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:49:16\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:50:20\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:52:12\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CLONES_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:51:03\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_2MTF_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 17:12:11\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_SFI_gals_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 14:07:26\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_CF4_TFR_i_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:23:47\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_CF4_CF4_TFR_w1_bayes_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 13:19:35\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
2024-09-16 10:12:32 +00:00
|
|
|
"sims = [\"Carrick2015\", \"Lilow2024\", \"csiborg2_main\", \"csiborg2X\", \"CLONES\", \"CF4\"]\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"# cats = [[\"LOSS\", \"Foundation\"], \"2MTF\", \"SFI_gals\", \"CF4_TFR_i\"]\n",
|
|
|
|
"cats = [\"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"data = {}\n",
|
|
|
|
"for sim in sims:\n",
|
|
|
|
" for cat in cats:\n",
|
|
|
|
" fname = paths.flow_validation(\n",
|
|
|
|
" fdir, sim, cat, inference_method=\"bayes\",\n",
|
|
|
|
" sample_alpha=True, zcmb_max=0.05)\n",
|
|
|
|
" data[f\"{sim}_{cat}\"] = get_bulkflow(fname, sim)\n",
|
|
|
|
"\n",
|
|
|
|
"def get_ax_centre(ax):\n",
|
|
|
|
" # Get the bounding box of the specific axis in relative figure coordinates\n",
|
|
|
|
" bbox = ax.get_position()\n",
|
|
|
|
"\n",
|
|
|
|
" # Extract the position and size of the axis\n",
|
|
|
|
" x0, y0, width, height = bbox.x0, bbox.y0, bbox.width, bbox.height\n",
|
|
|
|
"\n",
|
|
|
|
" # Calculate the center of the axis\n",
|
|
|
|
" center_x = x0 + width / 2\n",
|
|
|
|
" center_y = y0 + height / 2\n",
|
|
|
|
" return center_x, center_y"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-16 10:12:32 +00:00
|
|
|
"execution_count": 17,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-16 10:12:32 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAw0AAAPzCAYAAAD1eeCJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6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6bzWK32+9oH+Y21tcY7qdt3M7rs9ksmUym/LhYLKJp2m2PYUmIDcLnP//5FVlntbexHsZwP21jPYxhPW2jpqbmjrdxr3Cr87Ve3pP1sI31MIb7aRvrYQxCbKzr/VbHul7ek/tlG+thDPfTNlZiDFar9Y63cSvM8KRZfOUrX7nr21gPY1gp1sOxrIcxrBQrMY47nbm8n1gvn431so31MIb7aRvrYQzm9X6d9fK5WC/bWA9juJ+2sR7G4HA4VmAkiyMJIcSq72Ud8NRTT/HDH/7wbg/jnsE8XyvLejmf62Uca8FGOtY7xTxXK8t6OZ/rZRxrQW1tLWNjY3d7GPcMG+mzsRash/O5FteA6WkwmZf1oLzvJ8zzabKeMT+fK4t5Pk3WO+ZndGXZKOfTFA0m87JRLoC1wjyfJusZ8/O5spjn02S9Y35GV5aNcj5N0WBiYnJfMjw8zFNPPcWLL754t4diYrKmvPjiizz11FMMDw/f7aGYmJjcR2yYkqsmJiYbi4aGhrseY2picjf4yle+wh/90R/x2c9/7m4PxcTEZJV58cUXefHFF8lms6u+rw0jGkJXrvLUU0/xla98ZcO4kUxMSpRuKubMo4nJ/YcQgnAhwWhumrF8hKHsFJfSw5xNXb3bQ1s7tDxoOVBsd3skJiZrSsmura2tXfV9bRjRkJI9/E/
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 830x1037.5 with 24 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
|
|
|
"with plt.style.context('science'):\n",
|
|
|
|
" plt.rcParams.update({'font.size': 9})\n",
|
|
|
|
" nrows = len(sims)\n",
|
|
|
|
" ncols = 3\n",
|
|
|
|
"\n",
|
|
|
|
" figwidth = 8.3\n",
|
2024-09-16 10:12:32 +00:00
|
|
|
" fig, axs = plt.subplots(nrows, ncols, figsize=(figwidth, 1.25 * figwidth), sharex=True, )\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" cols = plt.rcParams['axes.prop_cycle'].by_key()['color']\n",
|
|
|
|
" # fig.suptitle(f\"Calibrated against {catalogue}\")\n",
|
|
|
|
"\n",
|
|
|
|
" for i, sim in enumerate(sims):\n",
|
|
|
|
" for j, catalogue in enumerate(cats):\n",
|
|
|
|
" r, B = data[f\"{sim}_{catalogue}\"]\n",
|
|
|
|
" c = cols[j]\n",
|
|
|
|
" for n in range(3):\n",
|
|
|
|
" ylow, ymed, yhigh = np.percentile(B[..., n], [16, 50, 84], axis=-1)\n",
|
|
|
|
" axs[i, n].fill_between(\n",
|
2024-09-16 10:12:32 +00:00
|
|
|
" r, ylow, yhigh, alpha=0.5, color=c, edgecolor=c,\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
" label=catalogue_to_pretty(catalogue) if i == 1 else None)\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
" # CMB-LG velocity\n",
|
|
|
|
" kwargs = {\"color\": \"mediumblue\", \"alpha\": 0.5, \"zorder\": 10, \"hatch\": \"x\"}\n",
|
|
|
|
" for n in range(len(sims)):\n",
|
|
|
|
" axs[n, 0].fill_between([r.min(), 15.], [627 - 22, 627 - 22], [627 + 22, 627 + 22], label=\"CMB-LG\" if n == 0 else None, **kwargs)\n",
|
|
|
|
" axs[n, 1].fill_between([r.min(), 15.], [276 - 3, 276 - 3], [276 + 3, 276 + 3], **kwargs)\n",
|
|
|
|
" axs[n, 2].fill_between([r.min(), 15.], [30 - 3, 30 - 3], [30 + 3, 30 + 3], **kwargs)\n",
|
|
|
|
"\n",
|
|
|
|
" # LCDM expectation\n",
|
|
|
|
" Rs,mean,std,mode,p05,p16,p84,p95 = np.load(\"/mnt/users/rstiskalek/csiborgtools/data/BulkFlowPlot.npy\")\n",
|
|
|
|
" m = Rs < 175\n",
|
|
|
|
" kwargs = {\"color\": \"black\", \"zorder\": 0, \"hatch\": \"//\", \"alpha\": 0.25}\n",
|
|
|
|
" for n in range(len(sims)):\n",
|
|
|
|
" axs[n, 0].fill_between(\n",
|
|
|
|
" Rs[m], p16[m], p84[m],\n",
|
|
|
|
" label=r\"$\\Lambda\\mathrm{CDM}$\" if n == 0 else None, **kwargs)\n",
|
|
|
|
"\n",
|
|
|
|
" for n in range(3):\n",
|
|
|
|
" axs[-1, n].set_xlabel(r\"$R ~ [\\mathrm{Mpc} / h]$\")\n",
|
|
|
|
"\n",
|
|
|
|
" for n in range(len(sims)):\n",
|
|
|
|
" axs[n, 0].set_ylabel(r\"$|\\mathbf{B}| ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
" axs[n, 1].set_ylabel(r\"$\\ell ~ [\\mathrm{deg}]$\")\n",
|
|
|
|
" axs[n, 2].set_ylabel(r\"$b ~ [\\mathrm{deg}]$\")\n",
|
|
|
|
"\n",
|
|
|
|
" for i, sim in enumerate(sims):\n",
|
2024-09-16 10:12:32 +00:00
|
|
|
" ax = axs[i, -1].twinx()\n",
|
|
|
|
" ax.set_ylabel(simname_to_pretty(sim), rotation=270, labelpad=7.5)\n",
|
|
|
|
" ax.set_yticklabels([])\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
|
|
|
" axs[0, 0].set_xlim(r.min(), r.max())\n",
|
|
|
|
"\n",
|
|
|
|
" axs[0, 0].legend()\n",
|
|
|
|
" handles, labels = axs[1, 0].get_legend_handles_labels() # get the labels from the first axis\n",
|
2024-09-16 10:12:32 +00:00
|
|
|
" fig.legend(handles, labels, loc='upper center', bbox_to_anchor=(0.5, 0.975), ncol=len(cats) + 2)\n",
|
2024-09-11 06:45:42 +00:00
|
|
|
"\n",
|
|
|
|
" fig.tight_layout(rect=[0, 0, 0.95, 0.95])\n",
|
|
|
|
" fig.savefig(f\"../../plots/bulkflow_CMB.pdf\", dpi=450)\n",
|
|
|
|
" fig.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### 8. Full vs Delta comparison"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"catalogue = \"CF4_TFR_i\"\n",
|
|
|
|
"simname = \"csiborg2X\"\n",
|
|
|
|
"zcmb_max=0.05\n",
|
|
|
|
"sample_beta = True\n",
|
|
|
|
"sample_alpha = True\n",
|
|
|
|
"\n",
|
|
|
|
"fname_bayes = paths.flow_validation(\n",
|
|
|
|
" fdir, simname, catalogue, inference_method=\"bayes\",\n",
|
|
|
|
" sample_alpha=sample_alpha, sample_beta=sample_beta,\n",
|
|
|
|
" zcmb_max=zcmb_max)\n",
|
|
|
|
"\n",
|
|
|
|
"fname_mike = paths.flow_validation(\n",
|
|
|
|
" fdir, simname, catalogue, inference_method=\"mike\",\n",
|
|
|
|
" sample_alpha=sample_alpha, sample_beta=sample_beta,\n",
|
|
|
|
" zcmb_max=zcmb_max)\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"X = []\n",
|
|
|
|
"labels = [\"Full posterior\", \"Delta posterior\"]\n",
|
|
|
|
"for i, fname in enumerate([fname_bayes, fname_mike]):\n",
|
|
|
|
" samples = get_samples(fname)\n",
|
|
|
|
" if i == 1:\n",
|
|
|
|
" print(samples.keys())\n",
|
|
|
|
"\n",
|
|
|
|
" X.append(samples_to_getdist(samples, labels[i]))"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"params = [f\"a_{catalogue}\", f\"b_{catalogue}\", f\"c_{catalogue}\", f\"e_mu_{catalogue}\",\n",
|
|
|
|
" \"Vmag\", \"l\", \"b\", \"sigma_v\", \"beta\", f\"alpha_{catalogue}\"]\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",
|
|
|
|
" plt.rcParams.update({'font.size': 11})\n",
|
|
|
|
" g = plots.get_subplot_plotter()\n",
|
|
|
|
" g.settings.figure_legend_frame = False\n",
|
|
|
|
" g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
" g.settings.fontsize = 12\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().savefig(f\"../../plots/method_comparison_{simname}_{catalogue}.pdf\", dpi=300, bbox_inches='tight')"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
},
|
2024-09-12 15:04:25 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## Guilhem plots"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Manticore vs linear comparison"
|
|
|
|
]
|
|
|
|
},
|
2024-09-11 06:45:42 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-12 15:04:25 +00:00
|
|
|
"execution_count": 8,
|
2024-09-11 06:45:42 +00:00
|
|
|
"metadata": {},
|
2024-09-12 15:04:25 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_LOSS_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 13:18:58\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_LOSS_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 13:20:05\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_Foundation_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 13:18:47\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_Foundation_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 13:19:50\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_2MTF_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 15:27:56\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_2MTF_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 30/08/2024 12:04:05\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_i_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 10:48:49\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_CF4_TFR_i_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:12:57\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_Carrick2015_CF4_TFR_w1_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 10:48:29\n",
|
|
|
|
"File: /mnt/extraspace/rstiskalek/csiborg_postprocessing/peculiar_velocity/samples_csiborg2X_CF4_TFR_w1_mike_zcmb_max_0.05_sample_alpha.hdf5\n",
|
|
|
|
"Last modified: 12/09/2024 11:07:55\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"zcmb_max = 0.05\n",
|
|
|
|
"\n",
|
|
|
|
"sims = [\"Carrick2015\", \"csiborg2X\"]\n",
|
|
|
|
"catalogues = [\"LOSS\", \"Foundation\", \"2MTF\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]\n",
|
|
|
|
"\n",
|
|
|
|
"y_lnZ = np.full((len(catalogues), len(sims)), np.nan)\n",
|
|
|
|
"\n",
|
|
|
|
"for i, catalogue in enumerate(catalogues):\n",
|
|
|
|
" for j, simname in enumerate(sims):\n",
|
|
|
|
" fname = paths.flow_validation(\n",
|
|
|
|
" fdir, simname, catalogue, inference_method=\"mike\",\n",
|
|
|
|
" sample_alpha=simname != \"IndranilVoid_exp\",\n",
|
|
|
|
" zcmb_max=zcmb_max)\n",
|
|
|
|
"\n",
|
|
|
|
" y_lnZ[i, j] = - get_gof(\"neg_lnZ_harmonic\", fname)\n",
|
|
|
|
"\n",
|
|
|
|
" # y_lnZ[i] -= y_lnZ[i].min()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-16 10:12:32 +00:00
|
|
|
"execution_count": 33,
|
2024-09-12 15:04:25 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
2024-09-16 10:12:32 +00:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAUsAAAD1CAYAAADZANcvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAqa0lEQVR4nO3de1yUddo/8M9ogogKDFiWh2K0PLbJBFu7rnlgWFYt1gJEy9x6FNTK8umRU7lPW3lC3ayeVhkxzdxCBKkoa5XB0yYewMEziTGQiAfUmQEUBGS+vz/4zb2SKDPIMMPweb9eveKeuWfmAvXie7ju65YJIQSIiOiOOtk7ACKi9oDJkojIAkyWREQWYLIkIrLAPbb+gLS0NOj1ehQWFsJoNEKtVgMANBoNdDod5HI5dDodYmJibB0KEVGLyWy5G67T6ZCWliYlwvDwcAQEBCAmJgZBQUHIzMwEACxbtgwKhQJhYWFNvs+wYcMwYMAAW4VJRITCwkKcOHHits/bdGRpNBqRkpIiJcuAgABkZmZCqVTC09NTOk+pVEKtVt82WQ4YMAAZGRm2DJWIOriQkJA7Pm/TZKlUKnHo0CHpuLCwEEqlElqtFnK5XHpcLpdDq9Xe9n1KS0sbfSNTp07F1KlTbRM0EXUIycnJSE5Olo5LS0vveL7N1yzNjEYjNBoNDh06hCVLllj12j59+nBkSUSt6teDruZGlm22Gx4ZGYnMzEx4enrC29u7rT6WiKhVtEmyXLZsGRISEqBQKKDT6aBUKqHX66Xn9Xo9lEplW4RCRNQiNk+WaWlpUKlUUCgUABpKhlQqFXQ6nXSOVqtFRESErUMhImoxmyZLnU6H8PBwPP7445DJZJDJZDAajQCAhIQELFu2DGlpaQBw251wIiJHYNMNHoVCgduVcapUKqhUKlt+PBHZ2PDgSHuHYLXj25Ja9Dpe7khEZAEmSyIiC7SLZ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0KFDkMvl0Ov1FhelG43GRneE1Gg00Ol0kMvl0Ol0iImJsTYMIqI21aKi9MzMTGRmZja7G56WlobY2NhbEmpCQgKioqIQFhYmnUdE5MisHlkCsLgoPSwsDEqlEhqNRnpMo9E0GmUqlUqo1WopcRIROSKrR5Zz5syRvk5PT7f6A7VaLeRyuXQsl8uh1Wqtfh8iorZk9cjybkeAV65csfo15qJ0M3ZMJ6K7Ze6QbtbqRemZmZkoLy8HAOTk5Fh9Swlvb28YjUarXsOidCJqbb8edDVXlG71NHzp0qUoLCyETqfDkiVLrA5QqVQ2KjnS6/VQKpVWvw8RUVtq0W0loqOjMX/+fBQXF1v9WpVKBZ1OJx1rtVqp8zoRkaOyeBq+YsUKzJ8/H3/84x/h5eUFIQSKioqQk5Nz29doNBpkZmZCp9NhzZo1UKlUUCgUSEhIwLJly6BQKADc/TooEZGtWX13x5vv5tgWd3YEeHdHIkfFuzvegTk5Hj58GN7e3ta+nIioXbI6WZprK0eMGNGo2JyIyJlZVTo0e/Zs5ObmIiUlBQAQEBBgk6CIiByNVckyISEBOp1Oav7bVsxF6SxGJ6LWZi5Ob9WidA8PjzZPlACL0onIdmzWKT0vL0+ahufl5WHbtm0ti5CIqB2xOllqNBrMmjVL+pqIqCOwOlkOGDBAKh8KCgpq9YCIiByR1aVDixcvlm6Fy2RJRB1Fu7gVLhGRvVk9sjQnyoqKCuTl5bV6QEREjqhFI0u1Wg25XA4vLy+r+1kSEbVHLdrgycrKAgDk5ua2ekBNYVE6EdmKpUXpVk/Dt2/fDplMhtjY2DYrHTIXpTNRElFrmzp1KjIyMtCnT587nmf1yHLp0qUAgNjY2EZNfImInJnFybK4uBgPPfSQdOzr6wuZTGa
|
2024-09-12 15:04:25 +00:00
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 350x262.5 with 1 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"source": [
|
|
|
|
"bayes_factor = y_lnZ[:, 1] - y_lnZ[:, 0]\n",
|
|
|
|
"\n",
|
|
|
|
"with plt.style.context('science'):\n",
|
|
|
|
" plt.rcParams.update({'font.size': 9})\n",
|
|
|
|
"\n",
|
|
|
|
" plt.figure()\n",
|
|
|
|
"\n",
|
2024-09-16 10:12:32 +00:00
|
|
|
" sns.barplot(x=np.arange(len(catalogues)), y=bayes_factor / np.log(10), color=\"#21456D\")\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" plt.xticks(\n",
|
|
|
|
" np.arange(len(catalogues)),\n",
|
|
|
|
" [catalogue_to_pretty(cat) for cat in catalogues],\n",
|
|
|
|
" rotation=35, fontsize=\"small\", minor=False)\n",
|
2024-09-16 10:12:32 +00:00
|
|
|
" plt.ylabel(r\"$\\log \\left(\\mathcal{Z}_{\\rm Manticore} / \\mathcal{Z}_{\\rm linear}\\right)$\")\n",
|
2024-09-12 15:04:25 +00:00
|
|
|
" plt.tick_params(axis='x', which='both', bottom=False, top=False)\n",
|
|
|
|
"\n",
|
|
|
|
" plt.tight_layout()\n",
|
|
|
|
" plt.savefig(\"../../plots/manticore_vs_carrick.png\", dpi=450)\n",
|
|
|
|
" plt.show()"
|
|
|
|
]
|
2024-09-11 06:45:42 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## All possible things"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Dipole magnitude"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"cats = [\"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]\n",
|
|
|
|
"sim = \"IndranilVoid_gauss\"\n",
|
|
|
|
"\n",
|
|
|
|
"X = []\n",
|
|
|
|
"for cat in cats:\n",
|
|
|
|
" fname = paths.flow_validation(\n",
|
|
|
|
" fdir, sim, cat, inference_method=\"mike\",\n",
|
|
|
|
" sample_mag_dipole=False,\n",
|
|
|
|
" sample_alpha=False, zcmb_max=0.05)\n",
|
|
|
|
" \n",
|
|
|
|
" if not exists(fname):\n",
|
|
|
|
" raise FileNotFoundError(fname)\n",
|
|
|
|
"\n",
|
|
|
|
" samples = get_samples(fname, convert_Vext_to_galactic=False)\n",
|
|
|
|
"\n",
|
|
|
|
" # keys = list(samples.keys())\n",
|
|
|
|
" # for key in keys:\n",
|
|
|
|
" # if cat in key:\n",
|
|
|
|
" # value = samples.pop(key)\n",
|
|
|
|
" # samples[key.replace(f\"_{cat}\",'')] = value\n",
|
|
|
|
" \n",
|
|
|
|
" samples = samples_to_getdist(samples, catalogue_to_pretty(cat))\n",
|
|
|
|
" X.append(samples)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"# params = [\"Vmag\", \"l\", \"b\", \"a_dipole_mag\", \"a_dipole_l\", \"a_dipole_b\"]\n",
|
|
|
|
"params = [\"Vx\", \"Vy\", \"Vz\"]\n",
|
|
|
|
"# params = [\"Vmag\", \"l\", \"b\"]\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(cat), y=1.025)\n",
|
|
|
|
" plt.gcf().tight_layout()\n",
|
|
|
|
" plt.gcf().savefig(f\"../../plots/vext_{sim}.png\", dpi=500, bbox_inches='tight')"
|
2024-07-01 10:48:50 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Flow | catalogue"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"catalogues = [\"LOSS\", \"Foundation\", \"Pantheon+\", \"2MTF\", \"SFI_gals\"]\n",
|
|
|
|
"sims = [\"Carrick2015\", \"csiborg2_main\", \"csiborg2X\"]\n",
|
|
|
|
"params = [\"Vmag\", \"beta\", \"sigma_v\"]\n",
|
|
|
|
"\n",
|
|
|
|
"for catalogue in catalogues:\n",
|
|
|
|
" X = [samples_to_getdist(get_samples(sim, catalogue), sim)\n",
|
|
|
|
" for sim in sims]\n",
|
|
|
|
"\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(f'{catalogue}', y=1.025)\n",
|
|
|
|
" plt.gcf().tight_layout()\n",
|
2024-07-05 10:28:06 +00:00
|
|
|
" plt.gcf().savefig(f\"../../plots/calibration_{catalogue}.png\", dpi=500, bbox_inches='tight')\n"
|
2024-07-01 10:48:50 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Flow | simulation"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"catalogues = [\"Pantheon+\", \"2MTF\", \"SFI_gals\"]\n",
|
|
|
|
"sims = [\"Carrick2015\", \"csiborg2_main\", \"csiborg2X\"]\n",
|
2024-07-05 10:28:06 +00:00
|
|
|
"params = [\"Vmag\", \"l\", \"b\", \"beta\", \"sigma_v\"]\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
|
|
|
"for sim in sims:\n",
|
|
|
|
" X = [samples_to_getdist(get_samples(sim, catalogue), sim, catalogue)\n",
|
|
|
|
" for catalogue in catalogues]\n",
|
|
|
|
"\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(f'{sim}', y=1.025)\n",
|
|
|
|
" plt.gcf().tight_layout()\n",
|
|
|
|
" plt.gcf().savefig(f\"../../plots/calibration_{sim}.png\", dpi=500, bbox_inches='tight')\n",
|
|
|
|
" plt.gcf().show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Stacking vs marginalising CB boxes\n",
|
|
|
|
"\n",
|
|
|
|
"#### $V_{\\rm ext}$"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"sim = \"csiborg2X\"\n",
|
|
|
|
"catalogue = \"2MTF\"\n",
|
|
|
|
"key = \"Vext\"\n",
|
|
|
|
"\n",
|
|
|
|
"X = [get_samples(sim, catalogue, nsim=nsim, convert_Vext_to_galactic=False)[key] for nsim in range(20)]\n",
|
|
|
|
"Xmarg = get_samples(sim, catalogue, convert_Vext_to_galactic=False)[key]\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"fig, axs = plt.subplots(1, 3, figsize=(15, 5), sharey=True)\n",
|
|
|
|
"fig.suptitle(f\"{simname_to_pretty(sim)}, {catalogue}\")\n",
|
|
|
|
"fig.subplots_adjust(wspace=0.0, hspace=0)\n",
|
|
|
|
"\n",
|
|
|
|
"for i in range(3):\n",
|
|
|
|
" for n in range(20):\n",
|
|
|
|
" axs[i].hist(X[n][:, i], bins=\"auto\", alpha=0.25, histtype='step',\n",
|
|
|
|
" color='black', linewidth=0.5, density=1, zorder=0,\n",
|
|
|
|
" label=\"Individual box\" if (n == 0 and i == 0) else None)\n",
|
|
|
|
"\n",
|
|
|
|
"axs[i].hist(np.hstack([X[n][:, i] for n in range(20)]), bins=\"auto\",\n",
|
|
|
|
" histtype='step', color='blue', density=1,\n",
|
|
|
|
" label=\"Stacked individual boxes\" if i == 0 else None)\n",
|
|
|
|
"axs[i].hist(Xmarg[:, i], bins=\"auto\", histtype='step', color='red',\n",
|
|
|
|
" density=1, label=\"Marginalised boxes\" if i == 0 else None)\n",
|
|
|
|
" \n",
|
|
|
|
"axs[0].legend(fontsize=\"small\", loc='upper left', frameon=False)\n",
|
|
|
|
"\n",
|
|
|
|
"axs[0].set_xlabel(r\"$V_{\\mathrm{ext}, x} ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
"axs[1].set_xlabel(r\"$V_{\\mathrm{ext}, y} ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
"axs[2].set_xlabel(r\"$V_{\\mathrm{ext}, z} ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
"axs[0].set_ylabel(\"Normalized PDF\")\n",
|
|
|
|
"fig.tight_layout()\n",
|
|
|
|
"fig.savefig(f\"../../plots/consistency_{sim}_{catalogue}_{key}.png\", dpi=450)\n",
|
|
|
|
"fig.show()\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"#### $\\beta$ and others"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-07-03 08:50:21 +00:00
|
|
|
"execution_count": null,
|
2024-07-01 10:48:50 +00:00
|
|
|
"metadata": {},
|
2024-07-03 08:50:21 +00:00
|
|
|
"outputs": [],
|
2024-07-01 10:48:50 +00:00
|
|
|
"source": [
|
|
|
|
"sim = \"csiborg2_main\"\n",
|
|
|
|
"catalogue = \"Pantheon+\"\n",
|
2024-07-05 10:28:06 +00:00
|
|
|
"key = \"alpha\"\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
|
|
|
"X = [get_samples(sim, catalogue, nsim=nsim, convert_Vext_to_galactic=False)[key] for nsim in range(20)]\n",
|
|
|
|
"Xmarg = get_samples(sim, catalogue, convert_Vext_to_galactic=False)[key]\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"plt.figure()\n",
|
|
|
|
"plt.title(f\"{simname_to_pretty(sim)}, {catalogue}\")\n",
|
|
|
|
"for n in range(20):\n",
|
|
|
|
" plt.hist(X[n], bins=\"auto\", alpha=0.25, histtype='step',\n",
|
|
|
|
" color='black', linewidth=0.5, density=1, zorder=0,\n",
|
|
|
|
" label=\"Individual box\" if n == 0 else None)\n",
|
|
|
|
"\n",
|
|
|
|
"plt.hist(np.hstack([X[n] for n in range(20)]), bins=\"auto\",\n",
|
|
|
|
" histtype='step', color='blue', density=1,\n",
|
|
|
|
" label=\"Stacked individual boxes\")\n",
|
|
|
|
"plt.hist(Xmarg, bins=\"auto\", histtype='step', color='red',\n",
|
|
|
|
" density=1, label=\"Marginalised boxes\")\n",
|
|
|
|
"\n",
|
|
|
|
"plt.legend(fontsize=\"small\", frameon=False, loc='upper left', ncols=3)\n",
|
|
|
|
"plt.xlabel(names_to_latex([key], True)[0])\n",
|
|
|
|
"plt.ylabel(\"Normalized PDF\")\n",
|
|
|
|
"\n",
|
|
|
|
"plt.tight_layout()\n",
|
|
|
|
"plt.savefig(f\"../../plots/consistency_{sim}_{catalogue}_{key}.png\", dpi=450)\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### SN/TFR Calibration consistency"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"# catalogues = [\"LOSS\", \"Foundation\", \"Pantheon+\", \"2MTF\", \"SFI_gals\"]\n",
|
|
|
|
"catalogues = [\"Pantheon+\"]\n",
|
|
|
|
"sims = [\"Carrick2015\", \"csiborg2_main\", \"csiborg2X\"]\n",
|
|
|
|
"\n",
|
|
|
|
"for catalogue in catalogues:\n",
|
|
|
|
" X = [samples_to_getdist(get_samples(sim, catalogue), sim)\n",
|
|
|
|
" for sim in sims]\n",
|
|
|
|
"\n",
|
|
|
|
" if \"Pantheon+\" in catalogue or catalogue in [\"Foundation\", \"LOSS\"]:\n",
|
|
|
|
" params = [\"alpha_cal\", \"beta_cal\", \"mag_cal\", \"e_mu\"]\n",
|
|
|
|
" else:\n",
|
|
|
|
" params = [\"aTF\", \"bTF\", \"e_mu\"]\n",
|
|
|
|
"\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(f'{catalogue}', y=1.025)\n",
|
|
|
|
" plt.gcf().tight_layout()\n",
|
|
|
|
" # plt.gcf().savefig(f\"../../plots/calibration_{catalogue}.png\", dpi=500, bbox_inches='tight')"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-07-03 08:50:21 +00:00
|
|
|
"### $V_{\\rm ext}$ comparison"
|
2024-07-01 10:48:50 +00:00
|
|
|
]
|
|
|
|
},
|
2024-07-03 08:50:21 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-07-05 10:28:06 +00:00
|
|
|
"execution_count": null,
|
2024-07-03 08:50:21 +00:00
|
|
|
"metadata": {},
|
2024-07-05 10:28:06 +00:00
|
|
|
"outputs": [],
|
2024-07-03 08:50:21 +00:00
|
|
|
"source": [
|
|
|
|
"catalogues = [\"LOSS\"]\n",
|
|
|
|
"# sims = [\"Carrick2015\", \"csiborg2_main\", \"csiborg2X\"]\n",
|
|
|
|
"sims = [\"Carrick2015\"]\n",
|
|
|
|
"params = [\"Vmag\", \"l\", \"b\"]\n",
|
|
|
|
"\n",
|
|
|
|
"for sim in sims:\n",
|
|
|
|
" X = [samples_to_getdist(get_samples(sim, catalogue), sim, catalogue)\n",
|
|
|
|
" for catalogue in catalogues]\n",
|
|
|
|
"\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(f'{simname_to_pretty(sim)}', y=1.025)\n",
|
|
|
|
" plt.gcf().tight_layout()\n",
|
|
|
|
" # plt.gcf().savefig(f\"../../plots/calibration_{sim}.png\", dpi=500, bbox_inches='tight')\n",
|
|
|
|
" plt.gcf().show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Bulk flow in the simulation rest frame"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-07-05 10:28:06 +00:00
|
|
|
"execution_count": null,
|
2024-07-03 08:50:21 +00:00
|
|
|
"metadata": {},
|
2024-07-05 10:28:06 +00:00
|
|
|
"outputs": [],
|
2024-07-03 08:50:21 +00:00
|
|
|
"source": [
|
|
|
|
"sims = [\"Carrick2015\", \"csiborg1\", \"csiborg2_main\", \"csiborg2X\"]\n",
|
|
|
|
"convert_to_galactic = False\n",
|
|
|
|
"\n",
|
|
|
|
"fig, axs = plt.subplots(1, 3, figsize=(15, 5))\n",
|
|
|
|
"cols = plt.rcParams['axes.prop_cycle'].by_key()['color']\n",
|
|
|
|
"\n",
|
|
|
|
"for i, sim in enumerate(sims):\n",
|
|
|
|
" r, B = get_bulkflow_simulation(sim, convert_to_galactic=convert_to_galactic)\n",
|
|
|
|
" if sim == \"Carrick2015\":\n",
|
|
|
|
" if convert_to_galactic:\n",
|
|
|
|
" B[..., 0] *= 0.43\n",
|
|
|
|
" else:\n",
|
|
|
|
" B *= 0.43\n",
|
|
|
|
"\n",
|
|
|
|
" for n in range(3):\n",
|
|
|
|
" ylow, ymed, yhigh = np.percentile(B[..., n], [16, 50, 84], axis=0)\n",
|
|
|
|
" axs[n].fill_between(r, ylow, yhigh, color=cols[i], alpha=0.5, label=simname_to_pretty(sim) if n == 0 else None)\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-07-03 08:50:21 +00:00
|
|
|
"axs[0].legend()\n",
|
|
|
|
"if convert_to_galactic:\n",
|
|
|
|
" axs[0].set_ylabel(r\"$B ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
" axs[1].set_ylabel(r\"$\\ell_B ~ [\\degree]$\")\n",
|
|
|
|
" axs[2].set_ylabel(r\"$b_B ~ [\\degree]$\")\n",
|
|
|
|
"else:\n",
|
|
|
|
" axs[0].set_ylabel(r\"$B_{x} ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
" axs[1].set_ylabel(r\"$B_{y} ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
" axs[2].set_ylabel(r\"$B_{z} ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
"\n",
|
|
|
|
"for n in range(3):\n",
|
|
|
|
" axs[n].set_xlabel(r\"$R ~ [\\mathrm{Mpc}]$\")\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"fig.tight_layout()\n",
|
2024-07-05 10:28:06 +00:00
|
|
|
"fig.savefig(\"../../plots/bulkflow_simulations_restframe.png\", dpi=450)\n",
|
2024-07-03 08:50:21 +00:00
|
|
|
"fig.show()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Bulk flow in the CMB rest frame"
|
2024-07-01 10:48:50 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-07-05 10:28:06 +00:00
|
|
|
"execution_count": null,
|
2024-07-01 10:48:50 +00:00
|
|
|
"metadata": {},
|
2024-07-05 10:28:06 +00:00
|
|
|
"outputs": [],
|
2024-07-01 10:48:50 +00:00
|
|
|
"source": [
|
2024-07-05 10:28:06 +00:00
|
|
|
"sim = \"csiborg2_main\"\n",
|
|
|
|
"catalogues = [\"Pantheon+\", \"2MTF\", \"SFI_gals\"]\n",
|
2024-07-03 08:50:21 +00:00
|
|
|
"\n",
|
|
|
|
"\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"fig, axs = plt.subplots(1, 3, figsize=(15, 5), sharex=True)\n",
|
|
|
|
"cols = plt.rcParams['axes.prop_cycle'].by_key()['color']\n",
|
2024-07-03 08:50:21 +00:00
|
|
|
"# fig.suptitle(f\"Calibrated against {catalogue}\")\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
2024-07-03 08:50:21 +00:00
|
|
|
"for i, catalogue in enumerate(catalogues):\n",
|
2024-07-05 10:28:06 +00:00
|
|
|
" r, B = get_bulkflow(sim, catalogue, sample_beta=True, convert_to_galactic=True,\n",
|
|
|
|
" weight_simulations=True, downsample=3)\n",
|
2024-07-03 08:50:21 +00:00
|
|
|
" c = cols[i]\n",
|
|
|
|
" for n in range(3):\n",
|
|
|
|
" ylow, ymed, yhigh = np.percentile(B[..., n], [16, 50, 84], axis=-1)\n",
|
|
|
|
" axs[n].plot(r, ymed, color=c)\n",
|
|
|
|
" axs[n].fill_between(r, ylow, yhigh, alpha=0.5, color=c, label=catalogue)\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"# CMB-LG velocity\n",
|
2024-07-03 08:50:21 +00:00
|
|
|
"axs[0].fill_between([r.min(), 10.], [627 - 22, 627 - 22], [627 + 22, 627 + 22], color='black', alpha=0.5, zorder=0.5, label=\"CMB-LG\", hatch=\"x\")\n",
|
|
|
|
"axs[1].fill_between([r.min(), 10.], [276 - 3, 276 - 3], [276 + 3, 276 + 3], color='black', alpha=0.5, zorder=0.5, hatch=\"x\")\n",
|
|
|
|
"axs[2].fill_between([r.min(), 10.], [30 - 3, 30 - 3], [30 + 3, 30 + 3], color='black', alpha=0.5, zorder=0.5, hatch=\"x\")\n",
|
2024-07-01 10:48:50 +00:00
|
|
|
"\n",
|
|
|
|
"# LCDM expectation\n",
|
|
|
|
"Rs,mean,std,mode,p05,p16,p84,p95 = np.load(\"/mnt/users/rstiskalek/csiborgtools/data/BulkFlowPlot.npy\")\n",
|
|
|
|
"m = Rs < 175\n",
|
|
|
|
"axs[0].plot(Rs[m], mode[m], color=\"violet\", zorder=0)\n",
|
|
|
|
"axs[0].fill_between(Rs[m], p16[m], p84[m], alpha=0.25, color=\"violet\",\n",
|
|
|
|
" zorder=0, hatch='//', label=r\"$\\Lambda\\mathrm{CDM}$\")\n",
|
|
|
|
"\n",
|
|
|
|
"for n in range(3):\n",
|
|
|
|
" axs[n].set_xlabel(r\"$r ~ [\\mathrm{Mpc} / h]$\")\n",
|
|
|
|
"\n",
|
|
|
|
"axs[0].legend()\n",
|
|
|
|
"axs[0].set_ylabel(r\"$B ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
"axs[1].set_ylabel(r\"$\\ell_B ~ [\\mathrm{deg}]$\")\n",
|
|
|
|
"axs[2].set_ylabel(r\"$b_B ~ [\\mathrm{deg}]$\")\n",
|
|
|
|
"\n",
|
|
|
|
"axs[0].set_xlim(r.min(), r.max())\n",
|
|
|
|
"\n",
|
|
|
|
"fig.tight_layout()\n",
|
|
|
|
"fig.savefig(f\"../../plots/bulkflow_{sim}_{catalogue}.png\", dpi=450)\n",
|
|
|
|
"fig.show()"
|
|
|
|
]
|
|
|
|
},
|
2024-07-12 14:46:45 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Smoothing scale dependence"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-11 06:45:42 +00:00
|
|
|
"execution_count": null,
|
2024-07-12 14:46:45 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"simname = \"Carrick2015\"\n",
|
|
|
|
"catalogue = \"Pantheon+\""
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"#### Goodness-of-fit"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-11 06:45:42 +00:00
|
|
|
"execution_count": null,
|
2024-07-12 14:46:45 +00:00
|
|
|
"metadata": {},
|
2024-09-11 06:45:42 +00:00
|
|
|
"outputs": [],
|
2024-07-12 14:46:45 +00:00
|
|
|
"source": [
|
|
|
|
"scales = [0, 4, 8, 16, 32]\n",
|
|
|
|
"\n",
|
|
|
|
"y = np.asarray([get_gof(\"BIC\", simname, catalogue, ksmooth=i)\n",
|
|
|
|
" for i in range(len(scales))])\n",
|
|
|
|
"ymin = y.min()\n",
|
|
|
|
"\n",
|
|
|
|
"y -= ymin\n",
|
|
|
|
"y_CF4 = get_gof(\"BIC\", \"CF4\", catalogue) - ymin\n",
|
|
|
|
"y_CF4gp = get_gof(\"BIC\", \"CF4gp\", catalogue) - ymin\n",
|
|
|
|
"\n",
|
|
|
|
"plt.figure()\n",
|
|
|
|
"plt.axhline(y[0], color='blue', label=\"Carrick+2015, no smoothing\")\n",
|
|
|
|
"plt.plot(scales[1:], y[1:], marker=\"o\", label=\"Carrick+2015, smoothed\")\n",
|
|
|
|
"\n",
|
|
|
|
"plt.axhline(y_CF4, color='red', label=\"CF4, no smoothing\")\n",
|
|
|
|
"\n",
|
|
|
|
"plt.xlabel(r\"$R_{\\rm smooth} ~ [\\mathrm{Mpc}]$\")\n",
|
|
|
|
"plt.ylabel(r\"$\\Delta \\mathrm{BIC}$\")\n",
|
|
|
|
"plt.legend(ncols=1)\n",
|
|
|
|
"\n",
|
|
|
|
"plt.tight_layout()\n",
|
|
|
|
"plt.savefig(\"../../plots/test_smooth.png\", dpi=450)\n",
|
|
|
|
"plt.show()\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-09-11 06:45:42 +00:00
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
2024-07-12 14:46:45 +00:00
|
|
|
"source": [
|
|
|
|
"sim = \"Carrick2015\"\n",
|
|
|
|
"catalogue = \"Pantheon+\"\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"X = [samples_to_getdist(get_samples(sim, catalogue, ksmooth=ksmooth), ksmooth)\n",
|
|
|
|
" for ksmooth in [0, 1, 2]]\n",
|
|
|
|
"\n",
|
|
|
|
"params = [\"Vmag\", \"l\", \"b\", \"sigma_v\", \"beta\"]\n",
|
|
|
|
"# if \"Pantheon+\" in catalogue or catalogue in [\"Foundation\", \"LOSS\"]:\n",
|
|
|
|
"# params += [\"alpha_cal\", \"beta_cal\", \"mag_cal\", \"e_mu\"]\n",
|
|
|
|
"# else:\n",
|
|
|
|
"# params += [\"aTF\", \"bTF\", \"e_mu\"]\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"\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(f'{catalogue}', y=1.025)\n",
|
|
|
|
"plt.gcf().tight_layout()\n",
|
|
|
|
"plt.gcf().savefig(f\"../../plots/calibration_{catalogue}.png\", dpi=500, bbox_inches='tight')"
|
|
|
|
]
|
|
|
|
},
|
2024-09-11 06:45:42 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## Indranil's void"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Evidence comparison"
|
|
|
|
]
|
|
|
|
},
|
2024-07-12 14:46:45 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
2024-09-11 06:45:42 +00:00
|
|
|
"source": [
|
|
|
|
"zcmb_max = 0.05\n",
|
|
|
|
"\n",
|
|
|
|
"sims = [\"no_field\", \"IndranilVoid_exp\"]\n",
|
|
|
|
"cats = [\"LOSS\", \"Foundation\", \"2MTF\", \"SFI_gals\", \"CF4_TFR_i\", \"CF4_TFR_w1\"]\n",
|
|
|
|
"\n",
|
|
|
|
"neglnZ = {}\n",
|
|
|
|
"for sim in sims:\n",
|
|
|
|
" for cat in cats:\n",
|
|
|
|
" sample_alpha = sim not in [\"IndranilVoid_exp\", \"no_field\"]\n",
|
|
|
|
" fname = paths.flow_validation(\n",
|
|
|
|
" fdir, sim, cat, inference_method=\"mike\",\n",
|
|
|
|
" sample_alpha=sample_alpha, zcmb_max=zcmb_max)\n",
|
|
|
|
"\n",
|
|
|
|
" neglnZ[f\"{sim}_{cat}\"] = get_gof(\"neg_lnZ_harmonic\", fname)\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"simA = sims[0]\n",
|
|
|
|
"simB = sims[1]\n",
|
|
|
|
"\n",
|
|
|
|
"print(f\"lnZ_({simA}) - lnZ_({simB})\\n\")\n",
|
|
|
|
"for cat in cats:\n",
|
|
|
|
" lnZ_A = - neglnZ[f\"{simA}_{cat}\"]\n",
|
|
|
|
" lnZ_B = - neglnZ[f\"{simB}_{cat}\"]\n",
|
|
|
|
" print(f\"{cat:15s} {lnZ_A - lnZ_B:.1f}\")\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"print(f\"\\n(Positive -> preference for {simA})\")"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": 28,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"data = np.loadtxt(\"/mnt/extraspace/rstiskalek/catalogs/v_pec_EXP_IndranilVoid.dat\")\n",
|
|
|
|
"\n",
|
|
|
|
"r = np.arange(0, 251)\n",
|
|
|
|
"phi = np.arange(0, 181)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"plt.figure()\n",
|
|
|
|
"plt.plot(phi, data[:, 100])\n",
|
|
|
|
"plt.xlabel(r\"$\\phi ~ [\\mathrm{deg}]$\")\n",
|
|
|
|
"plt.ylabel(r\"$V ~ [\\mathrm{km} / \\mathrm{s}]$\")\n",
|
|
|
|
"\n",
|
|
|
|
"plt.xlim(0, 180)\n",
|
|
|
|
"plt.tight_layout()\n",
|
|
|
|
"plt.savefig(\"../../plots/profile.png\", dpi=450)\n",
|
|
|
|
"\n",
|
|
|
|
"plt.show()"
|
|
|
|
]
|
2024-07-12 14:46:45 +00:00
|
|
|
},
|
2024-07-01 10:48:50 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
2024-07-03 08:51:00 +00:00
|
|
|
"source": []
|
2024-07-01 10:48:50 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"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",
|
2024-07-05 10:28:06 +00:00
|
|
|
"version": "3.11.4"
|
2024-07-01 10:48:50 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 2
|
|
|
|
}
|