csiborgtools/notebooks/flow/flow_calibration.ipynb

1131 lines
1.6 MiB
Text
Raw Normal View History

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Calibrating the velocity field against observations "
]
},
{
"cell_type": "code",
"execution_count": 1,
"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",
"import jax\n",
2024-03-16 17:16:22 +00:00
"from numpyro.infer import MCMC, NUTS, init_to_median\n",
"import corner\n",
"from getdist import plots\n",
"from scipy.stats import multivariate_normal\n",
"\n",
"import csiborgtools\n",
"\n",
"from flow_calibration import *\n",
"\n",
"%load_ext autoreload\n",
"%autoreload 2\n",
2024-03-16 17:16:22 +00:00
"%matplotlib inline\n",
"\n",
"paths = csiborgtools.read.Paths(**csiborgtools.paths_glamdring)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## LOS density & radial velocity plots "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# fpath = \"/mnt/extraspace/rstiskalek/catalogs/A2.h5\"\n",
"fpath = \"/mnt/extraspace/rstiskalek/catalogs/PV_compilation_Supranta2019.hdf5\"\n",
"\n",
"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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# ks = [115, 53, 77, 105, 26, 61, 86, 29, 80, 21]\n",
"ks = [19, 8, 15, 0, 16, 6, 48, 38, 26, 44]\n",
"# ks = [19]\n",
"# ks = np.random.choice(50, 10, replace=False)\n",
"\n",
"# 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",
"\n",
" # 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",
"\n",
" # 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",
"\n",
" # 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",
"\n",
" # 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",
"\n",
"\n",
" # 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",
"\n",
" 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",
"\n",
" axs[0].set_yscale(\"log\")\n",
"\n",
" axs[0].legend(loc=\"upper right\")\n",
" axs[0].set_xlim(0, 200)\n",
"\n",
" 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()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Test running a model"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"23:08:02: reading the catalogue.\n",
"23:08:02: reading the interpolated field.\n",
"23:08:02: calculating the radial velocity.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/mnt/users/rstiskalek/csiborgtools/csiborgtools/flow/flow_model.py:113: UserWarning: The number of radial steps is even. Skipping the first step at 0.0 because Simpson's rule requires an odd number of steps.\n",
" warn(f\"The number of radial steps is even. Skipping the first \"\n"
]
}
],
"source": [
"# fpath_data = \"/mnt/extraspace/rstiskalek/catalogs/PV_compilation_Supranta2019.hdf5\"\n",
"# fpath_data = \"/mnt/extraspace/rstiskalek/catalogs/A2.h5\"\n",
"fpath_data = \"/mnt/extraspace/rstiskalek/catalogs/PV_mock_CB2_17417_large.hdf5\"\n",
"\n",
"simname = \"csiborg2_main\"\n",
"catalogue = \"CB2_large\"\n",
"loader = csiborgtools.flow.DataLoader(simname, 10, catalogue, fpath_data, paths, ksmooth=1)\n",
"get_model_kwargs = {\"zcmb_max\": 0.07}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Running HMC"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Selected 1000/1000 galaxies.\n"
]
}
],
"source": [
"model = csiborgtools.flow.get_model(loader, **get_model_kwargs)\n",
"model_kwargs = {\"sample_alpha\": True, \"sample_beta\": True, \"sample_h\": False}"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"kernel = NUTS(model, init_strategy=init_to_median(num_samples=100))\n",
"mcmc = MCMC(kernel, num_warmup=250, num_samples=500)\n",
"\n",
"rng_key = jax.random.PRNGKey(5)"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"sample: 100%|██████████| 750/750 [01:21<00:00, 9.25it/s, 7 steps of size 6.38e-01. acc. prob=0.89] \n"
]
}
],
"source": [
"mcmc.run(rng_key, **model_kwargs)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" mean std median 5.0% 95.0% n_eff r_hat\n",
" Vext_x 29.99 14.24 29.16 7.24 51.12 668.45 1.00\n",
" Vext_y 2.46 14.55 1.93 -21.38 26.45 564.90 1.00\n",
" Vext_z 44.35 14.36 43.95 21.69 67.45 680.67 1.00\n",
" alpha 0.89 0.06 0.89 0.81 0.99 623.96 1.00\n",
" beta 0.95 0.04 0.95 0.89 1.02 596.95 1.00\n",
" sigma_v 74.53 8.92 74.32 61.13 90.91 684.07 1.00\n",
"\n",
"Number of divergences: 0\n"
]
}
],
"source": [
"mcmc.print_summary()\n",
"samples = mcmc.get_samples(group_by_chain=False)\n",
"# print(csiborgtools.numpyro_gof(model, mcmc, model_kwargs))"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"|V| = 57.178871154785156 +- 14.913084983825684\n",
"l = 118.64846126054445 +- 16.786467620956774\n",
"b = -6.3910210700885655 +- 14.028581337650568\n",
"beta = 0.9534719586372375 +- 0.04203781858086586\n"
]
}
],
"source": [
"Vmag = np.sqrt(samples[\"Vext_x\"]**2 + samples[\"Vext_y\"]**2 + samples[\"Vext_z\"]**2)\n",
"\n",
"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",
"if \"beta\" in samples:\n",
" print(f\"beta = {np.mean(samples['beta'])} +- {np.std(samples['beta'])}\")"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABHIAAASMCAYAAADk06qFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3SU1fr28WuSkDIhCWWA0EIvQQkQQHpTkCZFOhgRRRHxSLOitIMCHkDFinSUohSRJqCAgFRBirRIh0BAJJS0oWSSef/gzfyIpMyEtEm+n7VmnWRmP/u5JyTnnFzZ+94Gq9VqFQAAAAAAAHI8l+wuAAAAAAAAAPYhyAEAAAAAAHASBDkAAAAAAABOgiAHAAAAAADASRDkAAAAAAAAOAmCHAAAAAAAACdBkAMAAAAAAOAkCHIAAAAAAACcBEEOAAAAAACAkyDIAQAAAAAAcBIEOUA2mDZtmoKDg5UvXz6NHTv2gdcPHjyoRo0aydfXV+XLl9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JCgkJsQU09o5LtHDhQhUtWjTTmjN37txZCxcu1Mcff6yoqCgVKVJEXbp00ZgxY1SxYsUHxn/77bcaNWqU5s+frxs3bigoKEhr1qxR06ZNM7y2a9euaerUqdq9e7eGDh2a5vhBgwZp7ty5un37ttq1a6fq1asrLCxMZrNZy5Yt08cff6wCBQrojTfe0EsvvSTpXviXP39+lSp
"text/plain": [
"<Figure size 1180x1180 with 25 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = [l, b, Vmag]\n",
"labels = [r\"$l$\", r\"$b$\", r\"$|\\bf{V}_{\\rm ext}|$\"]\n",
"if \"alpha\" in samples:\n",
" 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",
"\n",
"if \"h\" in samples:\n",
" data.append(samples[\"h\"])\n",
" labels.append(r\"$h$\")\n",
"\n",
"data = np.vstack(data).T\n",
"fig = corner.corner(data, labels=labels, show_titles=True, title_fmt=\".3f\", title_kwargs={\"fontsize\": 12}, smooth=1)\n",
"fig.savefig(f\"../plots/mock_{simname}_{catalogue}.png\", dpi=500, bbox_inches=\"tight\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Vizualize the results"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Functions to read in the results"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Reading SFI_groups fitted to Carrick2015 with ksmooth = 0.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"BIC = 8896.874023 +- 0.000000\n",
"AIC = 8866.249023 +- 0.000000\n",
"logZ = -4417.928711 +- 0.000000\n",
"chi2 = 0.000000 +- 0.000000\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABUQAAAVeCAYAAAC5MTGqAAAAOXRFWHRTb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OvHEEyscW7p0qTwej6688soKx88//3wtXbpUkuTxeDRnzhzdfvvtkqQJEybo7LPPVn5+foVr8vPzFR0dXeP7qsqqVav0008/6YUXXgjoHAAAAAAAAA4iEA1ys2fP1hNPPKHMzEylpqbq+eef1+mnn67jjjtOV1xxhSZOnHjE5zBw4MBDjnXt2lU9evRQZmZmrddbrVa1adOm3sZVZ9asWbJYLLriiisqHP/www/Nn6+++mqdeuqpuvrqq81jhYWFKiws1I4dO8zK0jVr1mj06NEBz+Hrr7/WunXrzPvk5eUpLCxMf/75p44//vhqz73xxhsBPwsAAAAAAKA5IhANYvfff78effRRXX311br22mv1r3/9S6NHj9arr76q7du369Zbb6322gMHDvjdtKdly5YKCQlsu1qfz6fdu3erR48eAV13pBw4cEBz5szRwIEDlZqaGtC10dHRGjFihB588EE9//zz+uKLL/Tbb79pxIgR1V5TWlqq0tJSeb1elZaWav/+/QoPD9fYsWN12WWXmePGjRunjh07asKECYqIiKj2HAAAAAAAAA4iEA1S3377rR599FHdc889mjp1qiSpTZs2uvjiizVhwgTddNNNiouLq/b6ZcuWaciQIX49a/PmzQGHiDNnztSOHTv08MMPB3TdkfLZZ58pNzf3kOXy/nrxxRd11VVXKSEhQe3bt9fs2bPVsmVL8/y5556rk08+Wffdd58kacqUKRUaIz366KN64403dPXVV8tms5nHo6KiFB0dbe4ZWtM5AAAAAAAASBafz+dr7Emg4V188cX68ssv5XQ6zb0sV65cqb59+yoyMlJbtmxR69atq71+7969WrlypV/POumkkxQZGen33P744w/1799fPXr00LfffqvQ0FC/rzX2BjXCw8MdZ7jiiis0d+5c7dy5UwkJCX7PBwAAAAAAAEcXKkSDkNfr1eeff65hw4ZV2djnmmuuqTEMlaQWLVoc0oW9PuzatUtDhw5VXFyc5s6dG1AYeqQUFhbqgw8+0Nlnn00YCgAAAAAA0MQRiAahTZs2qaCgQOnp6RWO5+TkSJJuueWWWu9RUlKiPXv2+PW8xMREv4LNvLw8nXvuudq3b5++/fZbtW3b1q/7H2nz58+vsrs8AAAAAAAAmp7AOt2gWTCCT4fDUeH4448/XuXxqnz33XdKSkry67Vt27Za77d//34NGzZM69ev14cffqhjjz22Du/syJg5c6aio6M1fPjwOt8jJydHQ4cOld1uV7du3fTFF1/UOP6ll15Senq6wsPDNXny5CrHLF++XCEhIZoyZUqdnwMAAAAAABBsqBANQkazpDVr1pjHZs2apW+++UbSwXCyNscff7wWLVrk1/PatGlT43mv16tLL71Uy5cv1wcffKATTzyx2rEej0dOp1MOh8Ov4PZw5eTkaPHixbr88ssrNCwK1C233KI2bdqY9xs1apQ2bNhQobFSeUlJSZo8ebJmzZpV5fmysjLdcccd6tev32E9BwAAAAAAINgQiAahtLQ0dezYUf/3f/8nm82mkJAQTZ06VaNGjdKcOXM0efJkjR8/Xj179qz2HvW5h+idd96pBQsWaNiwYdqzZ49mzJhR4XxGRob5848//qghQ4bowQcfrFA5+e9//1v79u1TVlaWJGnhwoXavn27JOkf//iHGQL7O84we/ZslZaWHtZy+cLCQs2fP1+bNm2SzWbT8OHD1bNnT33wwQe65pprqrxm5MiRkqSPP/64yvOvvPKK+vfvr7y8vMN6DgAAAAAAQLAhEA1CISEhmjdvnm666SY98cQTstlsuvPOO/XII48oOjpab731lk499dQaA9H69Msvv0g6GE4uXLjwkPPlA9HqPP3009q6dav573nz5mnevHnm9UbQ6e84w8yZM9WqVavDCn83bNig6OhotW/f3jzWs2dPrV27tk73y83N1XPPPafvv/9et99++xF7DgAAAAAAQHNEIBqkevfureXLlx9y/PXXX9frr7/eoHNZsmSJ32NPPfVU+Xy+Q45v2bLFr+v9HWeo6jMKVGFhoWJjYysci42NVW5ubp3uN3HiRN1+++2Kj48/os8BAAAAAABojmiqBBymk046SRaLpcrX/fffr+joaOXn51e4Jj8/X9HR0QE/a9WqVfrpp590/fXXH3KuPp8DAAAAAADQXFEhChympUuX1ni+sLBQhYWF2rFjh9q1ayfpYEOr0aNHB/ysr7/+WuvWrTPvk5eXp7CwMP355596/vnn6+05AAAAAAAAzRUVosARFh0drREjRujBBx9UUVGRPvzwQ/32228aMWJEtdeUlpZq//798nq9FX4eO3asNm7cqF9++UW//PKLhg8frltuuUXTpk2r03MAAAAAAACCDYEo0ABefPFFZWVlKSEhQePHj9fs2bPVsmVL8/y5556rxx57zPz3lClTFBUVpddee02PPvqooqKi9Pbbb8tms6lNmzbmKyoqStHR0eZ+orU9BwAAAAAAINhZfFV1qAEAAAAAAACAZogKUQAAAAAAAABBg0AUAAAAAAAAQNCgy/wRVFZWpqysLMXExMhisTT2dICjis/nU0FBgdq2bauQEP7bDAAAAAAAaBgEokdQVlaWkpOTG3sawFFt27Ztat++fWNPAwAAAAAABAkC0SMoJiZG0sHAJzY2tpFnAxxd8vPzlZycbP6dAAAAAAAANAQC0SPIWCYfGxtLIApUg+0kAAAAAABAQ2LjPgAAAAAAAABBg0AUAAAAAAAAQNAgEAUAAAAAAAAQNAhEAQAAAAAAAAQNAlEAAAAAAAAAQYNAFAAAAAAAAEDQIBAFAAAAAAAAEDQIRAEAAAAAAAAEDQJRAAAAAAAAAEGDQBQAAAAAAABA0CAQBQAAAAAAABA0CEQBAAAAAAAABA0
"text/plain": [
"<Figure size 1390x1390 with 36 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data, names, gof = read_samples(\"SFI_groups\", \"Carrick2015\", 0)\n",
"\n",
"fig = corner.corner(data, labels=names_to_latex(names, True), show_titles=True,\n",
" title_fmt=\".3f\", title_kwargs={\"fontsize\": 12}, smooth=1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### LOSS-only comparison"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"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)"
]
},
{
"cell_type": "code",
"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",
"metadata": {},
"source": [
"### Foundation-only comparison"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"FOUNDATION_Carrick_0 = read_samples(\"Foundation\", \"Carrick2015\", 0, return_MCsamples=True)\n",
"FOUNDATION_Carrick_1 = read_samples(\"Foundation\", \"Carrick2015\", 1, return_MCsamples=True)\n",
"\n",
"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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"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,)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### PantheonPlus-only comparison"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Reading Pantheon+ fitted to csiborg2_main with ksmooth = 0.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"BIC = 10056.015674 +- 27.407189\n",
"AIC = 10010.824268 +- 27.407189\n",
"logZ = -5006.756958 +- 48.432771\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading Pantheon+ fitted to csiborg2_main with ksmooth = 1.\n",
"BIC = 10027.133105 +- 13.850270\n",
"AIC = 9981.941699 +- 13.850270\n",
"logZ = -4981.690186 +- 6.885272\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n"
]
}
],
"source": [
"# PANTHEONP_Carrick_0 = read_samples(\"Pantheon+\", \"Carrick2015\", 0, return_MCsamples=True)\n",
"# PANTHEONP_Carrick_1 = read_samples(\"Pantheon+\", \"Carrick2015\", 1, return_MCsamples=True)\n",
"\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",
"# STILL RUNNING\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",
"execution_count": 59,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "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BP03nvvRfdBxAErpgAAAAAAKaWmpkYXXHCB7rjjDtXX16upqUknnXRSzy/wvRFN0FJZWSnTNLV169Y9Vt34/X6Vl5eroqJCfr9f27dv77ln48aNqqio6PUcu6/w6Q6holnhI0ljxozRsGHD9Nhjj/V6XkkaNWqUTjrpJD333HOSukKpK6+8Uu+//75efPFF5ebmRjXe7vb32ZSVlcnv92vHjh09r9XU1OxzrNWrV+uhhx7Sj3/84wPOe8UVV+xxOt6nv95888393p+Tk6PCwsJ9fvXm+em+Jj8/XxUVFVqyZEnPa0uWLFFlZaVyc3MP+HpeXt4+A7u9PfM7d+7Upk2bdPXVVysjI0MZGRn6xje+offff3+PzzpZEEwlgeDaVWr9219l+f2JLiVlNbZb+u1bfj31cTCq/2UEAAAAIPW0tbXJtm0VFxfLNE3985//jPrUuJKSEq1bt65X15aWlur000/XVVdd1fOL/bZt2/SPf/xDUtfWuTlz5ug73/mO2tvbVVNTo1tuucWR0+JuuummfZ7GZhiG7r77bt1+++26++671djYKKkr0Ln44ou1adOmvd63ceNG/fOf/9SkSZMkSVdddZXefvttvfTSS8rPz4+qhk/b32dTWVmp2bNn6/rrr1dnZ6fWrFmj3//+93sdZ8WKFfrzn/+sO++8s1eh0H333bfH6Xif/jryyCN7VX80/vd//1ctLS2ybVsLFizQ7bffrjPPPFOSdNFFF+mWW27Rtm3btG3bNt1666265JJLeu490OuXXXaZ7r77bm3ZskWdnZ36yU9+ouOOO05ZWVmfqaOwsFCjRo3SvffeK7/fL7/fr3vvvVcVFRX77MmVSARTCRbeUa8d139ToY3rtfO
"text/plain": [
"<Figure size 1200x1200 with 21 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"X = [\n",
" # PANTHEONP_Carrick_0,\n",
" # 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": [
"### 2MTF comparison"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"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"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"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,)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### SFI galaxies"
]
},
{
"cell_type": "code",
2024-04-08 22:14:43 +00:00
"execution_count": 2,
"metadata": {},
2024-04-08 22:14:43 +00:00
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Reading SFI_gals fitted to Carrick2015 with ksmooth = 0.\n",
"BIC = 28854.421875 +- 0.000000\n",
"AIC = 28805.011719 +- 0.000000\n",
"logZ = -14392.536133 +- 0.000000\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading SFI_gals fitted to Carrick2015 with ksmooth = 1.\n",
"BIC = 28930.990234 +- 0.000000\n",
"AIC = 28881.580078 +- 0.000000\n",
"logZ = -14433.558594 +- 0.000000\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading SFI_gals fitted to csiborg2_main with ksmooth = 0.\n",
"BIC = 28779.863770 +- 42.922014\n",
"AIC = 28730.453613 +- 42.922014\n",
"logZ = -14356.845068 +- 21.362802\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading SFI_gals fitted to csiborg2_main with ksmooth = 1.\n",
"BIC = 28646.324902 +- 24.227278\n",
"AIC = 28596.914746 +- 24.227278\n",
"logZ = -14288.365332 +- 12.050230\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n"
]
}
],
"source": [
"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)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"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",
"\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/SFI_gals_comparison.png\", dpi=500,)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### SFI groups"
]
},
{
"cell_type": "code",
2024-04-08 22:14:43 +00:00
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Reading SFI_groups fitted to Carrick2015 with ksmooth = 0.\n",
"BIC = 8896.874023 +- 0.000000\n",
"AIC = 8866.249023 +- 0.000000\n",
"logZ = -4417.928711 +- 0.000000\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading SFI_groups fitted to Carrick2015 with ksmooth = 1.\n",
"BIC = 8957.607422 +- 0.000000\n",
"AIC = 8926.982422 +- 0.000000\n",
"logZ = -4447.800293 +- 0.000000\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
2024-04-08 22:14:43 +00:00
"Reading SFI_groups fitted to csiborg2_main with ksmooth = 0.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"BIC = 8782.843457 +- 17.080250\n",
"AIC = 8752.218457 +- 17.080250\n",
"logZ = -4362.511084 +- 8.475959\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading SFI_groups fitted to csiborg2_main with ksmooth = 1.\n",
"BIC = 8726.997656 +- 21.534941\n",
"AIC = 8696.372656 +- 21.534941\n",
"logZ = -4333.264429 +- 10.550374\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n"
]
}
],
"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-08 22:14:43 +00:00
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
2024-04-08 22:14:43 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABKYAAASlCAYAAACSitFIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd3hb9fn+8fscLW87nnESOyGJ7ezFaCBQRsumQFmlhRYoO120tFA2/QJNmIWSDiirQMNo4UcLLRQoexMggwzHznK2Yyfe1j6/P1y7CcRb0pHk9+u6dJVY0jmPjxQV3Tyf52NYlmUJAAAAAAAAiDHT7gIAAAAAAAAwNBFMAQAAAAAAwBYEUwAAAAAAALAFwRQAAAAAAABsQTAFAAAAAAAAWxBMAQAAAAAAwBYEUwAAAAAAALCF0+4CYi0cDmvLli3KzMyUYRh2lwNEjWVZam5u1ogRI2SaZNAAAAAAgPgz5IKpLVu2qKSkxO4ygJjZuHGjRo0aZXcZAAAAAAB8yZALpjIzMyV1fFnPysqyuRogepqamlRSUtL1ngcAAAAAIN4MuWCqc/leVlYWwRSGBJasAgAAAADiFYNnAAAAAAAAYAuCKQAAAAAAANiCYAoAAAAAAAC2IJgCAAAAAACALYbc8HMAAAAAwOAFt21RqGFXVM/hyBkm5/ARUT0HAHsRTAEAAAAA+iW4bYs2n3qU5PdF90Ruj0Y+8zLhFDR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3bu362fv16jRo1SpKUnp6utra2rvu+OHRc0h7LEmtra+Xz+bo6nc444wy9/vrr2r59u6ZPn67vfve7ffpdysvLNWbMGD355JPdPmb3DqEXXnhBBx98cJ87hHrzxevUV71dz768RrtbvXq1HnroIf3qV7/q9dyXXHLJl3ay2/329ttvd/vcrKws5efnd3v74vV45513tH37dpWXlys/P18nnXSSmpqalJ+frw8//LDX+/vjgQce0DnnnCOn09nj4yZPnqyXX35ZdXV1Wrx4sXw+nw499NB+nWtvCKZiqL41rIWf+NTut3p/MLoVbm5S87NPqPXVFxVubbG7HAAAAABxYNeuXbr22mu1atUqhUIhtbW16a677lJubq4mTJgQkXOUlJRozpw5uvrqq9Xe3q6qqqpehz+PHDlShx9+uH7+85+rtbVVNTU1uuWWW7p2fZs1a5Yee+wxBYNBLV68WI899tiXjnHfffepsrJS7e3tuvLKK/XVr35Vo0aNUmVlpV555RW1t7fL7XYrIyNjj3Dhxhtv7HYnPcMwdO+992r+/Pm69957VV9fL6kjqDn//PP7PaMrGAzK6/UqGAwqHA7L6/XK7/d33f/000+rqalJlmVp0aJFmj9/vk499dQ+1bq73q5nf16jlStX6tFHH9Udd9zRp6Dsj3/845d2stv9dsghh/R6jL4644wzVF1drcWLF2vx4sV64IEHlJmZqcWLF2vmzJm93i/1/ppIHUPN33vvPZ1//vm91rR06VK1trbK7/fr2Wef1UMPPaRrr7120L8rwVQM/eBvbfrrYr9++UJb7w/GXnmXfKJt55+hcMMu+Vcs1bbzTlP7h+/aXRYAAAAwpDhyhkluT/RP5PZ0nKsvD/3vPKfjjjtO2dnZKi0t1bvvvqsXX3yx30v2erJw4UKtXbtWRUVFOvPMM3X22WfL4+n5WixcuFDt7e0aPXq05syZo+OPP15XXHGFJOnee+/V+++/r5ycHF155ZVdAcvuvv/97+vb3/62ioqKtHnzZv3lL3+RJPn9fl133XUqKipSXl6eXnvttT1mV9XU1GjOnDnd1nXCCSfoxRdf1D//+U+NGzdOOTk5Ou200zRhwgQ
"text/plain": [
"<Figure size 1200x1200 with 21 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"X = [\n",
" SFIGROUP_Carrick_0,\n",
2024-04-08 22:14:43 +00:00
" SFIGAL_Carrick_0,\n",
" # SFIGROUP_Carrick_1,\n",
" # SFIGROUP_CB2_0,\n",
2024-04-08 22:14:43 +00:00
" # SFIGROUP_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",
2024-04-08 22:14:43 +00:00
"g.export(f\"../plots/SFI_gals_vs_groups_comparison.png\", dpi=500,)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Mock CB2"
]
},
{
"cell_type": "code",
2024-04-02 08:28:57 +00:00
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
2024-04-02 08:28:57 +00:00
"Reading CB2_small fitted to csiborg2_main with ksmooth = 0.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"BIC = 1518.694963 +- 15.561768\n",
"AIC = 1503.063981 +- 15.561768\n",
"logZ = -729.645736 +- 6.980612\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading CB2_small fitted to csiborg2_main with ksmooth = 1.\n",
"BIC = 1518.014282 +- 8.280079\n",
"AIC = 1502.383301 +- 8.280079\n",
"logZ = -729.024292 +- 3.814355\n",
"chi2 = 0.000000 +- 0.000000\n",
2024-04-02 08:28:57 +00:00
"Removed no burn in\n",
"\n",
"Reading CB2_large fitted to csiborg2_main with ksmooth = 0.\n",
"BIC = 15105.077799 +- 87.731996\n",
"AIC = 15075.631510 +- 87.731996\n",
"logZ = -7522.603353 +- 43.492664\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading CB2_large fitted to csiborg2_main with ksmooth = 1.\n",
"BIC = 15060.599154 +- 74.488955\n",
"AIC = 15031.152865 +- 74.488955\n",
"logZ = -7499.548372 +- 37.140741\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n"
]
}
],
"source": [
"SMALLMOCK_CB2_0 = read_samples(\"CB2_small\", \"csiborg2_main\", 0, return_MCsamples=True)\n",
2024-04-02 08:28:57 +00:00
"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",
2024-04-02 08:28:57 +00:00
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
2024-04-02 08:28:57 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABKYAAASlCAYAAACSitFIAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd5hcZf3+8ftM3V6TTduSvmkkISEQqgSR3n40EfhKLyIiWEBAkSIEQVCKCgoYUJEiSpcmIL0kkATSE1I2dUuyfaee8/tj3TWbZNvMOTOzu+/Xdc1lMnPOcz57cpLLuXmez2NYlmUJAAAAAAAASDBXsgsAAAAAAADAwEQwBQAAAAAAgKQgmAIAAAAAAEBSEEwBAAAAAAAgKQimAAAAAAAAkBQEUwAAAAAAAEgKgikAAAAAAAAkhSfZBSSaaZravHmzsrOzZRhGsssBHGNZlhoaGjR8+HC5XGTQAAAAAIDUM+CCqc2bN6ukpCTZZQAJU1FRoeLi4mSXAQAAAADAbgZcMJWdnS2p9ct6Tk5OkqsBnFNfX6+SkpL2Zx4AAAAAgFQz4IK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W8uWLes0cEu0hx9+WAcffLDGjRu322f333+/SktLlZ2drbPOOkuXXXaZfvjDH0rq/nnsyZ/JpZde2uH3P/nJT/T1r39d06ZNU0lJiZqbm/XnP//Z4TsQO8MaYNN36uvrlZubq7q6OuXk5CTsuoHPP1XD3/+qgquu17b
"text/plain": [
"<Figure size 1200x1200 with 21 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"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",
" ]\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,)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### External flow consistency"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Carrick2015"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"X = [\n",
" # LOSS_Carrick_0,\n",
" # FOUNDATION_Carrick_0,\n",
" PANTHEONP_Carrick_0,\n",
" TWOMTF_Carrick_0,\n",
" SFIGAL_Carrick_0,\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/Carrick2015_external_flow.png\", dpi=500,)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### CSiBORG1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"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,)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### CSiBORG2"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"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,)"
]
},
{
"cell_type": "code",
"execution_count": 67,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Reading SFI_gals fitted to Carrick2015 with ksmooth = 1.\n",
"Subtracting LG velocity with kernel 0.0 Mpc / h.\n",
"BIC = 28930.990234 +- 0.000000\n",
"AIC = 28881.580078 +- 0.000000\n",
"logZ = -14433.558594 +- 0.000000\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading SFI_groups fitted to Carrick2015 with ksmooth = 1.\n",
"Subtracting LG velocity with kernel 0.0 Mpc / h.\n",
"BIC = 8957.607422 +- 0.000000\n",
"AIC = 8926.982422 +- 0.000000\n",
"logZ = -4447.800293 +- 0.000000\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading SFI_gals fitted to csiborg2_main with ksmooth = 1.\n",
"Subtracting LG velocity with kernel 0.0 Mpc / h.\n",
"BIC = 28646.324902 +- 24.227278\n",
"AIC = 28596.914746 +- 24.227278\n",
"logZ = -14288.365332 +- 12.050230\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n",
"\n",
"Reading SFI_groups fitted to csiborg2_main with ksmooth = 1.\n",
"Subtracting LG velocity with kernel 0.0 Mpc / h.\n",
"BIC = 8726.997656 +- 21.534941\n",
"AIC = 8696.372656 +- 21.534941\n",
"logZ = -4333.264429 +- 10.550374\n",
"chi2 = 0.000000 +- 0.000000\n",
"Removed no burn in\n"
]
}
],
"source": [
"k = 1\n",
"LG = 0\n",
"\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",
"# PANTHEON_Carrick_LG = read_samples(\"Pantheon+\", \"Carrick2015\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
"# TWOMTF_Carrick_LG = read_samples(\"2MTF\", \"Carrick2015\", k, return_MCsamples=True, subtract_LG_velocity=LG)\n",
"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",
"\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",
"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",
"\n",
"# # CSiBORG1\n",
"# 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)"
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Removed no burn in\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:root:2D kernel density bandwidth optimizer failed for Vmag, l. Using fallback width: f(a) and f(b) must have different signs\n",
"WARNING:root:2D kernel density bandwidth optimizer failed for l, b. Using fallback width: f(a) and f(b) must have different signs\n",
"WARNING:root:2D kernel density bandwidth optimizer failed for l, b. Using fallback width: f(a) and f(b) must have different signs\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk0AAAJOCAYAAACq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ZmwmKxoK6uzv3cuXPnkJmZ6fMz4ElpaSn++9//4rnnnuuy3wcffBBqtdrrY8eOHT6v12q1SExM9PrwlRRfaufOnairq0NeXh4SExOxePFiGAwGJCYmYt++fQB8v//Nzc04f/48Hn30USiVSiiVSvzyl7/Evn370NjY2OXxYOIJJUqa+hCO4/HeHovPc3iex7lz57B161Zs3LgRR44cgdVq9X2N1Qrjlu/R8uZr0P3zrzAf2AOe44QMnRC/tbS04JlnnsGpU6fgdDphMpnw+uuvIz4+3u81M13JysrClClT8NRTT8FsNuP06dP417/+BQBoa2sDz/NITk4Gy7JYt26dz7vRSkpKsGnTJpjNZkilUqjVaojFrmowzz77LGbOnOnxOoZh8MYbb+Dll1/GG2+8gaamJgCuL+d77rnH61quc+fOYd26de671B555BHs2rULmzZt8ms0ZtGiRZ3uTvO3ja1bt2LhwoUBtQu41q9YLBb3w2q1gmEY/P3vf8cLL7yAf/zjH6ivrwfgmrIsKiry2bev3+mlMjIyUFBQgCeeeAJGoxEVFRV44YUXcNddd/n8DFzq5MmT+OCDD/Daa6/5lbC88847ne7uvPQxbdo0v+IPRPvv2eFwgOM4WCwW2Gw2LF26FGVlZSgsLERhYSHee+89aDQaFBYWYsyYMQB8v/+JiYnIzc3FW2+95X4P33rrLWRmZrqTOF/HL+V
"text/plain": [
"<Figure size 600x600 with 6 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"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",
" # LOSS_Carrick_LG,\n",
" # FOUNDATION_Carrick_LG,\n",
" # PANTHEON_Carrick_LG,\n",
" # TWOMTF_Carrick_LG,\n",
" # SFIGAL_Carrick_LG,\n",
" # SFIGROUPS_Carrick_LG,\n",
" # LOSS_CB1_LG,\n",
" # FOUNDATION_CB1_LG,\n",
" # PANTHEON_CB1_LG,\n",
" # TWOMTF_CB1_LG,\n",
" # SFIGAL_CB1_LG,\n",
" # LOSS_CB2_LG,\n",
" # FOUNDATION_CB2_LG,\n",
" # PANTHEON_CB2_LG,\n",
" # TWOMTF_CB2_LG,\n",
" SFIGAL_CB2_LG,\n",
" SFIGROUP_CB2_LG,\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, params=params, filled=True, legend_loc='upper right', )\n",
"# g.export(f\"../plots/ALL_dipole.png\", dpi=500,)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "venv_csiborg",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}