mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-23 08:08:03 +00:00
900 lines
390 KiB
Text
900 lines
390 KiB
Text
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Constraining MAH in $\\texttt{BORG}$"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import numpy as np\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"from matplotlib.cm import ScalarMappable\n",
|
||
|
"from matplotlib.colors import Normalize\n",
|
||
|
"from cache_to_disk import delete_disk_caches_for_function\n",
|
||
|
"from scipy.stats import norm\n",
|
||
|
"from scipy.signal import savgol_filter\n",
|
||
|
"\n",
|
||
|
"from mah import *\n",
|
||
|
"\n",
|
||
|
"%load_ext autoreload\n",
|
||
|
"%autoreload 2\n",
|
||
|
"%matplotlib inline"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## $\\texttt{MDPL2}$ to $\\texttt{CB2}$ MAH comparison"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 11,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnYAAAHVCAYAAAB8NLYkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydd3wkdf3/n5+Z7T39Uq/3CgdH7yAcIEhHURFRFMGGP1Es2L8WUBE8EQVBQZAmAtKk93pwvff0nu1lyuf3xyR7ud42l+Runo9HH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K9fRyJcRLKkAgGMePsVjr7+KhzZ7afptFWraZtzEgC50irKDj2CTHkluYoR6JVVGJVV6JVV5Coq0coqKHG5ADAmTGDN7+/YrTXrRcX0nHBKQZ7/jpBSktFMkjmdRFYnmdVJZg2SOY1ExhJt6ZyBYVoCWDdNTLMvlGZ9+DnUzeKsT6CpToGqgCr6Imz7sUlNyvwHc3GumVM67kWVOv+q/l5+l5mxV5iaeJuEoygv7HxGlNM67iWphrcQdht9U1EwkWKzZN/gm86PJz6+zanfKdr8mdR30bBRVrDG/1nr4qErlb+IWKBPI6MZZNtNNKMdKSWm3DLdvPVT6ouSKb0RMKVvm6L0u3/gXuuIjFJFGxEZJ0yCCDHCMk6YOBFi3KJcTqsoA6xo2RfkIzs81pOcRBOWsFMwqaAzf18CL1290bIuESaHM3/fs+I4XlaPoIswplB3ut4VYiwrxNjdem6G2FJGKdLYfHwhOMd4iZmsBOBDOZHFjGW1rGOtUofPCXfp38NAYVndZ8n4j0AIwTJZQ0s
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"min_age = 2.8\n",
|
||
|
"pmin, pmax = 5, 95\n",
|
||
|
"bounds = [14.5, 14.7]\n",
|
||
|
"mass_norm = 10**np.mean(bounds)\n",
|
||
|
"alphas = {3: 0.25, 2: 0.5, 1: 0.75}\n",
|
||
|
"xrange_cb2, random_mah_cb2 = extract_mah(\"csiborg2_random\", bounds, \"MainProgenitorMass\", min_age=2.8)\n",
|
||
|
"xrange_mdpl2, random_mah_mdpl2 = extract_mah_mdpl2(bounds, min_age=2.8)\n",
|
||
|
"\n",
|
||
|
"random_mah_cb2 /= random_mah_cb2[:, -1].reshape(-1, 1)\n",
|
||
|
"random_mah_mdpl2 /= random_mah_mdpl2[:, -1].reshape(-1, 1)\n",
|
||
|
"# random_mah_cb2 /= mass_norm\n",
|
||
|
"# random_mah_mdpl2 /= mass_norm\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"plt.figure()\n",
|
||
|
"cols = plt.rcParams[\"axes.prop_cycle\"].by_key()[\"color\"]\n",
|
||
|
"for n in [3, 2, 1]:\n",
|
||
|
" pmin, pmax = norm.cdf(-n) * 100 , norm.cdf(n) * 100\n",
|
||
|
" ylow, yhigh = np.percentile(random_mah_mdpl2, [pmin, pmax], axis=0)\n",
|
||
|
" plt.fill_between(xrange_mdpl2, ylow, yhigh, alpha=alphas[n], color=cols[0],\n",
|
||
|
" facecolor=cols[0], label=f\"MDPL2 Random ({len(random_mah_mdpl2)})\" if n == 1 else None)\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"pmin, pmax = norm.cdf(-1) * 100 , norm.cdf(1) * 100\n",
|
||
|
"ylow, yhigh = np.percentile(random_mah_cb2, [pmin, pmax], axis=0)\n",
|
||
|
"plt.plot(xrange_cb2, ylow, c=cols[1], ls=\"--\", label=rf\"$1\\sigma$ CB2 Random ({len(random_mah_cb2)})\", zorder=1)\n",
|
||
|
"plt.plot(xrange_cb2, yhigh, c=cols[1], ls=\"--\", zorder=1)\n",
|
||
|
"\n",
|
||
|
"pmin, pmax = norm.cdf(-2) * 100 , norm.cdf(2) * 100\n",
|
||
|
"ylow, yhigh = np.percentile(random_mah_cb2, [pmin, pmax], axis=0)\n",
|
||
|
"plt.plot(xrange_cb2, ylow, c=cols[1], ls=\"dotted\", label=rf\"$2\\sigma$ CB2 Random ({len(random_mah_cb2)})\", zorder=1)\n",
|
||
|
"plt.plot(xrange_cb2, yhigh, c=cols[1], ls=\"dotted\", zorder=1)\n",
|
||
|
"\n",
|
||
|
"# plt.fill_between(xrange_mdpl2,\n",
|
||
|
"# np.ones_like(xrange_mdpl2) * 10**bounds[0] / mass_norm,\n",
|
||
|
"# np.ones_like(xrange_mdpl2) * 10**bounds[1] / mass_norm, alpha=0.25,\n",
|
||
|
"# label=r\"$z = 0$ selection\", color=\"gray\", zorder=0,\n",
|
||
|
"# hatch=\"///\")\n",
|
||
|
"\n",
|
||
|
"# They appear to be plotting the min-max\n",
|
||
|
"plt.plot(RANDOM_MAH_Sorce_Virgo_UPPER[:, 0],\n",
|
||
|
" RANDOM_MAH_Sorce_Virgo_UPPER[:, 1], c=\"red\", ls=\"--\", label=\"Sorce+2016 Virgo randoms\")\n",
|
||
|
"plt.plot(RANDOM_MAH_SORCE_Virgo_LOWER[:, 0],\n",
|
||
|
" RANDOM_MAH_SORCE_Virgo_LOWER[:, 1], c=\"red\", ls=\"--\")\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"plt.yscale(\"log\")\n",
|
||
|
"plt.legend(loc=\"lower right\")\n",
|
||
|
"plt.xlabel(r\"$\\mathrm{Age} ~ [\\mathrm{Gyr}]$\")\n",
|
||
|
"plt.ylabel(r\"$M_{\\rm main}(t) / M_{\\rm main}(z = 0)$\")\n",
|
||
|
"plt.xlim(xrange_mdpl2.min(), xrange_mdpl2.max())\n",
|
||
|
"plt.ylim(1e-2, 1.01)\n",
|
||
|
"\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.savefig(\"../../plots/MAH_MDPL2_CB2_comparison_VIRGO.png\", dpi=450)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## MAH of specific clusters in $\\texttt{CB}$\n",
|
||
|
"\n",
|
||
|
"### Summary plot"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"nsim0 = 17417\n",
|
||
|
"simname = \"csiborg2_main\"\n",
|
||
|
"min_logmass = 12.25\n",
|
||
|
"delete_cache = False\n",
|
||
|
"\n",
|
||
|
"if delete_cache:\n",
|
||
|
" delete_disk_caches_for_function(\"load_data\")\n",
|
||
|
"cat0, catxs, merger_trees, overlaps = load_data(nsim0, simname, min_logmass)\n",
|
||
|
"nsimxs = [cat.nsim for cat in catxs]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 32,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"catx = cat0"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 35,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"pos = catx[\"spherical_pos\"]\n",
|
||
|
"\n",
|
||
|
"ra, dec = pos[:, 1], pos[:, 2]\n",
|
||
|
"l, b = csiborgtools.flow.radec_to_galactic(pos[:, 1], pos[:, 2])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 36,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"70.92198581560284"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 36,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"50 / 0.705"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 45,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"79.66499999999999"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 45,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"113 * 0.705"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 61,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioA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YcOHVJhYaG6dOmijh07avTo0aqoqGitkgAAgOVaJai8/fbbevLJJ3XmmWdGrL/tttv0pz/9Sc8//7zWrVun8vJyXXHFFa1REgAAiAFRDyrffPONxowZo6efflrJycnh9YFAQL/5zW/04IMP6pJLLlFOTo4WLlyoN998U2+99Va0ywIAADEg6kGlsLBQI0aMUH5+fsT6jRs3qrq6OmJ9v3791L17d5WUlDT5fJWVlQoGgxELAABom6J6Mu1zzz2nd999V2+//fZR2/x+v9xut5KSkiLWp6Wlye/3N/mcxcXFmj179okuFQAAWChqR1R27typn//851qyZInatWt3wp63qKhIgUAgvOzcufOEPTcAALBL1I6obNy4UXv27NHZZ58dXldbW6vXX39djz76qFauXKmqqirt27cv4qhKRUWF0tPTm3xej8cjj8cTrbIBtDa3W7r7bqerAGCpqAWVoUOH6sMPP4xYd8MNN6hfv3664447lJWVpcTERK1evVqjR4+WJJWWlqqsrEx5eXnRKgsAAMSQqAWVTp066YwzzohYd8opp6hLly7h9ePHj9fkyZPVuXNneb1e3XrrrcrLy9O5554brbIAAEAMcfTOtL/+9a8VFxen0aNHq7KyUgUFBXr88cedLAlAa6upkV54IdS+4gpuoQ8ggssYY5wu4vsIBoPy+XwKBALyer1OlwOgpaqqpDlzQu3p00P
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"mask = (pos[:, 0] > 83.5) & (catx[\"totmass\"] > 1e14) & (pos[:, 0] < 84) & (catx[\"totmass\"] < 4e14)\n",
|
||
|
"\n",
|
||
|
"plt.figure()\n",
|
||
|
"plt.scatter(ra[mask], dec[mask], s=20, c=np.log10(catx[\"totmass\"][mask]))\n",
|
||
|
"plt.axvline(csiborgtools.hms_to_degrees(11, 44), zorder=0, ls=\"--\", color=\"red\", alpha=0.5)\n",
|
||
|
"plt.axhline(csiborgtools.dms_to_degrees(19, 45), zorder=0, ls=\"--\", color=\"red\", alpha=0.5)\n",
|
||
|
"# plt.axvline(285, zorder=0)\n",
|
||
|
"# plt.axhline(74, zorder=0)\n",
|
||
|
"plt.xlim(0, 360,)\n",
|
||
|
"plt.ylim(-90, 90)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 62,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(array([1.1764427e+14], dtype=float32),\n",
|
||
|
" array([83.93529855]),\n",
|
||
|
" array([184.62410722]),\n",
|
||
|
" array([315], dtype=int32))"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 62,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"cat0[\"totmass\"][mask], cat0[\"dist\"][mask], pos[:, 1][mask], cat0[\"index\"][mask]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 120,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"24"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 120,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"mask = (cat0[\"dist\"] < 100) & (cat0[\"totmass\"] > 2e14)\n",
|
||
|
"mask.sum()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 121,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"(array([1.3149970e+15, 4.9394832e+14, 3.9707187e+14, 3.6969589e+14,\n",
|
||
|
" 3.5838989e+14, 3.4054645e+14, 3.2880589e+14, 3.2858516e+14,\n",
|
||
|
" 3.1561675e+14, 3.0209864e+14, 2.9957615e+14, 2.9370144e+14,\n",
|
||
|
" 2.8257113e+14, 2.7131389e+14, 2.5883651e+14, 2.5817466e+14,\n",
|
||
|
" 2.3839617e+14, 2.3532438e+14, 2.2714606e+14, 2.2489048e+14,\n",
|
||
|
" 2.1780584e+14, 2.1020473e+14, 2.1004685e+14, 2.0899980e+14],\n",
|
||
|
" dtype=float32),\n",
|
||
|
" array([ 2, 23, 31, 38, 39, 44, 49, 50, 56, 62, 65, 66, 69,\n",
|
||
|
" 75, 82, 83, 97, 100, 108, 109, 114, 122, 124, 125], dtype=int32))"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 121,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"cat0[\"totmass\"][mask], cat0[\"index\"][mask]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 133,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"array([0.25819606, 0.43737528, 0.51124454, 0.46384627, 0.26452401,\n",
|
||
|
" 0.32776746, 0.3836844 , 0.56561893, 0.22747411, 0.57970226,\n",
|
||
|
" 0.19699863, 0.55168611, 0.38103878, 0.19168761, 0.34359506,\n",
|
||
|
" 0.39914343, 0.74848348, 0.65658271, 0.61172086])"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 133,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"overlaps.max_overlap(0, True)[108]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 135,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stderr",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"Cross main progenitors: 0%| | 0/19 [00:00<?, ?it/s]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"name": "stderr",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"Cross main progenitors: 100%|██████████| 19/19 [00:06<00:00, 2.98it/s]\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"Appending main progenitor for 17417.\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"data = extract_main_progenitor_maxoverlap(108, overlaps, merger_trees)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 136,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"mean = 14.2311, std = 0.1513\n",
|
||
|
"Found 2629 haloes in CB2 random.\n",
|
||
|
"Found 18572 haloes in MDPL2.\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"logmp = np.log10(np.array([data[nsim][\"MainProgenitorMass\"][0] for nsim in data.keys()]))\n",
|
||
|
"\n",
|
||
|
"mean, std = np.mean(logmp), np.std(logmp)\n",
|
||
|
"print(f\"mean = {mean:.4f}, std = {std:.4f}\")\n",
|
||
|
"\n",
|
||
|
"bounds = [mean - 1 * std, mean + 1 * std]\n",
|
||
|
"\n",
|
||
|
"xrange_cb2, random_mah_cb2 = extract_mah(\"csiborg2_random\", bounds, \"MainProgenitorMass\", min_age=2.8)\n",
|
||
|
"xrange_mdpl2, random_mah_mdpl2 = extract_mah_mdpl2(bounds, min_age=2.8)\n",
|
||
|
"\n",
|
||
|
"print(f\"Found {len(random_mah_cb2)} haloes in CB2 random.\")\n",
|
||
|
"print(f\"Found {len(random_mah_mdpl2)} haloes in MDPL2.\")\n",
|
||
|
"\n",
|
||
|
"age, mah = summarize_extracted_mah(simname, data, nsim0, nsimxs, \"MainProgenitorMass\", min_age=2.8)\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"random_mah_cb2 /= random_mah_cb2[:, -1].reshape(-1, 1)\n",
|
||
|
"random_mah_mdpl2 /= random_mah_mdpl2[:, -1].reshape(-1, 1)\n",
|
||
|
"mah /= mah[:, -1].reshape(-1, 1)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 137,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnYAAAHWCAYAAAD6oMSKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA+GklEQVR4nO3de3wU5d3///cmgSySZDVBTALhYCyhISQSaihYtZggyU1jUB8euCUiaFtT0VIULd5fjWltEW0RWynaVsWWHtT7LiBqoUjloAUDCalEFCGNyGEhQkpO3gm6O78/+GVvlmSTbNjj5PV8PPahM3vNtZ8dJuHNzDXXWAzDMAQAAICwFxHsAgAAAOAbBDsAAACTINgBAACYBMEOAADAJAh2AAAAJkGwAwAAMAmCHQAAgEkQ7AAAAEwiKtgFhAOn06kjR44oNjZWFosl2OUAAIA+xDAMNTU1KTk5WRERXZ+TI9j1wJEjR5SSkhLsMgAAQB928OBBDR06tMs2BLseiI2NlXR6h8bFxQW5GgAA0Jc0NjYqJSXFlUe6QrDrgfbLr3FxcQQ7AAAQFD0ZDsbNEwAAACZBsAMAADAJgh0AAIBJEOwAAABMgmAHAABgEgQ7AAAAkyDYAQAAmATBDgAAwCQIdgAAACZBsAMAADAJHikGAPArh9NQeW296ppaNTjWqpyR8YqM6P7RSAC8R7ADAPjNumq7ytbukb2h1bUuyWZVaWG68jOSglgZYE5cigUA+MW6artKVla6hTpJOtrQqpKVlVpXbQ9SZYB5EewAAD7ncBoqW7tHRifvta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
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure()\n",
|
||
|
"# plt.hist(logmp, bins=\"auto\")\n",
|
||
|
"plt.scatter(np.arange(len(logmp)), logmp)\n",
|
||
|
"plt.xlabel(\"Simulation index\")\n",
|
||
|
"plt.ylabel(r\"$\\log M ~ [M_\\odot / h]$\")\n",
|
||
|
"# plt.axhline(mean, c=\"red\", ls=\"--\")\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"plt.savefig(\"../../plots/COMA_MASS.png\", dpi=450)\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 138,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk4AAAGGCAYAAACNCg6xAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAADimklEQVR4nOz9aaxkeX7XDX7OvsS+3X3Nfa2lq7p6p922x6ZhbDEjBsQbDEh4kMwbLITAQvgF4h0YBCpkDY/AIzHPwACP/WAb48Ztt912t129Vld3V2VWbjfvHvt29m1enHuzsrq2XO4S9+b5SEcRcW/kjX9GnDjne37L9yckSZKQkZGRkZGRkZHxkYjHvYCMjIyMjIyMjJNCJpwyMjIyMjIyMh6RTDhlZGRkZGRkZDwimXDKyMjIyMjIyHhEMuGUkZGRkZGRkfGIZMIpIyMjIyMjI+MRyYRTRkZGRkZGRsYjkgmnjIyMjIyMjIxHJBNOGRkZGRkZGRmPSCacMjIyMjIyMjIekUw4ZWRkZGRkZGQ8Is+ccPqt3/otLl68yPnz5/nf/rf/7biXk5GRkZGRk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/7tV/jr/7Vv0qr1eKf/JN/ws7ODi+88AL/83/+z/cUjGdkZLyXJEnF0XicCiTLSugOYvqjCD+M8YKYRErrZjQ9QS8nlA3QT0nkKEnAHgsMhwLDvsBoKDAaiPR6CZ0uDEfJXooxImIvqqEFKGaEVokwFyI0M91U/ejqVSaBJAHXknCHMvZQxhml4sgZylhDmfFAwh5KhL6QFqXvRYckLUA0AkTDRTJ85NkQw/SRjRDZ9JHMANkIEOXJjwgp0Tt1QlI
|
||
|
"text/plain": [
|
||
|
"<Figure size 600x400 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"pmin, pmax = 0.15, 100 - 0.15\n",
|
||
|
"# norm_mass = 10**np.nanmean(np.log10(mah[:, -1]))\n",
|
||
|
"norm_mass = 1\n",
|
||
|
"alphas = {3: 0.25, 2: 0.5, 1: 0.75}\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"plt.figure(figsize=(6, 4))\n",
|
||
|
"cols = plt.rcParams[\"axes.prop_cycle\"].by_key()[\"color\"]\n",
|
||
|
"lw = plt.rcParams[\"lines.linewidth\"]\n",
|
||
|
"\n",
|
||
|
"for n in [3, 2, 1]:\n",
|
||
|
" pmin, pmax = norm.cdf(-n) * 100 , norm.cdf(n) * 100\n",
|
||
|
" ylow, yhigh = np.percentile(random_mah_mdpl2 / norm_mass, [pmin, pmax], axis=0)\n",
|
||
|
"\n",
|
||
|
" ylow = savgol_filter(ylow, 5, 1, mode=\"interp\")\n",
|
||
|
" yhigh = savgol_filter(yhigh, 5, 1, mode=\"interp\")\n",
|
||
|
" plt.fill_between(xrange_mdpl2, ylow, yhigh, alpha=alphas[n], color=cols[0],\n",
|
||
|
" facecolor=cols[0], zorder=0, edgecolor=\"blue\",\n",
|
||
|
" label=f\"MDPL2 Random ({len(random_mah_mdpl2)})\" if n == 1 else None)\n",
|
||
|
" \n",
|
||
|
" # pmin, pmax = norm.cdf(-n) * 100 , norm.cdf(n) * 100\n",
|
||
|
" # ylow, yhigh = np.percentile(random_mah_cb2 / norm_mass, [pmin, pmax], axis=0)\n",
|
||
|
" # ylow = savgol_filter(ylow, 5, 1, mode=\"interp\")\n",
|
||
|
" # yhigh = savgol_filter(yhigh, 5, 1, mode=\"interp\")\n",
|
||
|
" # plt.fill_between(xrange_cb2, ylow, yhigh, alpha=alphas[n], color=cols[0],\n",
|
||
|
" # facecolor=cols[0], zorder=0, edgecolor=\"blue\",\n",
|
||
|
" # label=f\"CB2 Random ({len(random_mah_cb2)})\" if n == 1 else None)\n",
|
||
|
"\n",
|
||
|
" if n == 3:\n",
|
||
|
" continue\n",
|
||
|
"\n",
|
||
|
" ylow, yhigh = np.percentile(mah / norm_mass, [pmin, pmax], axis=0)\n",
|
||
|
" ylow = savgol_filter(ylow, 5, 1, mode=\"interp\")\n",
|
||
|
" yhigh = savgol_filter(yhigh, 5, 1, mode=\"interp\")\n",
|
||
|
" plt.fill_between(age, ylow, yhigh, alpha=alphas[n] / 2,\n",
|
||
|
" label=\"Coma\" if n == 1 else None, zorder=1,\n",
|
||
|
" color=cols[1], edgecolor=\"red\")\n",
|
||
|
"\n",
|
||
|
"# pmin, pmax = norm.cdf(-1) * 100 , norm.cdf(1) * 100\n",
|
||
|
"# ylow, yhigh = np.percentile(random_mah_cb2 / norm_mass, [pmin, pmax], axis=0)\n",
|
||
|
"# plt.plot(xrange_cb2, ylow, c=cols[2], ls=\"--\", lw=1.5 * lw,\n",
|
||
|
"# label=rf\"$1\\sigma$ CB2 Random ({len(random_mah_cb2)})\")\n",
|
||
|
"# plt.plot(xrange_cb2, yhigh, c=cols[2], ls=\"--\", lw=1.5 * lw)\n",
|
||
|
"\n",
|
||
|
"# for i in range(len(mah)):\n",
|
||
|
" # plt.plot(age, mah[i] / norm_mass, c=\"black\", lw=lw/4, alpha=0.5, zorder=4)\n",
|
||
|
"\n",
|
||
|
"# plt.plot(RANDOM_MAH_Sorce_Virgo_UPPER[:, 0],\n",
|
||
|
" # RANDOM_MAH_Sorce_Virgo_UPPER[:, 1], c=\"red\", ls=\"--\", label=\"Sorce+2016 Virgo randoms\")\n",
|
||
|
"# plt.plot(RANDOM_MAH_SORCE_Virgo_LOWER[:, 0],\n",
|
||
|
" # RANDOM_MAH_SORCE_Virgo_LOWER[:, 1], c=\"red\", ls=\"--\")\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"plt.yscale(\"log\")\n",
|
||
|
"plt.legend(loc=\"lower right\")\n",
|
||
|
"\n",
|
||
|
"plt.xlabel(r\"$\\mathrm{Age} ~ [\\mathrm{Gyr}]$\")\n",
|
||
|
"plt.ylabel(r\"$M_{\\rm main}(t) / M_{\\rm main}(z = 0)$\")\n",
|
||
|
"plt.xlim(xrange_mdpl2.min(), xrange_mdpl2.max())\n",
|
||
|
"plt.ylim(0.01, 1)\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"# plt.savefig(\"../../plots/coma_MAIN.png\")\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 79,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stderr",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"/tmp/ipykernel_3803914/1215582327.py:31: RuntimeWarning: All-NaN slice encountered\n",
|
||
|
" mu = np.nanmedian(random_mah, axis=0)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnAAAAHWCAYAAAD3vrTNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H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BYDgTPN0Hbj4ehmMZAdzr1Hvf+14EQUAQBEwmEy0tLfzTP/0ThULhtMq55ZZbWLFiBUNDQ/z4xz9+aXbWYDAYDGecp0ehzsfDcCyjD9zr2BVXXMGPfvQjyuUyu3bt4sYbb0QQBL75zW+echkDAwN8+MMfpr6+/gXvR6lUMuY4MxgMBoPhNBg1cK9jFouF6upqGhoauOaaa7j00kt58MEH597XNI1bb72VlpYWbDYby5cv57e//S3wTLNgNBrlfe97H4IgzNXAHTx4kCuvvBKn00kwGOSGG24gEonMlXvhhRdy880384lPfIKKigouv/zyU17vYx/7GP/0T/+E3++nurqar3zlK0cdUyKR4EMf+hDBYBCr1UpnZyf33HPP3PubNm3i/PPPx2az0dDQwMc+9jGy2ezznquf/exnNDc34/F4eNe73kU6nZ577/777+e8887D6/USCAR405vexMDAwEnLe+yxx1i3bh0Wi4Wamho+85nPoCjK8+6HwWAwnCm0eXwYjmUEcAZgNnjasmXLUTVht956Kz/96U+56667OHToEP/4j//I3/zN3/DYY4/R0NDA1NQUbreb2267jampKa677joSiQQXX3wxK1euZOfOndx///3MzMzwzne+86jt/eQnP8FsNrN582buuuuu01rP4XCwfft2vvWtb/HVr351LujUNI0rr7ySzZs38/Of/5zDhw/zjW98A0mSgNnawiuuuIJrr72W/fv38+tf/5pNmzZx8803n/TcDAwM8Mc//pF77rmHe+65h8cee4xvfOMbc+9ns1luueUWdu7cycaNGxFFkbe+9a1o2vEvOxMTE1x11VWsXbuWffv2ceedd/KDH/yAf/mXfzn1D8xgMBhe5dSnRqHOx8NwLKMJ9aVw001w6NDLu82ODvjBD05rlXvuuQen04miKBSLRURR5PbbbwegWCzy9a9/nYceeoj169cD0NrayqZNm/jv//5vNmzYQHV1NYIg4PF4qK6uBuDf/u3fWLlyJV//+tfntvPDH/6QhoYGent7WbhwIQALFizgW9/61twy//Iv/3JK6y1btowvf/nLc2XcfvvtbNy4kcsuu4yHHnqIJ598ku7u7rnlW1tb58q79dZbec973sMnPvGJufW/+93vsmH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v3r309fXxpz/96XkHMZyMz+cjEAjwP//zP/T39/Pwww9zyy23nHSdf/iHf2BsbIyPfvSjHDlyhD/96U98+ctf5pZbbjH6vxkMZxhVVRkYGODee+/lq1/9Kl/4whe47bbb+OMf/8j09DQul4slS5awdOlSgsHg6yp40xBQ5+GhYaQTPJ7XzzfJ8LxkWebmm2/mW9/6Fn//93/P1772NSorK7n11lsZHBzE6/WyatUqPve5z52wjNraWjZv3synP/1p3vCGN1AsFmlqauKKK644aXDyQtd7rt/97nd88pOf5PrrryebzdLe3j43YnTZsmU89thjfP7zn+f8889H13Xa2tq47rrrTv0kPYcoivzqV7/iYx/7GJ2dnSxatIjvfve7XHjhhSdcp66ujvvuu49PfepTLF++HL/fz0033cQXvvCFF7wfBoPh5aPrOiMjI+zfv5+tW7cyPj5ONpvFbrdTUVFBY2PjSXMY64AiQFkQKIvPPKsIaAKE/U4Uu+mE6xsMAIKuG1McP59UKoXH4yGZTOJ2u+deLxQKDA0N0dLScsIRjAbDi2V8zwyGV97T/dkOHjzI1m3b6B7oJ1EsYPG6sQX8iA47RUmgKAqzAZkAijj7XBI
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 2 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"\n",
|
||
|
"cmap = plt.cm.viridis\n",
|
||
|
"\n",
|
||
|
"x = np.asarray([data[nsimx][\"Overlap\"] for nsimx in nsimxs if nsimx in data])\n",
|
||
|
"w = x - x.min()\n",
|
||
|
"w /= w.max()\n",
|
||
|
"\n",
|
||
|
"norm = Normalize(vmin=x.min(), vmax=x.max())\n",
|
||
|
"sm = ScalarMappable(cmap=cmap, norm=norm)\n",
|
||
|
"sm.set_array(x)\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"fig, ax = plt.subplots()\n",
|
||
|
"lw = plt.rcParams[\"lines.linewidth\"] / 2\n",
|
||
|
"d = data[nsim0]\n",
|
||
|
"ax.plot(d[\"Age\"], d[\"MainProgenitorMass\"], color=\"red\", lw=1.5*lw,\n",
|
||
|
" label=\"Reference halo\", zorder=1)\n",
|
||
|
"\n",
|
||
|
"i = 0\n",
|
||
|
"for nsimx in nsimxs:\n",
|
||
|
" try:\n",
|
||
|
" d = data[nsimx]\n",
|
||
|
" except KeyError:\n",
|
||
|
" continue\n",
|
||
|
"\n",
|
||
|
" ax.plot(d[\"Age\"], d[\"MainProgenitorMass\"], color=cmap(norm(x[i])),\n",
|
||
|
" zorder=0, lw=lw * (x[i] / x.max()))\n",
|
||
|
"\n",
|
||
|
" i += 1\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"mu = np.nanmedian(random_mah, axis=0)\n",
|
||
|
"ymin = np.nanpercentile(random_mah, 16, axis=0)\n",
|
||
|
"ymax = np.nanpercentile(random_mah, 84, axis=0)\n",
|
||
|
"ax.plot(xrange, mu, color=\"black\", label=\"Random\")\n",
|
||
|
"ax.fill_between(xrange, ymin, ymax, color=\"black\", alpha=0.5, zorder=-1)\n",
|
||
|
"\n",
|
||
|
"cbar = fig.colorbar(sm, ax=ax, orientation='vertical')\n",
|
||
|
"cbar.set_label('Overlap')\n",
|
||
|
"\n",
|
||
|
"ax.legend()\n",
|
||
|
"ax.set_yscale(\"log\")\n",
|
||
|
"ax.set_xlabel(r\"$t ~ [\\mathrm{Gyr}]$\")\n",
|
||
|
"ax.set_ylabel(r\"$M_{\\rm main} ~ [M_{\\odot}]$\")\n",
|
||
|
"ax.set_xlim(0)\n",
|
||
|
"plt.tight_layout()\n",
|
||
|
"# plt.savefig(\"../../plots/example_mah.png\")\n",
|
||
|
"fig.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 136,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"nsim0 = 1\n",
|
||
|
"simname = \"csiborg2_random\"\n",
|
||
|
"kind = simname.split(\"_\")[-1]\n",
|
||
|
"min_logmass = 12.25\n",
|
||
|
"\n",
|
||
|
"# NOTE: These can possibly be pickled to avoid doing this long process every\n",
|
||
|
"# single time.\n",
|
||
|
"\n",
|
||
|
"cat = csiborgtools.read.CSiBORG2Catalogue(\n",
|
||
|
" nsim0, 99, kind, bounds={\"totmass\": (1e13, None), \"dist\": (0, 135)})\n",
|
||
|
"# merger_reader = csiborgtools.read.CSiBORG2MergerTreeReader(nsim0, kind)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 149,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"a = np.array([0.01428571, 0.02424242, 0.03419913, 0.04415584, 0.05411255,\n",
|
||
|
" 0.06406926, 0.07402597, 0.08398268, 0.09393939, 0.1038961 ,\n",
|
||
|
" 0.11385281, 0.12380952, 0.13376623, 0.14372294, 0.15367965,\n",
|
||
|
" 0.16363636, 0.17359307, 0.18354978, 0.19350649, 0.2034632 ,\n",
|
||
|
" 0.21341991, 0.22337662, 0.23333333, 0.24329004, 0.25324675,\n",
|
||
|
" 0.26320346, 0.27316017, 0.28311688, 0.29307359, 0.3030303 ,\n",
|
||
|
" 0.31298701, 0.32294372, 0.33290043, 0.34285714, 0.35281385,\n",
|
||
|
" 0.36277056, 0.37272727, 0.38268398, 0.39264069, 0.4025974 ,\n",
|
||
|
" 0.41255411, 0.42251082, 0.43246753, 0.44242424, 0.45238095,\n",
|
||
|
" 0.46233766, 0.47229437, 0.48225108, 0.49220779, 0.5021645 ,\n",
|
||
|
" 0.51212121, 0.52207792, 0.53203463, 0.54199134, 0.55194805,\n",
|
||
|
" 0.56190476, 0.57186147, 0.58181818, 0.59177489, 0.6017316 ,\n",
|
||
|
" 0.61168831, 0.62164502, 0.63160173, 0.64155844, 0.65151515,\n",
|
||
|
" 0.66147186, 0.67142857, 0.68138528, 0.69134199, 0.7012987 ,\n",
|
||
|
" 0.71125541, 0.72121212, 0.73116883, 0.74112554, 0.75108225,\n",
|
||
|
" 0.76103896, 0.77099567, 0.78095238, 0.79090909, 0.8008658 ,\n",
|
||
|
" 0.81082251, 0.82077922, 0.83073593, 0.84069264, 0.85064935,\n",
|
||
|
" 0.86060606, 0.87056277, 0.88051948, 0.89047619, 0.9004329 ,\n",
|
||
|
" 0.91038961, 0.92034632, 0.93030303, 0.94025974, 0.95021645,\n",
|
||
|
" 0.96017316, 0.97012987, 0.98008658, 0.99004329, 1. ])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 155,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"from h5py import File"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 156,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"f = File(\"/mnt/extraspace/rstiskalek/csiborg_postprocessing/random_mah/random_mah_csiborg2_random_1.hdf5\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 168,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"array([ nan, nan, nan, nan,\n",
|
||
|
" nan, nan, nan, nan,\n",
|
||
|
" nan, nan, nan, nan,\n",
|
||
|
" nan, 9.6507642e+10, 3.0197550e+11, 3.2376760e+11,\n",
|
||
|
" 7.0668498e+11, 7.7206113e+11, 9.3394495e+11, 1.5814801e+12,\n",
|
||
|
" 1.9799633e+12, 2.8672110e+12, 3.4369173e+12, 4.2152047e+12,\n",
|
||
|
" 4.0595470e+12, 6.7960056e+12, 8.0506048e+12, 9.8562317e+12,\n",
|
||
|
" 1.5811687e+13, 2.1929025e+13, 2.7361473e+13, 3.6311776e+13,\n",
|
||
|
" 4.0548774e+13, 4.6049712e+13, 5.1784131e+13, 5.8592594e+13,\n",
|
||
|
" 6.2322144e+13, 6.8669858e+13, 7.1316036e+13, 1.2149067e+14,\n",
|
||
|
" 1.4343837e+14, 1.5714247e+14, 1.6746878e+14, 1.8382215e+14,\n",
|
||
|
" 1.8707539e+14, 1.8938536e+14, 1.9296859e+14, 1.9942214e+14,\n",
|
||
|
" 2.0502892e+14, 2.0806736e+14, 2.1257209e+14, 2.3088363e+14,\n",
|
||
|
" 2.4707200e+14, 2.5878680e+14, 2.6422236e+14, 2.7754664e+14,\n",
|
||
|
" 2.8651874e+14, 2.9785370e+14, 3.0968989e+14, 3.1373079e+14,\n",
|
||
|
" 3.1944651e+14, 3.2246628e+14, 3.2166309e+14, 3.2575374e+14,\n",
|
||
|
" 3.2939614e+14, 3.3505896e+14, 3.4118875e+14, 3.4710996e+14,\n",
|
||
|
" 3.5778809e+14, 3.6322364e+14, 3.7472670e+14, 3.8465764e+14,\n",
|
||
|
" 4.0075266e+14, 4.1667327e+14, 4.3123039e+14, 4.3992541e+14,\n",
|
||
|
" 4.6098277e+14, 4.7190678e+14, 4.9967297e+14, 5.0868244e+14,\n",
|
||
|
" 5.2763220e+14, 5.5073174e+14, 5.9031232e+14, 5.9930933e+14,\n",
|
||
|
" 6.1641921e+14, 6.2424880e+14, 6.3106035e+14, 6.4602838e+14,\n",
|
||
|
" 6.5189973e+14, 6.5782102e+14, 6.6686783e+14, 6.7132272e+14,\n",
|
||
|
" 6.7323109e+14, 6.7524221e+14, 6.7571224e+14, 6.7606094e+14,\n",
|
||
|
" 6.8144662e+14, 6.8422983e+14, 6.8603237e+14, 6.8886215e+14],\n",
|
||
|
" dtype=float32)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 168,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"f[\"MainProgenitorMass\"][0]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 154,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"[69.0000210000063, 40.250007218751264, 28.24050991940438, 21.6470609550175, 17.480001404480106, 14.608109099433955, 12.508772664512199, 10.90721705951751, 9.64516173673259, 8.625000360937513, 7.7832702592057235, 7.0769233254437935, 6.475728365821477, 5.95783150553419, 5.50704240932355, 5.111111246913583, 4.760598622974984, 4.448113312911626, 4.1677853285437605, 3.914893700679041, 3.685598452365574, 3.476744253718227, 3.285714346938776, 3.1103203402819117, 2.9487179993425383, 2.7993421515051513, 2.6608558268213116, 2.5321101306287352, 2.4121122957547967, 2.3000000330000008, 2.1950207773798662, 2.096514773533915, 2.003901196522936, 1.9166666909722223, 1.8343558508261513, 1.7565632668759008, 1.6829268488994646, 1.613122190273029, 1.5468577900064306, 1.4838709837669097, 1.4239244641145379, 1.366803292753544, 1.3123123255056859, 1.2602739849878026, 1.210526327423823, 1.162921359250726, 1.117323566656109, 1.0736086272735772, 1.0316622782422846, 0.9913793189283591, 0.9526627299814432, 0.9154228931957131, 0.8795768989699038, 0.8450479301016136, 0.8117647122768166, 0.7796610229819017, 0.7486752517178681, 0.7187500053710938, 0.6898317534223188, 0.6618705083794834, 0.6348195374209455, 0.6086351017498701, 0.5832762206018658, 0.5587044572276223, 0.5348837244997295, 0.5117801080759505, 0.48936170529651424, 0.46759847820604516, 0.4464621192761633, 0.42592592856652933, 0.4059647012034677, 0.3865546241790834, 0.3676731815824261, 0.34929906746973005, 0.3314121056648591, 0.31399317585528075, 0.2970241454144613, 0.28048780643961924, 0.2643678175452504, 0.2486486499985392, 0.23331553782343795, 0.21835443153641232, 0.20375195520916023, 0.18949536658248856, 0.17557251998135315, 0.1619718318042056, 0.14868224838055033, 0.13569321600925854, 0.122994653006949, 0.11057692361085425, 0.09843081359419292, 0.08654750746436402, 0.0749185671253807, 0.06353591189600438, 0.05239179978414388, 0.04147880992632613, 0.03078982610853953, 0.020318021291547472, 0.010056843069963017, 0.0]\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"print(list(1 / a - 1))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 142,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"17"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 142,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"np.sum(cat[\"totmass\"] > 5e14)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 130,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"d1 = merger_reader.main_progenitor(10000)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 132,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"array([99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83,\n",
|
||
|
" 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66,\n",
|
||
|
" 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49,\n",
|
||
|
" 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32,\n",
|
||
|
" 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17],\n",
|
||
|
" dtype=int32)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 132,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"d1[\"SnapNum\"]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 127,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"8156"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 127,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"np.sum(cat[\"totmass\"] > 1e13)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 128,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"33.333333333333336"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 128,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"250e-3 * 8000 / 60"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 116,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAi0AAAGiCAYAAAAr5/biAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAABmw0lEQVR4nO3dd3xV9f3H8de92XvvQcIeQgIyRRE0FrFqxapYrVL81S6ctK72V2x/bbXWalGbih3OaovaOqqoFZShsveeAUL2vsnNurn3/P44JBjDCtzk5ibv5+NxH/fec86998MVkzffaTEM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wOGQ7xOqi1awqXMWGkg2E+YcxMWkiE5MnMiJ6BIv2LOK13a/hcDkAiAiIMIOHfzgRAWYAaX0cGRBJv/B+ZIZnkhyajI/VQy1PTXVw+HM4/AVU7IeKA1CVBy2NHa9NHafQIiIiPYfLZXC4sv7YzB5zCvL2ghrK6zp2YQxJCGNi/2gmDYhhQmYMUSG9J6QAVDRUsKZoDauKVrG6aDXF9uJ2523NNv6171/8a9+/2h2fkDSBeefPY3jM8O4s98y4nFC4CQ58Cgc/hfy1cCxktWP1hYhUiOwHUf3M+/hh3V/vlyi0iIj0YS6XwcFyO5vzq9l6tJqdx9ZHsTd3nNzg52NheHIEo9MiGZ8ZzfjMaGJDAzxQtftVNVaxsXQjOyt2UlhXaN7shR1Cip/Vj9Hxo5mUPInxieOpbqpmVaEZaPZX72dQ1CDmnT+PycmTe85gV5cLyveYLSkHP4W8FdBY0/6ayH7Q/2JIOA+iB0B0JkS
|
||
|
"text/plain": [
|
||
|
"<Figure size 640x480 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"plt.figure()\n",
|
||
|
"plt.plot(d1[\"Age\"], d1[\"MainProgenitorMass\"])\n",
|
||
|
"plt.plot(d2[\"Age\"], d2[\"MainProgenitorMass\"])\n",
|
||
|
"plt.plot(d3[\"Age\"], d3[\"MainProgenitorMass\"])\n",
|
||
|
"plt.yscale(\"log\")\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"plt.show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 110,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"array([1.4623428e+15, 7.4588315e+14, 7.1264091e+14, ..., 9.9620782e+10,\n",
|
||
|
" 9.9620782e+10, 9.9620782e+10], dtype=float32)"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 110,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"cat[\"totmass\"]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"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
|
||
|
}
|