2024-03-08 10:44:19 +00:00
|
|
|
{
|
|
|
|
"cells": [
|
2024-03-21 15:50:37 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"# Calibrating the velocity field against observations "
|
|
|
|
]
|
|
|
|
},
|
2024-03-08 10:44:19 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": 1,
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
2024-04-01 22:19:14 +00:00
|
|
|
"outputs": [],
|
2024-03-08 10:44:19 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"# 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",
|
2024-03-08 10:44:19 +00:00
|
|
|
"import numpy as np\n",
|
|
|
|
"import matplotlib.pyplot as plt\n",
|
|
|
|
"import jax\n",
|
2024-03-16 17:16:22 +00:00
|
|
|
"from numpyro.infer import MCMC, NUTS, init_to_median\n",
|
|
|
|
"import corner\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"from getdist import plots\n",
|
|
|
|
"from scipy.stats import multivariate_normal\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
|
|
|
"import csiborgtools\n",
|
|
|
|
"\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"from flow_calibration import *\n",
|
|
|
|
"\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"%load_ext autoreload\n",
|
|
|
|
"%autoreload 2\n",
|
2024-03-16 17:16:22 +00:00
|
|
|
"%matplotlib inline\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
|
|
|
"paths = csiborgtools.read.Paths(**csiborgtools.paths_glamdring)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## LOS density & radial velocity plots "
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
2024-03-21 15:50:37 +00:00
|
|
|
"outputs": [],
|
2024-03-08 10:44:19 +00:00
|
|
|
"source": [
|
2024-03-16 17:02:00 +00:00
|
|
|
"# fpath = \"/mnt/extraspace/rstiskalek/catalogs/A2.h5\"\n",
|
|
|
|
"fpath = \"/mnt/extraspace/rstiskalek/catalogs/PV_compilation_Supranta2019.hdf5\"\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"loader_carrick = csiborgtools.flow.DataLoader(\"Carrick2015\", \"LOSS\", fpath, paths, ksmooth=0)\n",
|
|
|
|
"loader_csiborg = csiborgtools.flow.DataLoader(\"csiborg1\", \"LOSS\", fpath, paths, ksmooth=0)\n",
|
|
|
|
"loader_csiborg2 = csiborgtools.flow.DataLoader(\"csiborg2_main\", \"LOSS\", fpath, paths, ksmooth=0)"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
2024-03-16 17:02:00 +00:00
|
|
|
"outputs": [],
|
2024-03-08 10:44:19 +00:00
|
|
|
"source": [
|
|
|
|
"# ks = [115, 53, 77, 105, 26, 61, 86, 29, 80, 21]\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"ks = [19, 8, 15, 0, 16, 6, 48, 38, 26, 44]\n",
|
|
|
|
"# ks = [19]\n",
|
|
|
|
"# ks = np.random.choice(50, 10, replace=False)\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"# k = 6\n",
|
|
|
|
"for k in []:\n",
|
|
|
|
" fig, axs = plt.subplots(2, 1, figsize=(7, 7), sharex=True)\n",
|
|
|
|
" # Get rid of vertical spacing\n",
|
|
|
|
" fig.subplots_adjust(wspace=0)\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
" # Plot CSiBORG\n",
|
|
|
|
" for i in range(loader_csiborg.los_density.shape[1]):\n",
|
|
|
|
" axs[0].plot(loader_csiborg.rdist, loader_csiborg.los_density[k, i, :], alpha=0.1, color=\"black\")\n",
|
|
|
|
" axs[1].plot(loader_csiborg.rdist, loader_csiborg.los_radial_velocity[k, i, :], alpha=0.1, color=\"black\")\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
" # CSiBORG1\n",
|
|
|
|
" axs[0].plot(loader_csiborg.rdist, loader_csiborg.los_density[k, :, :].mean(axis=0), color=\"red\", label=\"CSiBORG1\")\n",
|
|
|
|
" axs[1].plot(loader_csiborg.rdist, loader_csiborg.los_radial_velocity[k, :, :].mean(axis=0), color=\"red\")\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
" # CSiBORG2\n",
|
|
|
|
" axs[0].plot(loader_csiborg2.rdist, loader_csiborg2.los_density[k, :, :].mean(axis=0), color=\"violet\", label=\"CSiBORG2\")\n",
|
|
|
|
" axs[1].plot(loader_csiborg2.rdist, loader_csiborg2.los_radial_velocity[k, :, :].mean(axis=0), color=\"violet\")\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
" # Plot Carrick+2015\n",
|
|
|
|
" axs[0].plot(loader_carrick.rdist, loader_carrick.los_density[k, 0, :], color=\"blue\", label=\"Carrick+2015\")\n",
|
|
|
|
" axs[1].plot(loader_carrick.rdist, loader_carrick.los_radial_velocity[k, 0, :] * 0.43, color=\"blue\")\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
" # for i in range(2):\n",
|
|
|
|
" # label = \"SN\"\n",
|
|
|
|
" # rdist = loader_csiborg.cat[\"r_hMpc\"][k]\n",
|
|
|
|
" # axs[i].axvline(rdist, color=\"violet\", linestyle=\"--\",\n",
|
|
|
|
" # zorder=0, label=label)\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
" axs[1].set_xlabel(r\"$r ~ [\\mathrm{Mpc} / h]$\")\n",
|
|
|
|
" axs[0].set_ylabel(r\"$\\rho_{\\rm LOS} / \\langle \\rho_{\\rm matter} \\rangle$\")\n",
|
|
|
|
" axs[1].set_ylabel(r\"$v_{\\rm LOS} ~ [\\mathrm{km/s}]$\")\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
" axs[0].set_yscale(\"log\")\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
" axs[0].legend(loc=\"upper right\")\n",
|
|
|
|
" axs[0].set_xlim(0, 200)\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
" fig.tight_layout(w_pad=0, h_pad=0)\n",
|
|
|
|
" fig.savefig(f\"../plots/LOSS_los_{k}.png\", dpi=500, bbox_inches=\"tight\")\n",
|
|
|
|
"\n",
|
|
|
|
" fig.show()"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"## Test running a model"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": null,
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
2024-06-20 13:33:00 +00:00
|
|
|
"outputs": [],
|
2024-03-08 10:44:19 +00:00
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"fpath_data = \"/mnt/extraspace/rstiskalek/catalogs/PV_compilation.hdf5\"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"# fpath_data = \"/mnt/extraspace/rstiskalek/catalogs/A2.h5\"\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"# fpath_data = \"/mnt/extraspace/rstiskalek/catalogs/PV_mock_CB2_17417_large.hdf5\"\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"\n",
|
2024-06-20 13:33:00 +00:00
|
|
|
"simname = \"Carrick2015\"\n",
|
|
|
|
"catalogue = \"Pantheon+\"\n",
|
|
|
|
"loader = csiborgtools.flow.DataLoader(simname, 0, catalogue, fpath_data, paths, ksmooth=0)\n",
|
|
|
|
"get_model_kwargs = {\"zcmb_max\": 0.05}"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"#### Running HMC"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": null,
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
2024-06-20 13:33:00 +00:00
|
|
|
"outputs": [],
|
2024-03-08 10:44:19 +00:00
|
|
|
"source": [
|
2024-03-26 09:42:53 +00:00
|
|
|
"model = csiborgtools.flow.get_model(loader, **get_model_kwargs)\n",
|
2024-06-20 13:33:00 +00:00
|
|
|
"model_kwargs = {\"sample_alpha\": False, \"sample_beta\": True}"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-03-21 15:50:37 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"kernel = NUTS(model, init_strategy=init_to_median(num_samples=100))\n",
|
2024-03-22 17:10:40 +00:00
|
|
|
"mcmc = MCMC(kernel, num_warmup=250, num_samples=500)\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"rng_key = jax.random.PRNGKey(5)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2024-03-21 15:50:37 +00:00
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-06-20 13:33:00 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"mcmc.run(rng_key, **model_kwargs)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-06-20 13:33:00 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"mcmc.print_summary()\n",
|
|
|
|
"samples = mcmc.get_samples(group_by_chain=False)\n",
|
2024-04-01 22:19:14 +00:00
|
|
|
"# print(csiborgtools.numpyro_gof(model, mcmc, model_kwargs))"
|
2024-03-26 09:42:53 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": null,
|
2024-04-23 11:02:09 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
2024-03-08 10:44:19 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"Vmag = np.sqrt(samples[\"Vext_x\"]**2 + samples[\"Vext_y\"]**2 + samples[\"Vext_z\"]**2)\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"V = np.vstack([samples[\"Vext_x\"], samples[\"Vext_y\"], samples[\"Vext_z\"]]).T\n",
|
|
|
|
"V = csiborgtools.cartesian_to_radec(V)\n",
|
|
|
|
"\n",
|
|
|
|
"l, b = csiborgtools.flow.radec_to_galactic(V[:, 1], V[:, 2])\n",
|
|
|
|
"\n",
|
|
|
|
"print(f\"|V| = {np.mean(Vmag)} +- {np.std(Vmag)}\")\n",
|
|
|
|
"print(f\"l = {np.mean(l)} +- {np.std(l)}\")\n",
|
|
|
|
"print(f\"b = {np.mean(b)} +- {np.std(b)}\")\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
"if \"beta\" in samples:\n",
|
|
|
|
" print(f\"beta = {np.mean(samples['beta'])} +- {np.std(samples['beta'])}\")"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-06-20 13:33:00 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-26 09:42:53 +00:00
|
|
|
"data = [l, b, Vmag]\n",
|
|
|
|
"labels = [r\"$l$\", r\"$b$\", r\"$|\\bf{V}_{\\rm ext}|$\"]\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"if \"alpha\" in samples:\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
" data.append(samples[\"alpha\"])\n",
|
|
|
|
" labels.append(r\"$\\alpha$\")\n",
|
|
|
|
"\n",
|
|
|
|
"if \"beta\" in samples:\n",
|
|
|
|
" data.append(samples[\"beta\"])\n",
|
|
|
|
" labels.append(r\"$\\beta$\")\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"\n",
|
2024-04-01 22:19:14 +00:00
|
|
|
"if \"h\" in samples:\n",
|
|
|
|
" data.append(samples[\"h\"])\n",
|
|
|
|
" labels.append(r\"$h$\")\n",
|
|
|
|
"\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
"data = np.vstack(data).T\n",
|
2024-04-01 22:19:14 +00:00
|
|
|
"fig = corner.corner(data, labels=labels, show_titles=True, title_fmt=\".3f\", title_kwargs={\"fontsize\": 12}, smooth=1)\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"# fig.savefig(f\"../../plots/mock_{simname}_{catalogue}.png\", dpi=500, bbox_inches=\"tight\")"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2024-03-21 15:50:37 +00:00
|
|
|
"cell_type": "markdown",
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"## Vizualize the results"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
2024-03-16 17:02:00 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-04-23 11:02:09 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-04-23 11:02:09 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"data, names, gof = read_samples(\"Pantheon+_groups\", \"Carrick2015\", 0)\n",
|
2024-03-08 10:44:19 +00:00
|
|
|
"\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"fig = corner.corner(data, labels=names_to_latex(names, True), show_titles=True,\n",
|
|
|
|
" title_fmt=\".3f\", title_kwargs={\"fontsize\": 12}, smooth=1)"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2024-03-21 15:50:37 +00:00
|
|
|
"cell_type": "markdown",
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"### $\\texttt{LOSS}$ comparison"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-03-21 15:50:37 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"LOSS_Carrick_0 = read_samples(\"LOSS\", \"Carrick2015\", 0, return_MCsamples=True)\n",
|
|
|
|
"LOSS_Carrick_1 = read_samples(\"LOSS\", \"Carrick2015\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"LOSS_CB1_0 = read_samples(\"LOSS\", \"csiborg1\", 0, return_MCsamples=True)\n",
|
|
|
|
"LOSS_CB1_1 = read_samples(\"LOSS\", \"csiborg1\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"LOSS_CB2_0 = read_samples(\"LOSS\", \"csiborg2_main\", 0, return_MCsamples=True)\n",
|
|
|
|
"LOSS_CB2_1 = read_samples(\"LOSS\", \"csiborg2_main\", 1, return_MCsamples=True)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"X = [\n",
|
|
|
|
" LOSS_Carrick_0,\n",
|
|
|
|
" # LOSS_Carrick_1,\n",
|
|
|
|
" # LOSS_CB1_0,\n",
|
|
|
|
" LOSS_CB1_1,\n",
|
|
|
|
" LOSS_CB2_0,\n",
|
|
|
|
" LOSS_CB2_1,\n",
|
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"# params = [\"l\", \"b\", \"Vmag\", \"beta\"]\n",
|
|
|
|
"params = None\n",
|
|
|
|
"\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, params=params, filled=True, legend_loc='upper right', )\n",
|
|
|
|
"g.export(f\"../plots/LOSS_comparison.png\", dpi=500,)\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"### $\\texttt{Foundation}$ comparison"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"FOUNDATION_Carrick_0 = read_samples(\"Foundation\", \"Carrick2015\", 0, return_MCsamples=True)\n",
|
|
|
|
"FOUNDATION_Carrick_1 = read_samples(\"Foundation\", \"Carrick2015\", 1, return_MCsamples=True)\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"FOUNDATION_CB1_0 = read_samples(\"Foundation\", \"csiborg1\", 0, return_MCsamples=True)\n",
|
|
|
|
"FOUNDATION_CB1_1 = read_samples(\"Foundation\", \"csiborg1\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"FOUNDATION_CB2_0 = read_samples(\"Foundation\", \"csiborg2_main\", 0, return_MCsamples=True)\n",
|
|
|
|
"FOUNDATION_CB2_1 = read_samples(\"Foundation\", \"csiborg2_main\", 1, return_MCsamples=True)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-03-21 15:50:37 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"X = [\n",
|
|
|
|
" FOUNDATION_Carrick_0,\n",
|
|
|
|
" # FOUNDATION_Carrick_1,\n",
|
|
|
|
" # FOUNDATION_CB1_0,\n",
|
|
|
|
" FOUNDATION_CB1_1,\n",
|
|
|
|
" FOUNDATION_CB2_0,\n",
|
|
|
|
" FOUNDATION_CB2_1,\n",
|
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, filled=True, legend_loc='upper right')\n",
|
|
|
|
"g.export(f\"../plots/FOUNDATION_comparison.png\", dpi=500,)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"### $\\texttt{Pantheon+}$ comparison"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": 4,
|
2024-04-23 11:02:09 +00:00
|
|
|
"metadata": {},
|
2024-06-20 13:33:00 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"\n",
|
|
|
|
"Reading Pantheon+ fitted to Carrick2015 with ksmooth = 0.\n",
|
|
|
|
"BIC = 9952.745117 +- 0.000000\n",
|
|
|
|
"AIC = 9907.553711 +- 0.000000\n",
|
|
|
|
"logZ = -4945.429688 +- 0.000000\n",
|
|
|
|
"chi2 = 1.147044 +- 0.069862\n",
|
|
|
|
"Removed no burn in\n",
|
|
|
|
"\n",
|
|
|
|
"Reading Pantheon+ fitted to Carrick2015 with ksmooth = 1.\n",
|
|
|
|
"BIC = 9995.297852 +- 0.000000\n",
|
|
|
|
"AIC = 9950.106445 +- 0.000000\n",
|
|
|
|
"logZ = -4966.300293 +- 0.000000\n",
|
|
|
|
"chi2 = 1.139592 +- 0.069120\n",
|
|
|
|
"Removed no burn in\n",
|
|
|
|
"\n",
|
|
|
|
"Reading Pantheon+ fitted to csiborg2_main with ksmooth = 0.\n",
|
|
|
|
"BIC = 10055.604150 +- 27.237237\n",
|
|
|
|
"AIC = 10010.412744 +- 27.237237\n",
|
|
|
|
"logZ = -5000.136133 +- 23.062465\n",
|
|
|
|
"chi2 = 0.985968 +- 0.117400\n",
|
|
|
|
"Removed no burn in\n",
|
|
|
|
"\n",
|
|
|
|
"Reading Pantheon+ fitted to csiborg2_main with ksmooth = 1.\n",
|
|
|
|
"BIC = 10023.778857 +- 13.951634\n",
|
|
|
|
"AIC = 9978.587451 +- 13.951634\n",
|
|
|
|
"logZ = -4979.896411 +- 6.903517\n",
|
|
|
|
"chi2 = 1.115029 +- 0.091582\n",
|
|
|
|
"Removed no burn in\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2024-04-23 11:02:09 +00:00
|
|
|
"source": [
|
2024-06-20 13:33:00 +00:00
|
|
|
"PANTHEONP_Carrick_0 = read_samples(\"Pantheon+\", \"Carrick2015\", 0, return_MCsamples=True)\n",
|
|
|
|
"PANTHEONP_Carrick_1 = read_samples(\"Pantheon+\", \"Carrick2015\", 1, return_MCsamples=True)\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"\n",
|
|
|
|
"# PANTHEONP_CB1_0 = read_samples(\"Pantheon+\", \"csiborg1\", 0, return_MCsamples=True)\n",
|
|
|
|
"# PANTHEONP_CB1_1 = read_samples(\"Pantheon+\", \"csiborg1\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"PANTHEONP_CB2_0 = read_samples(\"Pantheon+\", \"csiborg2_main\", 0, return_MCsamples=True)\n",
|
|
|
|
"PANTHEONP_CB2_1 = read_samples(\"Pantheon+\", \"csiborg2_main\", 1, return_MCsamples=True)\n"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": 7,
|
2024-04-23 11:02:09 +00:00
|
|
|
"metadata": {},
|
2024-06-20 13:33:00 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABKYAAASlCAYAAACSitFIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3hc5Zk28PucqdJoirpkVVu25YIrGAymmUBMCzi00BIMpjreLGkQMCGkgI0DJASThcSAlw8MhqUETAdDsAnVtsC4yHKR1XuZounnfH8oUixbGk05Z2Yk3b/r0rWgOec9j0ZCu7r3eZ9XkGVZBhERERERERERUZyJiS6AiIiIiIiIiIjGJgZTRERERERERESUEAymiIiIiIiIiIgoIRhMERERERERERFRQjCYIiIiIiIiIiKihGAwRURERERERERECcFgioiIiIiIiIiIEkKb6ALiTZIkNDQ0wGw2QxCERJdDpBpZluFwODBu3DiIIjNoIiIiIiIiSj5jLphqaGhAUVFRossgipva2loUFhYmugwiIiIiIiKio4y5YMpsNgPo/WPdYrEkuBoi9djtdhQVFfX/zBMRERERERElmzEXTPVt37NYLAymaEzgllUiIiIiIiJKVhw8Q0RERERERERECcFgioiIiIiIiIiIEoLBFBERERERERERJQSDKSIiIiIiIiIiSogxN/yciIiIiIiIBuru7kZPT4+qz0hNTYXValX1GUQ08jCYIiIiIiIiGsO6u7uxZs0aBAIBVZ+j1WqxfPnypA2nSktL8ec//xmLFy9OdCljAt9v6sOtfERERERERGNYT0+P6qEUAAQCgYi6sk4//XQYDAakpaUhIyMDp59+OrZu3apILaWlpXj11VcVWSvZbNmyBeeccw7S09Nhs9kwa9YsrF69Gj6fL6J11qxZg+OOOw4Gg2HQ8GjJkiXQ6/VIS0vr//j0008V+ipiU1FRgRtuuAHf/e538bOf/Qy/+c1v8Pe//z3RZfVzu92YOHEibDbbgM/v37+//3tXUFCA1atXR3R/tN+TodaLFwZTRERERERElJTuv/9+OJ1ONDQ0YM6cObjwwgsTXZLqPvroI5x++ulR3btx40acc845WLRoEaqqqtDV1YUNGzZg165daGxsjOhZ48aNw1133YUbbrhh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FV/OC677DLs27cPFRUVqKiowNq1a2E2m1FRUYE5c+YAAL755hu4XC74fD68/PLLePLJJ3HXXXeFff9w35NI64kXBlMKcbz8HLqf/Csc//dsokuJmSTJuGSdE58fCuC/XnIlupyY7N+/H6+99hq8Xi+effbZIfcWExERERGNVampqdBq1Z/yotVqkZqaGvM606ZNw4oVK3DGGWcgMzMTGzZswAUXXBDRGnfeeSfWrFkDm82GZcuWDXv9unXrYLPZMG/ePFgsFpxyyikDZkStX78ebrcbJSUlWLBgAc477zzcdtttEX9tw6mpqcGCBQuGfP3888/HW2+9hTfeeANlZWWw2Wy45JJLMGXKFOTn50f0rD/84Q9ISUnBvffei9dffx0pKSn47ne/2//6mjVrUFxcDLPZjKuuugrLli3Dz3/+87BrPVKo93D9+vU4cOAAcnNzcfnll+Pqq6+GwWAYcP/WrVuxePFirF+/Hpdeeilef/11BINBAL2BVaTBnNJSU1NRWFjY/5GdnQ1BEFBYWNg/ePyFF15AcXEx0tPT8cADD+DVV1/FzJkzw75/uO/JzTff3D+fK5z14kWQI+l3HAXsdjusViu6u7thsVgUW7fplh8ifdnP0Pmnlch78gXF1k2Ej/f78dctXjz3IxPm/8mO569
|
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 1200x1200 with 21 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2024-04-23 11:02:09 +00:00
|
|
|
"source": [
|
|
|
|
"X = [\n",
|
2024-06-20 13:33:00 +00:00
|
|
|
" PANTHEONP_Carrick_0,\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
" # PANTHEONP_Carrick_1,\n",
|
|
|
|
" # PANTHEONP_CB1_0,\n",
|
|
|
|
" # PANTHEONP_CB1_1,\n",
|
|
|
|
" PANTHEONP_CB2_0,\n",
|
|
|
|
" PANTHEONP_CB2_1,\n",
|
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, filled=True, legend_loc='upper right')\n",
|
|
|
|
"# g.export(f\"../plots/PANTHEONP_comparison.png\", dpi=500,)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### $\\texttt{Pantheon+}$ groups"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": 8,
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
2024-03-26 09:42:53 +00:00
|
|
|
"outputs": [
|
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"Reading Pantheon+ fitted to Carrick2015 with ksmooth = 0.\n",
|
2024-06-20 13:33:00 +00:00
|
|
|
"BIC = 9952.745117 +- 0.000000\n",
|
|
|
|
"AIC = 9907.553711 +- 0.000000\n",
|
|
|
|
"logZ = -4945.429688 +- 0.000000\n",
|
|
|
|
"chi2 = 1.147044 +- 0.069862\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
"Removed no burn in\n",
|
|
|
|
"\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"Reading Pantheon+_groups fitted to Carrick2015 with ksmooth = 0.\n",
|
2024-06-20 13:33:00 +00:00
|
|
|
"BIC = 2578.150635 +- 0.000000\n",
|
|
|
|
"AIC = 2545.786133 +- 0.000000\n",
|
|
|
|
"logZ = -1259.616211 +- 0.000000\n",
|
|
|
|
"chi2 = 1.185719 +- 0.318355\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"Removed no burn in\n",
|
|
|
|
"\n",
|
|
|
|
"Reading Pantheon+_groups_zSN fitted to Carrick2015 with ksmooth = 0.\n",
|
|
|
|
"BIC = 2796.622070 +- 0.000000\n",
|
|
|
|
"AIC = 2764.257568 +- 0.000000\n",
|
|
|
|
"logZ = -1364.911255 +- 0.000000\n",
|
|
|
|
"chi2 = 1.072540 +- 0.119186\n",
|
|
|
|
"Removed no burn in\n",
|
|
|
|
"\n",
|
|
|
|
"Reading Pantheon+_zSN fitted to Carrick2015 with ksmooth = 0.\n",
|
2024-06-20 13:33:00 +00:00
|
|
|
"BIC = 10115.830078 +- 0.000000\n",
|
|
|
|
"AIC = 10070.638672 +- 0.000000\n",
|
|
|
|
"logZ = -5025.696777 +- 0.000000\n",
|
|
|
|
"chi2 = 1.106855 +- 0.064999\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
"Removed no burn in\n"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2024-03-08 10:44:19 +00:00
|
|
|
"source": [
|
2024-06-20 13:33:00 +00:00
|
|
|
"LG = -1\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"PANTHEONP_Carrick = read_samples(\"Pantheon+\", \"Carrick2015\", 0, return_MCsamples=True, subtract_LG_velocity=LG, )\n",
|
|
|
|
"PANTHEONP_Carrick_Groups = read_samples(\"Pantheon+_groups\", \"Carrick2015\", 0, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"PANTHEONP_Carrick_Groups_zSN = read_samples(\"Pantheon+_groups_zSN\", \"Carrick2015\", 0, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"PANTHEONP_Carrick_zSN = read_samples(\"Pantheon+_zSN\", \"Carrick2015\", 0, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"# ksmooth = 1\n",
|
|
|
|
"# PANTHEONP_CB2 = read_samples(\"Pantheon+\", \"csiborg2_main\", ksmooth, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# PANTHEONP_CB2_Groups = read_samples(\"Pantheon+_groups\", \"csiborg2_main\", ksmooth, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# PANTHEONP_CB2_Groups_zSN = read_samples(\"Pantheon+_groups_zSN\", \"csiborg2_main\", ksmooth, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"\n",
|
|
|
|
"\n"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": 10,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-03-26 09:42:53 +00:00
|
|
|
"outputs": [
|
2024-04-23 11:02:09 +00:00
|
|
|
{
|
|
|
|
"name": "stdout",
|
|
|
|
"output_type": "stream",
|
|
|
|
"text": [
|
|
|
|
"Removed no burn in\n"
|
|
|
|
]
|
|
|
|
},
|
2024-03-26 09:42:53 +00:00
|
|
|
{
|
|
|
|
"data": {
|
2024-06-20 13:33:00 +00:00
|
|
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAABKUAAASlCAYAAAB5vWpLAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3ydZf3/8fd9n5k92qYzSffei0KpUET2UlBZskGofPkpqMgSlCkKiqCCMioyBESRIQgKSFtG6YbulSbd6cjOmff9+6OmNjRNc07uM5K8no/Hedgm93Vdn5NzGh/nzXV9bsO2bVsAAAAAAABAEpmpLgAAAAAAAABdD6EUAAAAAAAAko5QCgAAAAAAAElHKAUAAAAAAICkI5QCAAAAAABA0hFKAQAAAAAAIOkIp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/+/VucZ9iwYTrppJOUnZ2tc889V0VFRXrppZfk9XqT8jwOZ+HChXrrrbd04403Nvv66tWrtXr1at1+++3yeDwaNmyYLr/8cv3+979v03in6+mICKUAAAAAAI5raGjQ448/rtLSUnXr1k2lpaV69913VVNTo8cff1w/+MEPNG/evGZjnnnmGT3//POqrKxUVlaWbrvtNknSSy+9pJKSEj3//POqq6vTo48+etgxl112mfbs2aNly5Zp48aNCofDuvbaa/ePO//88+XxeLRx40bNmTNHr7zyykFHrw41t1PWrl2rjRs36rzzznN03tY8/fTTKiws1KhRo/TAAw/Isqy452rtZ3j++eertLRUO3bs0PPPP68nnnjikPMcGL79/Oc/1yWXXHLIYG3WrFnKz88/5GPu3LlxP5+WRCIRXXnllfrNb35zUEjW9LOzbbvZ15YtW9am8U1ieU3aMl9HQigFAAAAAHDMTTfdpPz8fA0cOFCrVq3Sq6++Kkk6++yzVVxcLMMwNHPmTJ144ol6//33m42dNWuWBgwYIL/frwsuuKBN/ahaGlNZWamXX35Zv/nNb5Sfn6+srCz99Kc/1QsvvKBoNKotW7bo3Xff1YMPPqjs7GyVlpbqlltu0ezZs9tdTywqKyslSX379nV03kO57rrrtHr1alVWVuqJJ57QQw89pIceeiiuuVr7GVZUVGjOnDm67777lJGRoaFDhzbb3daSX//61xo/frzeeust/exnP1M4HG7xut/+9reqqqo65OPoo48+5BqnnXaaDMM45KOsrOygMT//+c81YcIEfelLXzroe8OGDVP//v314x//WMFgUMuXL9eTTz6pmpqaNo2XYn9NDjdfR8Pd9wAAAAAAjrn33nv13e9+96CvP/vss3rggQdUVlYmy7LU0NCgAQMGNLumV69e+/+clZWl2traw67X0pimNb44v2ma2r59uzZv3iy/36+ePXvu/97AgQO1efPmNtcza9as/b2DIpGIAoFAs6bTr7/+eqsBiaT9u4G2bNmiQYMGHfI6J9aSpIkTJ+7/87Rp0/SjH/1ITz/9tL73ve8dduwXtfYz3Lp1q/x+f7PdTiUlJa3ON3PmTFVWVurOO++MuZa2eu6551ptHl9Y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ZGbr77rv12muvKSMjQyeccML+7z/yyCMqKSlRTk6OLrjgAs2aNUs33HBDm2v9otZ+hs8995w2bNignj176txzz9WFF14on6/5e3bhwoU666yz9Nxzz+nrX/+6XnvtNUWj+zY+rFy5MuZQzmmZmZnq16/f/kePHj1kGIb69eu3v8n4iy++qJKSEhUUFOgXv/iFXnnlFY0dO7bN4w/3mlx99dX7+3G1Zb6OxrBj2S/ZCdTU1CgvL0/V1dXKzc1NdTkdyk2vNag2aOvXX8uUaRqS9t1l4NqXG2Tb0m/OyZR
|
2024-03-26 09:42:53 +00:00
|
|
|
"text/plain": [
|
|
|
|
"<Figure size 1200x1200 with 21 Axes>"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"metadata": {},
|
|
|
|
"output_type": "display_data"
|
|
|
|
}
|
|
|
|
],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"params = [\"Vmag\", \"l\", \"b\"]\n",
|
|
|
|
"CMB = MCSamples(samples=multivariate_normal([627, 276, 30], [22, 3, 3]).rvs(size=20000),\n",
|
|
|
|
" names=params, labels=names_to_latex(params, True), label=\"CMB\")\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"X = [\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
" PANTHEONP_Carrick,\n",
|
2024-06-20 13:33:00 +00:00
|
|
|
" # PANTHEONP_Carrick_Groups,\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
" # PANTHEONP_Carrick_Groups_zSN,\n",
|
|
|
|
" PANTHEONP_Carrick_zSN,\n",
|
|
|
|
" # PANTHEONP_CB2,\n",
|
|
|
|
" # PANTHEONP_CB2_Groups,\n",
|
|
|
|
" # PANTHEONP_CB2_Groups_zSN,\n",
|
2024-06-20 13:33:00 +00:00
|
|
|
" # CMB,\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, filled=True, legend_loc='upper right')\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"g.export(f\"../../plots/PANTHEON_GROUPS_Carrick_comparison_LG.png\", dpi=500,)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2024-03-21 15:50:37 +00:00
|
|
|
"cell_type": "markdown",
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"### $\\texttt{2MTF}$ comparison"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-03-21 15:50:37 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"TWOMTF_Carrick_0 = read_samples(\"2MTF\", \"Carrick2015\", 0, return_MCsamples=True)\n",
|
|
|
|
"TWOMTF_Carrick_1 = read_samples(\"2MTF\", \"Carrick2015\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"TWOMTF_CB1_0 = read_samples(\"2MTF\", \"csiborg1\", 0, return_MCsamples=True)\n",
|
|
|
|
"TWOMTF_CB1_1 = read_samples(\"2MTF\", \"csiborg1\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"TWOMTF_CB2_0 = read_samples(\"2MTF\", \"csiborg2_main\", 0, return_MCsamples=True)\n",
|
|
|
|
"TWOMTF_CB2_1 = read_samples(\"2MTF\", \"csiborg2_main\", 1, return_MCsamples=True)\n"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-03-21 15:50:37 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"X = [\n",
|
|
|
|
" TWOMTF_Carrick_0,\n",
|
|
|
|
" # TWOMTF_Carrick_1,\n",
|
|
|
|
" # TWOMTF_CB1_0,\n",
|
|
|
|
" TWOMTF_CB1_1,\n",
|
|
|
|
" TWOMTF_CB2_0,\n",
|
|
|
|
" TWOMTF_CB2_1,\n",
|
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, filled=True, legend_loc='upper right')\n",
|
|
|
|
"g.export(f\"../plots/2MTF_comparison.png\", dpi=500,)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2024-03-21 15:50:37 +00:00
|
|
|
"cell_type": "markdown",
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"### $\\texttt{SFI++ galaxies}$ comparison"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-04-23 11:02:09 +00:00
|
|
|
"execution_count": null,
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
2024-04-23 11:02:09 +00:00
|
|
|
"outputs": [],
|
2024-03-08 10:44:19 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"SFIGAL_Carrick_0 = read_samples(\"SFI_gals\", \"Carrick2015\", 0, return_MCsamples=True)\n",
|
|
|
|
"SFIGAL_Carrick_1 = read_samples(\"SFI_gals\", \"Carrick2015\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"# SFIGAL_CB1_0 = read_samples(\"SFI_gals\", \"csiborg1\", 0, return_MCsamples=True)\n",
|
|
|
|
"# SFIGAL_CB1_1 = read_samples(\"SFI_gals\", \"csiborg1\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"SFIGAL_CB2_0 = read_samples(\"SFI_gals\", \"csiborg2_main\", 0, return_MCsamples=True)\n",
|
|
|
|
"SFIGAL_CB2_1 = read_samples(\"SFI_gals\", \"csiborg2_main\", 1, return_MCsamples=True)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"X = [\n",
|
|
|
|
" SFIGAL_Carrick_0,\n",
|
|
|
|
" # SFIGAL_Carrick_1,\n",
|
|
|
|
" # SFIGAL_CB1_0,\n",
|
|
|
|
" # SFIGAL_CB1_1,\n",
|
|
|
|
" # SFIGAL_CB2_0,\n",
|
|
|
|
" SFIGAL_CB2_1,\n",
|
|
|
|
" ]\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, filled=True, legend_loc='upper right')\n",
|
|
|
|
"g.export(f\"../plots/SFI_gals_comparison.png\", dpi=500,)"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
2024-03-26 14:11:04 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"### $\\texttt{SFI++ groups}$ comparison"
|
2024-03-26 14:11:04 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-04-23 11:02:09 +00:00
|
|
|
"execution_count": null,
|
2024-03-26 14:11:04 +00:00
|
|
|
"metadata": {},
|
2024-04-23 11:02:09 +00:00
|
|
|
"outputs": [],
|
2024-03-26 14:11:04 +00:00
|
|
|
"source": [
|
|
|
|
"SFIGROUP_Carrick_0 = read_samples(\"SFI_groups\", \"Carrick2015\", 0, return_MCsamples=True)\n",
|
|
|
|
"SFIGROUP_Carrick_1 = read_samples(\"SFI_groups\", \"Carrick2015\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"SFIGROUP_CB2_0 = read_samples(\"SFI_groups\", \"csiborg2_main\", 0, return_MCsamples=True)\n",
|
|
|
|
"SFIGROUP_CB2_1 = read_samples(\"SFI_groups\", \"csiborg2_main\", 1, return_MCsamples=True)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-04-23 11:02:09 +00:00
|
|
|
"execution_count": null,
|
2024-03-26 14:11:04 +00:00
|
|
|
"metadata": {},
|
2024-04-23 11:02:09 +00:00
|
|
|
"outputs": [],
|
2024-03-26 14:11:04 +00:00
|
|
|
"source": [
|
|
|
|
"X = [\n",
|
|
|
|
" SFIGROUP_Carrick_0,\n",
|
2024-04-08 22:14:43 +00:00
|
|
|
" SFIGAL_Carrick_0,\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
" # SFIGROUP_Carrick_1,\n",
|
|
|
|
" # SFIGROUP_CB2_0,\n",
|
2024-04-08 22:14:43 +00:00
|
|
|
" # SFIGROUP_CB2_1,\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, filled=True, legend_loc='upper right')\n",
|
2024-04-08 22:14:43 +00:00
|
|
|
"g.export(f\"../plots/SFI_gals_vs_groups_comparison.png\", dpi=500,)"
|
2024-03-26 14:11:04 +00:00
|
|
|
]
|
|
|
|
},
|
2024-04-01 22:19:14 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"### SN to TF comparison"
|
2024-04-01 22:19:14 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": null,
|
2024-04-01 22:19:14 +00:00
|
|
|
"metadata": {},
|
2024-06-20 13:33:00 +00:00
|
|
|
"outputs": [],
|
2024-04-01 22:19:14 +00:00
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"LG = 0\n",
|
2024-04-02 08:28:57 +00:00
|
|
|
"\n",
|
2024-04-23 11:02:09 +00:00
|
|
|
"# PANTHEONP_Carrick = read_samples(\"Pantheon+\", \"Carrick2015\", 0, return_MCsamples=True, subtract_LG_velocity=LG, )\n",
|
|
|
|
"# PANTHEONP_Groups_Carrick = read_samples(\"Pantheon+_groups\", \"Carrick2015\", 0, return_MCsamples=True, subtract_LG_velocity=LG, )\n",
|
|
|
|
"# TWOMTF_Carrick = read_samples(\"2MTF\", \"Carrick2015\", 0, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# SFIGAL_Carrick = read_samples(\"SFI_gals\", \"Carrick2015\", 0, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"\n",
|
|
|
|
"k = 1\n",
|
|
|
|
"PANTHEONP_CB2 = read_samples(\"Pantheon+\", \"csiborg2_main\", k, return_MCsamples=True, subtract_LG_velocity=LG, )\n",
|
|
|
|
"PANTHEONP_Groups_CB2 = read_samples(\"Pantheon+_groups\", \"csiborg2_main\", k, return_MCsamples=True, subtract_LG_velocity=LG, )\n",
|
|
|
|
"TWOMTF_CB2 = read_samples(\"2MTF\", \"csiborg2_main\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"SFIGAL_CB2 = read_samples(\"SFI_gals\", \"csiborg2_main\", k, return_MCsamples=True, subtract_LG_velocity=LG)"
|
2024-04-01 22:19:14 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-06-20 13:33:00 +00:00
|
|
|
"execution_count": null,
|
2024-04-01 22:19:14 +00:00
|
|
|
"metadata": {},
|
2024-06-20 13:33:00 +00:00
|
|
|
"outputs": [],
|
2024-04-23 11:02:09 +00:00
|
|
|
"source": [
|
|
|
|
"\n",
|
|
|
|
"params = [\"Vmag\", \"l\", \"b\"]\n",
|
|
|
|
"CMB = MCSamples(samples=multivariate_normal([627, 276, 30], [22, 3, 3]).rvs(size=20000),\n",
|
|
|
|
" names=params, labels=names_to_latex(params, True), label=\"CMB\")\n",
|
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"X = [\n",
|
|
|
|
" # PANTHEONP_Carrick,\n",
|
|
|
|
" # PANTHEONP_Groups_Carrick,\n",
|
|
|
|
" # TWOMTF_Carrick,\n",
|
|
|
|
" # SFIGAL_Carrick,\n",
|
|
|
|
" PANTHEONP_CB2,\n",
|
|
|
|
" PANTHEONP_Groups_CB2,\n",
|
|
|
|
" TWOMTF_CB2,\n",
|
|
|
|
" SFIGAL_CB2,\n",
|
|
|
|
" CMB,\n",
|
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, filled=True, legend_loc='upper right')\n",
|
|
|
|
"# g.export(f\"../../plots/SN_TF_CB2_consistency.png\", dpi=500,)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
|
|
|
"### Mock $\\texttt{CB2}$ comparison"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"SMALLMOCK_CB2_0 = read_samples(\"CB2_small\", \"csiborg2_main\", 0, return_MCsamples=True)\n",
|
|
|
|
"SMALLMOCK_CB2_1 = read_samples(\"CB2_small\", \"csiborg2_main\", 1, return_MCsamples=True)\n",
|
|
|
|
"\n",
|
|
|
|
"LARGEMOCK_CB2_0 = read_samples(\"CB2_large\", \"csiborg2_main\", 0, return_MCsamples=True)\n",
|
|
|
|
"LARGEMOCK_CB2_1 = read_samples(\"CB2_large\", \"csiborg2_main\", 1, return_MCsamples=True)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
2024-04-01 22:19:14 +00:00
|
|
|
"source": [
|
|
|
|
"X = [\n",
|
2024-04-02 08:28:57 +00:00
|
|
|
" # SMALLMOCK_CB2_0,\n",
|
|
|
|
" # SMALLMOCK_CB2_1,\n",
|
|
|
|
" LARGEMOCK_CB2_0,\n",
|
|
|
|
" LARGEMOCK_CB2_1,\n",
|
2024-04-01 22:19:14 +00:00
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, filled=True, legend_loc='upper right')\n",
|
2024-04-02 08:28:57 +00:00
|
|
|
"g.export(f\"../plots/CB2_mocks_large.png\", dpi=500,)"
|
2024-04-01 22:19:14 +00:00
|
|
|
]
|
|
|
|
},
|
2024-03-08 10:44:19 +00:00
|
|
|
{
|
|
|
|
"cell_type": "markdown",
|
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-04-23 11:02:09 +00:00
|
|
|
"## External flow consistency"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2024-03-21 15:50:37 +00:00
|
|
|
"cell_type": "markdown",
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"#### Carrick2015"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"X = [\n",
|
|
|
|
" # LOSS_Carrick_0,\n",
|
|
|
|
" # FOUNDATION_Carrick_0,\n",
|
|
|
|
" PANTHEONP_Carrick_0,\n",
|
|
|
|
" TWOMTF_Carrick_0,\n",
|
|
|
|
" SFIGAL_Carrick_0,\n",
|
|
|
|
" ]\n",
|
2024-03-16 17:02:00 +00:00
|
|
|
"\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"params = [\"Vmag\", \"l\", \"b\", \"beta\"]\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, params=params, filled=True, legend_loc='upper right',)\n",
|
|
|
|
"g.export(f\"../plots/Carrick2015_external_flow.png\", dpi=500,)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2024-03-21 15:50:37 +00:00
|
|
|
"cell_type": "markdown",
|
2024-03-08 10:44:19 +00:00
|
|
|
"metadata": {},
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"#### CSiBORG1"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-03-21 15:50:37 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-03-21 15:50:37 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"X = [\n",
|
|
|
|
" # LOSS_CB1_1,\n",
|
|
|
|
" # FOUNDATION_CB1_1,\n",
|
|
|
|
" PANTHEONP_CB1_1,\n",
|
|
|
|
" TWOMTF_CB1_1,\n",
|
|
|
|
" # SFIGAL_CB1_1,\n",
|
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"params = [\"Vmag\", \"l\", \"b\", \"beta\"]\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, params=params, filled=True, legend_loc='upper right',)\n",
|
|
|
|
"g.export(f\"../plots/CB1_external_flow.png\", dpi=500,)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2024-03-21 15:50:37 +00:00
|
|
|
"cell_type": "markdown",
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-03-08 10:44:19 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"#### CSiBORG2"
|
2024-03-08 10:44:19 +00:00
|
|
|
]
|
|
|
|
},
|
2024-03-16 17:02:00 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
2024-03-21 15:50:37 +00:00
|
|
|
"source": [
|
|
|
|
"X = [\n",
|
|
|
|
" # LOSS_CB2_1,\n",
|
|
|
|
" # FOUNDATION_CB2_1,\n",
|
|
|
|
" PANTHEONP_CB2_1,\n",
|
|
|
|
" TWOMTF_CB2_1,\n",
|
|
|
|
" SFIGAL_CB2_1,\n",
|
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"params = [\"Vmag\", \"l\", \"b\", \"beta\"]\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
|
|
|
"g.triangle_plot(X, params=params, filled=True, legend_loc='upper right',)\n",
|
|
|
|
"g.export(f\"../plots/CB2_external_flow.png\", dpi=500,)"
|
|
|
|
]
|
2024-03-16 17:02:00 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-04-23 11:02:09 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-04-23 11:02:09 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-26 09:42:53 +00:00
|
|
|
"k = 1\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
"LG = 0\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
"\n",
|
|
|
|
"# Carrick\n",
|
|
|
|
"# LOSS_Carrick_LG = read_samples(\"LOSS\", \"Carrick2015\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# FOUNDATION_Carrick_LG = read_samples(\"Foundation\", \"Carrick2015\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
"# PANTHEON_Carrick_LG = read_samples(\"Pantheon+\", \"Carrick2015\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
"# TWOMTF_Carrick_LG = read_samples(\"2MTF\", \"Carrick2015\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
"SFIGAL_Carrick_LG = read_samples(\"SFI_gals\", \"Carrick2015\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"SFIGROUPS_Carrick_LG = read_samples(\"SFI_groups\", \"Carrick2015\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
"\n",
|
|
|
|
"\n",
|
|
|
|
"# # CSiBORG2\n",
|
|
|
|
"# LOSS_CB2_LG = read_samples(\"LOSS\", \"csiborg2_main\", k, return_MCsamples=True,subtract_LG_velocity=LG)\n",
|
|
|
|
"# FOUNDATION_CB2_LG = read_samples(\"Foundation\", \"csiborg2_main\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# PANTHEON_CB2_LG = read_samples(\"Pantheon+\", \"csiborg2_main\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# TWOMTF_CB2_LG = read_samples(\"2MTF\", \"csiborg2_main\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
"SFIGAL_CB2_LG = read_samples(\"SFI_gals\", \"csiborg2_main\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"SFIGROUP_CB2_LG = read_samples(\"SFI_groups\", \"csiborg2_main\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
"\n",
|
|
|
|
"# # CSiBORG1\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
"# LOSS_CB1_LG = read_samples(\"LOSS\", \"csiborg1\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# FOUNDATION_CB1_LG = read_samples(\"Foundation\", \"csiborg1\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# PANTHEON_CB1_LG = read_samples(\"Pantheon+\", \"csiborg1\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# TWOMTF_CB1_LG = read_samples(\"2MTF\", \"csiborg1\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
|
|
|
|
"# SFIGAL_CB1_LG = read_samples(\"SFI_gals\", \"csiborg1\", k, return_MCsamples=True, subtract_LG_velocity=LG)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2024-04-23 11:02:09 +00:00
|
|
|
"execution_count": null,
|
2024-03-16 17:02:00 +00:00
|
|
|
"metadata": {},
|
2024-04-23 11:02:09 +00:00
|
|
|
"outputs": [],
|
2024-03-16 17:02:00 +00:00
|
|
|
"source": [
|
2024-03-21 15:50:37 +00:00
|
|
|
"params = [\"Vmag\", \"l\", \"b\"]\n",
|
|
|
|
"CMB = MCSamples(samples=multivariate_normal([627, 276, 30], [22, 3, 3]).rvs(size=20000),\n",
|
|
|
|
" names=params, labels=names_to_latex(params, True), label=\"CMB\")\n",
|
|
|
|
"\n",
|
|
|
|
"X = [\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
" # LOSS_Carrick_LG,\n",
|
|
|
|
" # FOUNDATION_Carrick_LG,\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
" # PANTHEON_Carrick_LG,\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
" # TWOMTF_Carrick_LG,\n",
|
|
|
|
" # SFIGAL_Carrick_LG,\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
" # SFIGROUPS_Carrick_LG,\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
" # LOSS_CB1_LG,\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
" # FOUNDATION_CB1_LG,\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
" # PANTHEON_CB1_LG,\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
" # TWOMTF_CB1_LG,\n",
|
|
|
|
" # SFIGAL_CB1_LG,\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
" # LOSS_CB2_LG,\n",
|
|
|
|
" # FOUNDATION_CB2_LG,\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
" # PANTHEON_CB2_LG,\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
" # TWOMTF_CB2_LG,\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
" SFIGAL_CB2_LG,\n",
|
|
|
|
" SFIGROUP_CB2_LG,\n",
|
2024-03-21 15:50:37 +00:00
|
|
|
" CMB,\n",
|
|
|
|
" ]\n",
|
|
|
|
"\n",
|
|
|
|
"g = plots.get_subplot_plotter()\n",
|
|
|
|
"g.settings.figure_legend_frame = False\n",
|
|
|
|
"g.settings.alpha_filled_add = 0.75\n",
|
|
|
|
"# g.settings.title_limit_fontsize = 14\n",
|
2024-03-26 09:42:53 +00:00
|
|
|
"g.triangle_plot(X, params=params, filled=True, legend_loc='upper right', )\n",
|
2024-03-26 14:11:04 +00:00
|
|
|
"# g.export(f\"../plots/ALL_dipole.png\", dpi=500,)"
|
2024-03-16 17:02:00 +00:00
|
|
|
]
|
|
|
|
},
|
2024-03-08 10:44:19 +00:00
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
|
|
|
"display_name": "venv_csiborg",
|
|
|
|
"language": "python",
|
|
|
|
"name": "python3"
|
|
|
|
},
|
|
|
|
"language_info": {
|
|
|
|
"codemirror_mode": {
|
|
|
|
"name": "ipython",
|
|
|
|
"version": 3
|
|
|
|
},
|
|
|
|
"file_extension": ".py",
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
"name": "python",
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
"pygments_lexer": "ipython3",
|
2024-06-20 13:33:00 +00:00
|
|
|
"version": "3.11.4"
|
2024-03-08 10:44:19 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 2
|
|
|
|
}
|