csiborgtools/notebooks/fits.ipynb

2397 lines
1.2 MiB
Text
Raw Normal View History

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "5a38ed25",
"metadata": {
"ExecuteTime": {
"end_time": "2023-04-12T14:25:46.519408Z",
"start_time": "2023-04-12T14:25:03.003304Z"
},
"scrolled": true
},
"outputs": [],
"source": [
"import sys\n",
"import numpy as np\n",
"import h5py\n",
"import matplotlib.pyplot as plt\n",
"from numba import jit\n",
"import numpy\n",
"\n",
"sys.path.append(\"../\")\n",
"import csiborgtools\n",
"\n",
"%matplotlib widget\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "312c96c9",
"metadata": {},
"outputs": [],
"source": [
"paths = csiborgtools.read.CSiBORGPaths(**csiborgtools.paths_glamdring)\n",
"nsim0 = 7468\n",
"nsimx = 7588 \n",
"nsnap0 = max(paths.get_snapshots(nsim0))\n",
"nsnapx = max(paths.get_snapshots(nsimx))\n",
"overlapper = csiborgtools.match.ParticleOverlap()\n",
"partreader = csiborgtools.read.ParticleReader(paths)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "174206f5",
"metadata": {},
"outputs": [],
"source": [
"clumpmap0 = csiborgtools.read.read_h5(paths.particles_path(nsim0))[\"clumpmap\"]\n",
"parts0 = csiborgtools.read.read_h5(paths.initmatch_path(nsim0, \"particles\"))[\"particles\"]\n",
"clid2map0 = {clid: i for i, clid in enumerate(clumpmap0[:, 0])}\n",
"\n",
"# clumpmapx = csiborgtools.read.read_h5(paths.particles_path(nsimx))[\"clumpmap\"]\n",
"# partsx = csiborgtools.read.read_h5(paths.initmatch_path(nsimx, \"particles\"))[\"particles\"]\n",
"# clid2mapx = {clid: i for i, clid in enumerate(clumpmapx[:, 0])}\n",
"\n",
"cat0 = csiborgtools.read.HaloCatalogue(nsim0, paths, load_initial=True, minmass=None, with_lagpatch=True)\n",
"catx = csiborgtools.read.HaloCatalogue(nsimx, paths, load_initial=True, minmass=None, with_lagpatch=True)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "de571afb",
"metadata": {},
"outputs": [],
"source": [
"parts = csiborgtools.read.read_h5(paths.particles_path(nsim0))[\"particles\"]"
]
},
{
"cell_type": "code",
"execution_count": 39,
"id": "a1128e15",
"metadata": {},
"outputs": [],
"source": [
"X = parts[:100000, :]\n",
"pos = X[:, :3]\n",
"vel = X[:, 3:6]\n",
"origin = [0.5, 0.5, 0.5]\n",
"box = csiborgtools.read.BoxUnits(nsnap0, nsim0, paths)"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "1b64c2b7",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[0.04632865, 0.00390616, 0.07068912],\n",
" [0.678856 , 0.5636776 , 0.39254144],\n",
" [0.67959476, 0.5646367 , 0.39651725],\n",
" ...,\n",
" [0.6699929 , 0.5782057 , 0.39238685],\n",
" [0.64754474, 0.58878136, 0.38821003],\n",
" [0.6480443 , 0.5889117 , 0.38808307]], dtype=float32)"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"csiborgtools.read.real2redshift(pos, vel, origin, box)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 25,
"id": "b79fddeb",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.0018435717"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.abs(x - 1).max()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fb4398be",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 94,
"id": "81ce3e39",
"metadata": {},
"outputs": [],
"source": [
"k0 = clumpmap0[clid2map0[0], 2] + 1\n",
"# parts.shape[0]"
]
},
{
"cell_type": "code",
"execution_count": 96,
"id": "5384bc24",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"182510395"
]
},
"execution_count": 96,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"parts.shape[0] - k0"
]
},
{
"cell_type": "code",
"execution_count": 44,
"id": "32f9ca63",
"metadata": {},
"outputs": [],
"source": [
"clumps_cat = csiborgtools.read.ClumpsCatalogue(nsim0, paths, load_fitted=True, minmass=None, maxdist=155 / 0.705)"
]
},
{
"cell_type": "code",
"execution_count": 119,
"id": "6a1bf230",
"metadata": {},
"outputs": [],
"source": [
"cat = csiborgtools.read.HaloCatalogue(nsim0, paths, minmass=None)"
]
},
{
"cell_type": "code",
"execution_count": 124,
"id": "85eb7844",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 1, 3, 5, ..., 21809643, 21810694, 21818034],\n",
" dtype=int32)"
]
},
"execution_count": 124,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cat['ID']"
]
},
{
"cell_type": "code",
"execution_count": 114,
"id": "b3fea4ab",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"153575"
]
},
"execution_count": 114,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(cat)"
]
},
{
"cell_type": "code",
"execution_count": 118,
"id": "146b4c6e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1355"
]
},
"execution_count": 118,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"numpy.isnan(cat[\"lagpatch\"]).sum()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "08e2b141",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 88,
"id": "b8c91301",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([-42.401093 , -32.8627 , -45.08371 , ..., 9.587616 ,\n",
" 5.0563965, 12.45813 ], dtype=float32)"
]
},
"execution_count": 88,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cat['x0']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9cf882e0",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 46,
"id": "49a14648",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"265246"
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(clumps_cat)"
]
},
{
"cell_type": "code",
"execution_count": 50,
"id": "ba45cf01",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0119bb1def8d463ba494175ee5416a8c",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAx0ElEQVR4nO3dfXSU9Z3//1e4yXDnTOQmmeQQIIICURCMGsYqlZISICpU7C5KASvCQoO7gGJIv4hidw2L7ireosctsaegwi5oJQWMoYGtDKApWSBKjrBgQJhAoZkBhASS6/eHv1zLcJtAkpnJ5/k4Z46Z63pfM5/3uTLOi891kyjLsiwBAADAGC1CPQAAAAA0LQIgAACAYQiAAAAAhiEAAgAAGIYACAAAYBgCIAAAgGEIgAAAAIYhAAIAABiGAAgAAGAYAiAAAIBhCIAAAACGIQACAAAYhgAIAABgGAIgAACAYQiAAAAAhiEAAgAAGIYACAAAYBgCIAAAgGEIgAAAAIYhAAIAABiGAAgAAGAYAiAAAIBhCIAAAACGIQACAAAYhgAIAABgGAIgAACAYQiAAAAAhiEAAgAAGIYACAAAYBgCIAAAgGEIgAAAAIYhAAIAABiGAAgAAGAYAiAAAIBhCIAAAACGIQACAAAYhgAIAABgGAIgAACAYQiAAAAAhiEAAgAAGIYACAAAYBgCIAAAgGEIgAAAAIYhAAIAABiGAAgAAGAYAiAAAIBhCIAAAACGIQACAAAYhgAIAABgGAIgAACAYQiAAAAAhiEAAgAAGIYACAAAYJiwC4BvvfWW+vfvL6fTKafTKY/HozVr1tjr7733XkVFRQU9pk6dGvQaZWVlysj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L19CzIa/T0A1B3f32E4A3iu6upqffDBBzp58qQ8Ho+Kiop05swZpaWl2TV9+vRRt27d5PV6JUler1f9+vWzw58kpaenKxAI2LOIXq836DVqa2pfA4AZuEADgKnC8jYwO3bskMfj0enTp9WhQwetWrVKycnJKi4uVnR0tGJiYoLq4+Li5PP5JEk+ny8o/NWur113uZpAIKBTp06pbdu2Fx1XZWWlKisr7eeBQOCa+gQAAAiFsJwB7N27t4qLi7VlyxZNmzZNEydO1FdffRXqYSknJ0cul8t+JCYmhnpIAAAA9RaWATA6Olq9evVSSkqKcnJydOutt2rRokVyu92qqqpSRUVFUH15ebncbrckye12X3BVcO3zK9U4nc5Lzv5JUnZ2tvx+v/3Yv3//tbYKAADQ5MIyAJ6vpqZGlZWVSklJUevWrVVQUGCvKy0tVVlZmTwejyTJ4/Fox44dOnz4sF2Tn58vp9Op5ORku+bc16itqX2NS3E4HPbtaWofAAAAkSbszgHMzs7WiBEj1K1bNx0/flzLli1TYWGh1q1bJ5fLpUmTJmnWrFnq2LGjnE6nnnjiCXk8Hg0aNEiSNGzYMCUnJ2v8+PFauHChfD6f5s6dq8zMTDkcDknS1KlT9frrr+vpp5/WY489pvXr12v58uXKy+OEcAAA0PyFXQA8fPiwJkyYoEOHDsnlcql///5at26dfvrTn0qSXn75ZbVo0UJjxoxRZWWl0tPT9eabb9rbt2zZUqtXr9a0adPk8XjUvn17TZw4Uc8//7xdk5SUpLy8PM2cOVOLFi1S165d9e677yo9Pb3J+wUAAGhqEXEfwHDFfYSAyNZUt4HhPoBAeOH7O0LOAQQAAEDDIQACQBPhxtMAwgUBEAAAwDBhdxEIADQmZuEAgBlAAAAA4xAAAQAADEMABAAAMAznAAJAI+O8QwDhhhlAAAAAwxAAAQAADEMABAAAMAwBEAAAwDAEQAAAAMNwFTAAI3AlLgD8H2YAAQA
"text/html": [
"\n",
" <div style=\"display: inline-block;\">\n",
" <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
" Figure\n",
" </div>\n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BQOCa+gQAAAiFsJwB7N27t4qLi7VlyxZNmzZNEydO1FdffRXqYSknJ0cul8t+JCYmhnpIAAAA9RaWATA6Olq9evVSSkqKcnJydOutt2rRokVyu92qqqpSRUVFUH15ebncbrckye12X3BVcO3zK9U4nc5Lzv5JUnZ2tvx+v/3Yv3//tbYKAADQ5MIyAJ6vpqZGlZWVSklJUevWrVVQUGCvKy0tVVlZmTwejyTJ4/Fox44dOnz4sF2Tn58vp9Op5ORku+bc16itqX2NS3E4HPbtaWofAAAAkSbszgHMzs7WiBEj1K1bNx0/flzLli1TYWGh1q1bJ5fLpUmTJmnWrFnq2LGjnE6nnnjiCXk8Hg0aNEiSNGzYMCUnJ2v8+PFauHChfD6f5s6dq8zMTDkcDknS1KlT9frrr+vpp5/WY489pvXr12v58uXKy+OEcAAA0PyFXQA8fPiwJkyYoEOHDsnlcql///5at26dfvrTn0qSXn75ZbVo0UJjxoxRZWWl0tPT9eabb9rbt2zZUqtXr9a0adPk8XjUvn17TZw4Uc8//7xdk5SUpLy8PM2cOVOLFi1S165d9e677yo9Pb3J+wUAAGhqEXEfwHDFfYSAyNZUt4HhPoBAeOH7O0LOAQQAAEDDIQACQBPhxtMAwgUBEAAAwDBhdxEIADQmZuEAgBlAAAAA4xAAAQAADEMABAAAMAznAAJAI+O8QwDhhhlAAAAAwxAAAQAADEMABAAAMAw
" </div>\n",
" "
],
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"m = numpy.isfinite(clumps_cat[\"lambda200c\"])\n",
"\n",
"plt.figure()\n",
"plt.hist(np.log10(clumps_cat[\"lambda200c\"][m]), bins=\"auto\")\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "38aa3685",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "86f807ab",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 5,
"id": "629f3c3e",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 1, 2, 3, 5, 6, 7, 9, 11, 12, 13], dtype=int32)"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"\n",
"clumps_cat[\"index\"][:10]"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "0b1b12e0",
"metadata": {},
"outputs": [],
"source": [
"X = csiborgtools.read.load_parent_particles(3, parts, clumpmap0, clid2map0, clumps_cat)"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "b9ae282b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"clump = csiborgtools.fits.Clump(X, clumps_cat[2], box)\n",
"clumps_cat[2][\"index\"]"
]
},
{
"cell_type": "code",
"execution_count": 37,
"id": "b75f9eb6",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(0.0008713664483347365, 1.8111896e-06)"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"clump.spherical_overdensity_mass(200)"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "b5f4b080",
"metadata": {},
"outputs": [],
"source": [
"def f(mass):\n",
" return numpy.cumsum(mass)\n",
"\n",
"@jit(nopython=True)\n",
"def g(mass):\n",
" return numpy.cumsum(mass)\n",
"\n",
"x = clump['M']"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "0163c51a",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"73.4 µs ± 401 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)\n"
]
}
],
"source": [
"%timeit f(x)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "51ff9cf3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"31.8 µs ± 385 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)\n"
]
}
],
"source": [
"%timeit g(x)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8886e9e8",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 19,
"id": "13f72d14",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3.79 ms ± 47.2 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
]
}
],
"source": [
"%timeit clump.spherical_overdensity_mass(200)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "9baf6db9",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ea062d858e094536ac06bd22ee092002",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABFOklEQVR4nO3deXhU5eH28fvMZCOQhCUSCAQCskhYEsnGIioaRaxUxB2VAIqKiLWpWuki1Sq0Yq2lxC1VQFGLG2jVn1vUBmUJBMMWVg0QliSGJSvZZub9w5qWF0TIZHJm5nw/15U/5syZk3u8jjx3nrMZLpfLJQAAAFiGzewAAAAAaF0UQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAA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HBRAecVZYsF6dNky9Ittq35Fjmpi1WsXltWbHAgAAogDCg6LCQ/TqtFT16BiqPYdqNDFrtUorKYEAAJiNAtgMXARy+rpGtNGr01LVrX0bfVtWrZuy1qisqs7sWAAAWBoXgbiBk0hP395
"text/html": [
"\n",
" <div style=\"display: inline-block;\">\n",
" <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
" Figure\n",
" </div>\n",
" <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABFOklEQVR4nO3deXhU5eH28fvMZCOQhCUSCAQCskhYEsnGIioaRaxUxB2VAIqKiLWpWuki1Sq0Yq2lxC1VQFGLG2jVn1vUBmUJBMMWVg0QliSGJSvZZub9w5qWF0TIZHJm5nw/15U/5syZk3u8jjx3nrMZLpfLJQAAAFiGzewAAAAAaF0UQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALIYCCAAAYDEUQAAAAIuhAAIAAFgMBRAAAMBiKIAAAAAWQwEEAACwGAogAACAxVAAAQAALCbA7AC+zOl06sCBAwoLC5NhGGbHAQAA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a5nQ6lZ2dreHDh7u17RkzZqigoEBr1651N6ZXOissWP+8fZguPqez6hqdmv5KnhZ+VWh2LAAA0EJ8ugBWVVUpPz9f+fn5kqTCwkLl5+dr7969kqSMjAxlZWVp8eLF2rp1q6ZPn67q6mpNmTLFxNS+ITQoQM/dkqibUnvI5ZIe/leB/vhegZzcJgYAAJ8XYHYAd6xbt06jR49uep2RkSFJSk9P16JFi3T99dfru+++00MPPaTi4mIlJCToww8/POHCkDOVmZmpzMxMORwOt7bj7QLsNj06fpC6dwjVnz/cphe+LNTB8mN68roEhQRymxgAAHyV39wH0AxWuo/QO/n7df8bG1XvcCqpZwdlTUpSh7Y/feEMAADexkrj94/x6UPAaD1XJnTTS7emKDwkQOv2HNHVz6zU3kM1ZscCAADNQAFsBn++CvhUhvXupDenj1C39m30bVm1JjzzlTYUHTU7FgAAOEMcAnaDVaeQSypqNXXRWm05UKE2gXYtnpqilF4dzY4FAMBpser4/b+YAcQZiwoP0dI7hmtU30gda3BoysJcbhgNAIAPoQCiWdoFByhrUpJGnN1J1fUOTX4xl8PBAAD4CApgM1j1HMD/X0igXf9IT1JKr46qrGvULS+s0eb95WbHAgAAP4FzAN3AOQTfq65rVPqLuVq354jahwbqtWnDNKCrdf97AAC8G+M3M4BoAW2DA7RwSrISYtrraE2Dbv7HGu0sqTQ7FgAA+BEUQLSIsJBALZ6aokHdwnWoul43Zq3RN99VmR0LAACcBAWwGTgH8OQi2gRqya2pGtA1XGVVdZqYtVq7y6rNjgUAAP4/nAPoBs4hOLlDVXW6MWu1dpRUKTri+1vGxHQMNTsWAACSGL8lZgDhAZ3aBeuV24bp7LPa6kB5rW7MWq39R4+ZHQsAAPwHBRAecVZYsF6dNky9Ittq35Fjmpi1WsXltWbHAgAAogDCg6LCQ/TqtFT16BiqPYdqNDFrtUorKYEAAJiNAtgMXARy+rpGtNGr01LVrX0
" </div>\n",
" "
],
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure()\n",
"plt.plot(rs, y)\n",
"plt.yscale(\"log\")\n",
"plt.xscale(\"log\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "bd137d39",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"224 µs ± 4.17 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)\n"
]
}
],
"source": [
"%timeit clump.r()"
]
},
{
"cell_type": "code",
"execution_count": 87,
"id": "0e0f4a71",
"metadata": {},
"outputs": [],
"source": [
"x, y, z = clump['x'], clump['y'], clump['z']\n",
"x0, y0, z0 = clumps_cat[3]['x'], clumps_cat[3]['y'], clumps_cat[3]['z']\n"
]
},
{
"cell_type": "code",
"execution_count": 93,
"id": "80a18b34",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"145 µs ± 539 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)\n"
]
}
],
"source": [
"%timeit ((x - x0)**2 + (y - y0)**2 + (z - z0)**2)**0.5"
]
},
{
"cell_type": "code",
"execution_count": 92,
"id": "f929a601",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"242 µs ± 6.44 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)\n"
]
}
],
"source": [
"%timeit clump.r()"
]
},
{
"cell_type": "code",
"execution_count": 267,
"id": "cfd1af49",
"metadata": {},
"outputs": [],
"source": [
"delta_bckg *= 2"
]
},
{
"cell_type": "code",
"execution_count": 260,
"id": "28ac7a6d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.23 ms ± 6.98 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)\n"
]
}
],
"source": [
"%timeit delta1, delta2, cellmins, nonzero = overlapper.make_deltas(pos, pos2, mass, mass)\n",
"# __ = overlapper.make_deltas(pos, pos2, mass, mass)"
]
},
{
"cell_type": "code",
"execution_count": 271,
"id": "9d157f6e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.75 ms ± 11.8 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)\n"
]
}
],
"source": [
"%timeit overlapper(pos, pos2, mass, mass, delta_bckg)"
]
},
{
"cell_type": "code",
"execution_count": 259,
"id": "32f13411",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3072a8519f3e4da4a108df78ed44e6a9",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA+gAAAH0CAYAAACuKActAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABMIUlEQVR4nO3de3Bc9X3///fezu5KK60kX7S+yRcuBkNwggOOmzRNwY1DMhlS+M6PTDNTkjLJJDUMt7aJO01oO+2YbzKTEBpD8k0Z+HYmxCmdkAyZb5NSJ3YutakxGAgXg8FggSX5ImmlXe3u2d1zfn9QRAS232/jtc7H1vMxo5lgv/I+7z3n7Pl83lrLjoVhGAoAAAAAAIhUPOoGAAAAAAAAAzoAAAAAAE5gQAcAAAAAwAEM6AAAAAAAOIABHQAAAAAABzCgAwAAAADgAAZ0AAAAAAAcwIAOAAAAAIADGNABAAAAAHAAAzoAAAAAAA5gQAcAAAAAwAEM6AAAAAAAOIABHQAAAAAABySjbuBUCoJADhw4IB0dHRKLxaJuBwAww4VhKOPj4zJ//nyJx/ke+e9izQYAuCSyNTs8DXzrW98KFy9eHKbT6fDSSy8NH3nkEdP/r7+/PxQRvvjiiy+++HLqq7+//xSvnNF4p+t1GLJm88UXX3zx5ebXdK/Zzn+C/oMf/EBuueUW+fa3vy2rV6+WO+64Q9atWyd79uyRuXPnHvf/29HRISIiH5CPSlJS09HujJEs9NqCGa91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JerlclpUrV8qmTZuO+vtf/epX5c4775Rvf/vb8sgjj0h7e7usW7dOqry
"text/html": [
"\n",
" <div style=\"display: inline-block;\">\n",
" <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
" Figure\n",
" </div>\n",
" <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+gAAAH0CAYAAACuKActAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABMIUlEQVR4nO3de3Bc9X3///fezu5KK60kX7S+yRcuBkNwggOOmzRNwY1DMhlS+M6PTDNTkjLJJDUMt7aJO01oO+2YbzKTEBpD8k0Z+HYmxCmdkAyZb5NSJ3YutakxGAgXg8FggSX5ImmlXe3u2d1zfn9QRAS232/jtc7H1vMxo5lgv/I+7z3n7Pl83lrLjoVhGAoAAAAAAIhUPOoGAAAAAAAAAzoAAAAAAE5gQAcAAAAAwAEM6AAAAAAAOIABHQAAAAAABzCgAwAAAADgAAZ0AAAAAAAcwIAOAAAAAIADGNABAAAAAHAAAzoAAAAAAA5gQAcAAAAAwAEM6AAAAAAAOIABHQAAAAAABySjbuBUCoJADhw4IB0dHRKLxaJuBwAww4VhKOPj4zJ//nyJx/ke+e9izQYAuCSyNTs8DXzrW98KFy9eHKbT6fDSSy8NH3nkEdP/r7+/PxQRvvjiiy+++HLqq7+//xSvnNF4p+t1GLJm88UXX3zx5ebXdK/Zzn+C/oMf/EBuueUW+fa3vy2rV6+WO+64Q9atWyd79uyRuXPnHvf/29HRISIiH5CPSlJS09HujJEs9NqCGa91B636LSsV1mq2XKWiZoKqrRYANKQuv5b/N7k+nUlOZr0WYc0GALglqjU7FoZhOK1HPEGrV6+WSy65RL71rW+JyOt/BG7RokVyww03yJe+9KXj/n/HxsYkn8/Lh+RKScZY7FspOa9gC2bSrTtoCwfh0FjLNqBXT7YdADNEI6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zPVstxniRXnmmo1n3nelAMAHFtyqW3/Yl3xgrS+CMVrrVv0LMcTEUkNjppy9ULXO2/mLZLFippp5LOmWtb+LZpduZbVsl5L1nbMZHyCDgAAAACAAxjQAQAAAABwAAM6AAAAAAAOYEAHAAAAAMABDOgAAAAAADiAAR0AAAAAAAcwoAMAAAAA4AAGdAAAAAAAHJCMugFXJFacq2ZiLw+Zao1f2qcfzw9NtSqzEqacSEpNBF7MVKk6S8/Fjf3Xeiy1TKUk8Gy5ek7vLdBP1+u5dKBmqh22c5EYt11LyzGbPU3bMYeNL7SFLOe/eLatVnpY/x5iddZsU635tkNKrFJTM8GA7VkQVKvGowJA9BLd3S2rZXmWiohIenrXqVpvmynX7Gs35RI1fc1LFW0bndI5XaacRXlhwZRrGvaGzbRt/5g9ou9NLOdLRCQ9NGHKJZcuVjONfa+YagGu4BN0AAAAAAAcwIAOAAAAAIADGNABAAAAAHAAAzoAAAAAAA5gQAcAAAAAwAEM6AAAAAAAOIABHQAAAAAABzCgAwAAAADgAAZ0AAAAAAAckIzy4L/85S/la1/7muzatUsGBgbkwQcflE984hOTvx+Godx2223y3e9+V0ZHR+X973+/3H333XLOOee0vpmBQ2qkuWS+qVSiFqqZ0nzbqbfUEhHxO/TvtTQ9UylJ+HqmUojZihnUum2vMV631av36kEvZ3iRItIsGU+aScKUCtubaiZWttVqdhhq+bZrGeu2nbN6OaVmEuO2/st9ev+de221Dqydbcp1vtJQMx3VmqmW5TugjYFBUy0gSk6t1zhhie7u1hUzPv/C7k5TLl7T1+xGPmuqFaT19aCZtq15fs72GVbC0/cwzXTaVKvp6b1ZMifCej4sxhbre9vu522budEVHaZcz+N6vXgmY6oVVKumHHCqRfoJerlclpUrV8qmTZuO+vt
" </div>\n",
" "
],
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"fig, axs = plt.subplots(ncols=2, figsize=(10, 5))\n",
"axs[0].imshow(np.sum(delta1, axis=0))\n",
"axs[1].imshow(np.sum(delta2, axis=0))\n",
"fig.tight_layout()"
]
},
{
"cell_type": "code",
"execution_count": 93,
"id": "6df1d619",
"metadata": {},
"outputs": [],
"source": [
"delta = overlapper.make_bckg_delta(pos, mass / mass)"
]
},
{
"cell_type": "code",
"execution_count": 282,
"id": "0d5525e5",
"metadata": {},
"outputs": [],
"source": [
"from functools import cache \n",
"from functools import lru_cache"
]
},
{
"cell_type": "code",
"execution_count": 283,
"id": "f2918a51",
"metadata": {},
"outputs": [],
"source": [
"from time import sleep\n",
"\n",
"@lru_cache(maxsize=1024)\n",
"def f(x):\n",
" sleep(0.5)\n",
" return x * x"
]
},
{
"cell_type": "code",
"execution_count": 286,
"id": "4d37bc4f",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"79 ns ± 0.372 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)\n"
]
}
],
"source": [
"%timeit f(2)"
]
},
{
"cell_type": "code",
"execution_count": 77,
"id": "a46d6f48",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[ 0, 0, 277961071],\n",
" [ 1, 277961072, 277980356],\n",
" [ 2, 277980357, 277985437],\n",
" ...,\n",
" [ 21836472, 460470781, 460470782],\n",
" [ 21836487, 460470783, 460471462],\n",
" [ 21836785, 460471463, 460471466]], dtype=int32)"
]
},
"execution_count": 77,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"clumpmap0[:]"
]
},
{
"cell_type": "code",
"execution_count": 72,
"id": "4a900d77",
"metadata": {},
"outputs": [],
"source": [
"dens = overlapper.make_delta(pos, mass, subbox=True)"
]
},
{
"cell_type": "code",
"execution_count": 75,
"id": "81b5381f",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7c3c84eac2ab4bc99d8af24f3aeb5b04",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAA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f//rX0d3dHfX19X2ur6+vj/3797+hvqWlJerq6noPn/8DgIFLAKSQlStXRltbW++xZ8+eSrcEAPyR/BFIosaPHx9DhgyJAwcO9Ln+wIED0dDQ8Ib6UqkUpVKpv9oDAM4gM4CJqqmpiTlz5sSGDRt6r+vp6YkNGzZEc3NzBTsDAM40M4AJW7FiRSxbtiz+/M//PC6//PK47777oqOjI/7qr/6q0q0BAGeQAJiwD37wg/HKK6/EnXfeGfv3748//dM/jccee+wNfxgCAAwu1gHkj2IdQICBzTqAafMZQACAxAiAAACJEQABABIjAAIAJEYABABIjAAIAJAYARAAIDECIABAYgRAAIDECIAAAIkRAAEAEiMAAgAkRgAEAEiMAAgAkBgBEAAgMQIgAEBiBEAAgMQIgAAAiREAAQASIwACACRGAAQASIwACACQGAEQACAxAiAAQGIEQACAxAiAAACJEQABABIjAAIAJEYABABIjAAIAJAYARAAIDECIABAYgRAAIDECIAAAIkRAAEAEjO00g3A2ax65Mjcmqqp5522++v+xYunbSwAOBkzgIn67Gc/G1VVVX2Oiy++uNJtAQD9wAxgwi699NJ44oknei8PHerHAQBS4H/8hA0dOjQaGhoq3QYA0M+8BZywF198MRobG+P888+PD3/4w7F79+5KtwQA9AMzgImaO3durFmzJmbMmBH79u2Lu+66K9797nfH888/H6NHj35DfblcjnK53Hu5vb29P9sFAE4jATBRS5Ys6f33rFmzYu7cuTF16tT47ne/GzfccMMb6ltaWuKuu+7qzxYBgDPEW8BERMSYMWPioosuih07dpzw9pUrV0ZbW1vvsWfPnn7uEAA4XQRAIiLi1VdfjZ07d8akSZNOeHupVIra2to+BwAwMAmAifrYxz4Wra2t8atf/Sr+7d/+LT7wgQ/EkCFD4kMf+lClWwMAzjCfAUzUyy+/HB/60Ifi0KFDMWHChHjXu94VmzdvjgkTJlS6tbNK9YRzc2u6xp1TaKxhLx/KrRnytgsLjZW99F+5NT1HjxYaC4D0CICJWrduXaVbAAAqxFvAAACJEQABABIjAAIAJEYABABIjAAIAJAYARAAIDECIABAYqw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0rFxuouFakqttj18QL32Tl9YqGxhnR259YU+w7PXhZ5BipFAByEnnnmmXjPe97Te3nFihUREbFs2bJYs2ZNfPzjH4+Ojo646aab4vDhw/Gud70rHnvssRg+fHilWgYA+pEAOAjNnz8/suzkMzZVVVVx9913x913392PXQEAZwufAQQASIwACACQGAEQACAxAiAAQGIEQACAxAiAAACJEQABABJjHUA4hVHP7cut2fs/mwqNNaQzfzeNoxNP32uyI9PzdzEpqrq2q1Bdx+L8+xz6yDmFxhramf/0VDthQqGxul95pVAdQCrMAAIAJEYABABIjAAIAJAYARAAIDECIABAYgRAAIDECIAAAIkRAAEAEmMhaJJU3XmsUF33uNrcmnG/LBca6zcXl3JrhhQbKrry2yqsyCLPQ14eXmisYQercmvO2VfsmyztbS9UB8CbZwYQACAxAiAAQGIEQACAxAiAAACJEQABABIjAAIAJEYABABIjAAIAJAYARAAIDF2AoFTKLJjyLDfFBurffqw3JrhB4u9JqsusJnG6B3Ffr27avPrOiceLzTWsLb8sY6PGFJorCHjzsmtqR5eU2is6o6O3Jqeo0cLjQUwGJgBBABIjAAIAJAYARAAIDECIABAYgRAAIDECIAAAIkRAAEAEiMAAgAkxkLQJKmn4ALCPSPzF28e+pv8RYYjIsY+X5Vb09FUaKh
"text/html": [
"\n",
" <div style=\"display: inline-block;\">\n",
" <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
" Figure\n",
" </div>\n",
" <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAApH0lEQVR4nO3df3CV5Z03/k8C5ABCAggkRAKLolhF2GfZSrNtWSpUoPM4tPqdqbUzxV1HRxedVdpty05rq7v9xtqZrW2X0p1pR9qZIq0d0anfp7oVS3zaBbtSWdS2rPBQweW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ZQACAxAiAAACJEQABABIjAAIAJEYABABIjAAIAJAYARAAIDECIABAYgRAAIDECIAAAIkRAAEAEiMAAgAkRgAEAEiMAAgAkBgBEAAgMQIgAEBiBEAAgMQIgAAAiREAAQASIwACACRGAAQASIwACACQGAEQACAxAiAAQGIEQACAxAiAAACJEQABABIjAAIAJEYABABIjAAIAJAYARAAIDECIABAYgRAAIDECIAAAIkRAAEAEjO00g3A2ax65Mjcmqqp5522++v+xYunbSwAOBkzgIn67Gc/G1VVVX2Oiy++uNJtAQD9wAxgwi699NJ44oknei8PHerHAQBS4H/8hA0dOjQaGhoq3QYA0M+8BZywF198MRobG+P888+PD3/4w7F79+5KtwQA9AMzgImaO3durFmzJmbMmBH79u2Lu+66K9797nfH888/H6NHj35DfblcjnK53Hu5vb29P9sFAE4jATBRS5Ys6f33rFmzYu7cuTF16tT47ne/GzfccMMb6ltaWuKuu+7qzxYBgDPEW8BERMSYMWPioosuih07dpzw9pUrV0ZbW1vvsWfPnn7uEAA4XQRAIiLi1VdfjZ07d8akSZNOeHupVIra2to+BwAwMAmAifrYxz4Wra2t8atf/Sr+7d/+LT7wgQ/EkCFD4kMf+lClWwMAzjCfAUzUyy+/HB/60Ifi0KFDMWHChHjXu94VmzdvjgkTJlS6tbNK9YRzc2u6xp1TaKxhLx/KrRnytgsLjZW99F+5NT1HjxYaC4D0CICJWrduXaVbAAAqxFvAAACJEQABABIjAAIAJEYABABIjAAIAJAYARAAIDECIABAYqwDSJKKLrjc2Zi/5V3HpGGFxqqN/EWlixoa5+XWHC/Qe0REadvu3Jqso6PQWP29+HT1yJH9en8RFtgGBgczgAAAiREAAQASIwACACRGAAQASIwACACQGAEQACAxAiAAQGIEQACAxAiAAACJsRMISSoX3CWjyC4fQzuzQmO1TxueW1M63FNorOqjXbk1x0cMKTTWkIvydxUpatjLh3Jrjr+0p9BYRXb5OJ27chTdVaS/+wI4E8wAAgAkRgAEAEiMAAgAkBgBEAAgMQIgAEBiBEAAgMQIgAAAiREAAQAS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QCrMAAIAJEYABABIjAAIAJAYARAAIDECIABAYgRAAIDECIAAAIkRAAEAEmMhaJJU3XmsUF33uNrcmnG/LBca6zcXl3JrhhQbKrry2yqsyCLPQ14eXmisYQercmvO2VfsmyztbS9UB8CbZwYQACAxAiAAQGIEQACAxAiAAACJEQABABIjAAIAJEYABABIjAAIAJAYARAAIDF2AoFTKLJjyLDfFBurffqw3JrhB4u9JqsusJnG6B3Ffr27avPrOiceLzTWsLb8sY6PGFJorCHjzsmtqR5eU2is6o6O3Jqeo0cLjQUwGJgBBABIjAAIAJAYARAAIDECIABAYgRAAIDECIAAAIkRAAEAEiMAAgAkxkLQJKm
" </div>\n",
" "
],
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "8aa1881c",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "3a0e02f7",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 55,
"id": "7b83c9ba",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"((134842, 7), (134842, 4))"
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x.shape, x0.shape"
]
},
{
"cell_type": "code",
"execution_count": 56,
"id": "fad76b87",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a102651d5dfa4a76970dbb8c3493c534",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydd1gU1/7G36V3ERARG6K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kdepV0HrTuRSr4Le+f4qAOCbtDsUa7glJg9nr1ehQdOC+fuSqX1eOZSO5hYOr8jatygsFXVNLdC2gGpjcEQW8ipU4AC8doTmHIXyhVdBrx25jFYABxJKKA7ww5+uIvJyKdKK7mLZkQxqnyXhqUgsqMYrsv41VV9T54mJiYnpnyA2AGRi+n9W6HR/ONtbI3S6PxXfMXMwrC3NsH3mYHr7aYNgaa5A6LRBBtvbmAMPdXKkljV3zQ6AAoClGXD1TgO1j72l/tWKrpOVOf0qyEG/nSyM5RN84GRnDgWA7q721GcP93QFAIzUvwraOSsA7WwtYGUOqo0bJvvByZYvYURPF2qfId3aAQCG6l8FeXew4+trBmrG9PbdRrRyQCsMZ/vu1DWhlQPu1DVS8dnDu8NMAcwZ0Z2KmzpPTExMTP8EKTiOM7YqwnQfqq+vR7t27VBXVwcnJ6e/ujpMTKJyy+qx9FA6Qqf7o7eHdG1mltRiUVgqds4KwMCu7cV4YkEVFoalYtesAAR6u1HbLzyQihmB3bDwEW/YWVmIn5XUqBASkYX1k/3Q1UUaBFYp+YdJlk3wgZuDzX3V19Q+puIlNSq8/nUmPJ2sserfvuJnJTUqLDuSAY4
"text/html": [
"\n",
" <div style=\"display: inline-block;\">\n",
" <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
" Figure\n",
" </div>\n",
" <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydd1gU1/7G36V3ERARG6KoEVERFY0aNVHJTbkx0cTYNbYY703UFDAxmmJiTfQmwdhiA1siqWBELFhAehFRAQEBRToCuwu7LMzvj9mZOWd215j2SwznfR6fXb87M6fM7M7hnM+8XwXHcRyYmJiYmJiYmJjajMz+6gowMTExMTExMTH9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UgsqMYrsv41VV9T54mJiYnpnyA2AGRi+n9W6HR/ONtbI3S6PxXfMXMwrC3NsH3mYHr7aYNgaa5A6LRBBtvbmAMPdXKkljV3zQ6AAoClGXD1TgO1j72l/tWKrpOVOf0qyEG/nSyM5RN84GRnDgWA7q721GcP93QFAIzUvwraOSsA7WwtYGUOqo0bJvvByZYvYURPF2qfId3aAQCG6l8FeXew4+trBmrG9PbdRrRyQCsMZ/vu1DWhlQPu1DVS8dnDu8NMAcwZ0Z2KmzpPTExMTP8EKTiOM7YqwnQfqq+vR7t27VBXVwcnJ6e/ujpMTKJyy+qx9FA6Qqf7o7eHdG1mltRiUVgqds4KwMCu7cV4YkEVFoalYtesAAR6u1HbLzyQihmB3bDwEW/YWVmIn5XUqBASkYX1k/3Q1UUaBFYp+YdJlk3wgZuDzX3V19Q
" </div>\n",
" "
],
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure()\n",
"# plt.scatter(x[:, 0], x[:, 1], s=0.1)\n",
"plt.scatter(x0[:, 0], x0[:, 1], s=0.1)\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d0423f44",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "6276d479",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "50a4a6d6",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "7883167e",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "179d520e",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "209c181f",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "b3253603",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 11,
"id": "c6430d5c",
"metadata": {},
"outputs": [],
"source": [
"unique_clump_ids = numpy.unique(clump_ids)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "ec9e90ab",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 0, 1, 2, 3, 5, 6, 7, 9, 11, 12, 13, 14, 15,\n",
" 17, 19, 21, 22, 23, 29, 32, 34, 39, 43, 134, 137, 138,\n",
" 139, 149, 151, 156, 157, 158, 159, 161, 163, 165, 167, 168, 169,\n",
" 172, 173, 175, 178, 179, 181, 183, 186, 187, 188, 189, 191, 193,\n",
" 194, 196, 197, 198, 204, 207, 209, 211, 212, 213, 214, 215, 216,\n",
" 217, 218, 221, 223, 225, 227, 228, 231, 232, 237, 238, 240, 243,\n",
" 245, 247, 248, 249, 252, 257, 258, 259, 260, 262, 263, 264, 267,\n",
" 268, 269, 270, 272, 273, 274, 275, 276, 278], dtype=int32)"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"unique_clump_ids[:100]"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "273df2d6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"131 ns ± 0.529 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)\n"
]
}
],
"source": [
"%timeit numpy.nan == numpy.nan"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "6da0af29",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"791 ns ± 5.14 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)\n"
]
}
],
"source": [
"%timeit numpy.isnan(numpy.nan)"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "bd84b541",
"metadata": {},
"outputs": [
{
"ename": "TypeError",
"evalue": "Object dtype dtype('O') has no native HDF5 equivalent",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[29], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m test \u001b[39m=\u001b[39m {\u001b[39m\"\u001b[39m\u001b[39masd\u001b[39m\u001b[39m\"\u001b[39m: \u001b[39m1\u001b[39m}\n\u001b[1;32m 2\u001b[0m \u001b[39mwith\u001b[39;00m h5py\u001b[39m.\u001b[39mFile(\u001b[39m\"\u001b[39m\u001b[39mtest.hp\u001b[39m\u001b[39m\"\u001b[39m, \u001b[39m'\u001b[39m\u001b[39mw\u001b[39m\u001b[39m'\u001b[39m) \u001b[39mas\u001b[39;00m f:\n\u001b[0;32m----> 3\u001b[0m f\u001b[39m.\u001b[39;49mcreate_dataset(\u001b[39m\"\u001b[39;49m\u001b[39mtest\u001b[39;49m\u001b[39m\"\u001b[39;49m, data\u001b[39m=\u001b[39;49mtest)\n",
"File \u001b[0;32m~/csiborgtools/venv_csiborg/lib/python3.9/site-packages/h5py/_hl/group.py:183\u001b[0m, in \u001b[0;36mGroup.create_dataset\u001b[0;34m(self, name, shape, dtype, data, **kwds)\u001b[0m\n\u001b[1;32m 180\u001b[0m parent_path, name \u001b[39m=\u001b[39m name\u001b[39m.\u001b[39mrsplit(\u001b[39mb\u001b[39m\u001b[39m'\u001b[39m\u001b[39m/\u001b[39m\u001b[39m'\u001b[39m, \u001b[39m1\u001b[39m)\n\u001b[1;32m 181\u001b[0m group \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mrequire_group(parent_path)\n\u001b[0;32m--> 183\u001b[0m dsid \u001b[39m=\u001b[39m dataset\u001b[39m.\u001b[39;49mmake_new_dset(group, shape, dtype, data, name, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwds)\n\u001b[1;32m 184\u001b[0m dset \u001b[39m=\u001b[39m dataset\u001b[39m.\u001b[39mDataset(dsid)\n\u001b[1;32m 185\u001b[0m \u001b[39mreturn\u001b[39;00m dset\n",
"File \u001b[0;32m~/csiborgtools/venv_csiborg/lib/python3.9/site-packages/h5py/_hl/dataset.py:88\u001b[0m, in \u001b[0;36mmake_new_dset\u001b[0;34m(parent, shape, dtype, data, name, chunks, compression, shuffle, fletcher32, maxshape, compression_opts, fillvalue, scaleoffset, track_times, external, track_order, dcpl, dapl, efile_prefix, virtual_prefix, allow_unknown_filter, rdcc_nslots, rdcc_nbytes, rdcc_w0)\u001b[0m\n\u001b[1;32m 86\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 87\u001b[0m dtype \u001b[39m=\u001b[39m numpy\u001b[39m.\u001b[39mdtype(dtype)\n\u001b[0;32m---> 88\u001b[0m tid \u001b[39m=\u001b[39m h5t\u001b[39m.\u001b[39;49mpy_create(dtype, logical\u001b[39m=\u001b[39;49m\u001b[39m1\u001b[39;49m)\n\u001b[1;32m 90\u001b[0m \u001b[39m# Legacy\u001b[39;00m\n\u001b[1;32m 91\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39many\u001b[39m((compression, shuffle, fletcher32, maxshape, scaleoffset)) \u001b[39mand\u001b[39;00m chunks \u001b[39mis\u001b[39;00m \u001b[39mFalse\u001b[39;00m:\n",
"File \u001b[0;32mh5py/h5t.pyx:1664\u001b[0m, in \u001b[0;36mh5py.h5t.py_create\u001b[0;34m()\u001b[0m\n",
"File \u001b[0;32mh5py/h5t.pyx:1688\u001b[0m, in \u001b[0;36mh5py.h5t.py_create\u001b[0;34m()\u001b[0m\n",
"File \u001b[0;32mh5py/h5t.pyx:1748\u001b[0m, in \u001b[0;36mh5py.h5t.py_create\u001b[0;34m()\u001b[0m\n",
"\u001b[0;31mTypeError\u001b[0m: Object dtype dtype('O') has no native HDF5 equivalent"
]
}
],
"source": [
"test = {\"asd\": 1}\n",
"with h5py.File(\"test.hp\", 'w') as f:\n",
" f.create_dataset(\"test\", data=test)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "29e5a4ed",
"metadata": {},
"outputs": [],
"source": [
"f"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "317aef53",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2360"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"k0, kf = minmax_clump(259, clump_ids)\n",
"\n",
"kf - k0 + 1"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "8fe50188",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([259, 259, 259, ..., 259, 259, 259], dtype=int32)"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"clump_ids[k0:kf+1]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d0508ab0",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 3,
"id": "011a9fea",
"metadata": {},
"outputs": [],
"source": [
"import numpy\n",
"\n",
"nsim = nsim0\n",
"nsnap = nsnap0\n",
"\n",
"\n",
"part0 = h5py.File(paths.initmatch_path(nsim, \"particles\"), 'r')['particles']\n",
"cmap = h5py.File(paths.particles_path(nsim, \"clumpmap\"), 'r')\n",
"partf = h5py.File(paths.particles_path(nsim), 'r')[\"particles\"]"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "8f8c9116",
"metadata": {},
"outputs": [],
"source": [
"part0[cmap[str(558655)], :]"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "1d74f0e7",
"metadata": {},
"outputs": [],
"source": [
"cat = csiborgtools.read.ClumpsCatalogue(nsim, paths, rawdata=True)"
]
},
{
"cell_type": "code",
"execution_count": 44,
"id": "b595aa4b",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"10000it [00:51, 193.86it/s]\n"
]
}
],
"source": [
"from tqdm import tqdm\n",
"y = np.zeros((10000, 2), dtype=np.int32)\n",
"\n",
"for i, hid in tqdm(enumerate(cat[\"index\"][cat.ismain][:10000])):\n",
" n = np.sum(cat[\"parent\"] == hid)\n",
" y[i, :] = hid, n"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "2bf99732",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([558655, 558659, 558673, 558675, 558677, 558692, 558705, 558717,\n",
" 558724, 558726, 558739, 558746, 558857, 559232, 559256, 559292,\n",
" 559325, 559343, 559349, 559384, 559388, 559406, 559415, 559453,\n",
" 559467, 559473, 559492, 559496, 559541, 559544, 559548, 559570,\n",
" 559571, 559604, 559612, 559637, 559643, 559648, 559655, 559724,\n",
" 559735, 559779, 559780, 559792, 559802, 559804, 559817, 559910,\n",
" 559918, 559926, 559960, 559977, 559982, 559997, 560012, 560031,\n",
" 560122, 560213, 560325, 560375, 560426, 560517, 560798, 562156,\n",
" 563235, 563254, 563586, 563651, 563671, 563892, 564050, 564068,\n",
" 564138, 564153, 564358, 564525, 564734, 564745, 564779, 564831,\n",
" 565008, 565180, 565272, 565276, 565521, 565620, 565701, 565891,\n",
" 566046, 566604, 566705, 567047, 567336, 567720, 568897, 569232,\n",
" 569376, 569773, 573130, 575459, 575880, 576414, 579319, 579445,\n",
" 579722, 579770, 580117, 580388, 580441, 580507, 580518, 581594,\n",
" 581767, 582047, 582713, 583256, 586403, 587027, 587239, 588764,\n",
" 593803, 595742, 596219, 599285, 600189, 603135, 605484],\n",
" dtype=int32)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cat[\"index\"][cat[\"parent\"] == 558655]"
]
},
{
"cell_type": "code",
"execution_count": 45,
"id": "64aa63a2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([558655, 127], dtype=int32)"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"y[np.argmax(y[:, 1]), :]"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "4a5c0091",
"metadata": {},
"outputs": [],
"source": [
"keys = list(cmap.keys())"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "d6befe8b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[558655 558659 558673 558675 558677 558692 558705 558717 558724 558726\n",
" 558739 558746 558857 559232 559256 559292 559325 559343 559349 559384\n",
" 559388 559406 559415 559453 559467 559473 559492 559496 559541 559544\n",
" 559548 559570 559571 559604 559612 559637 559643 559648 559655 559724\n",
" 559735 559779 559780 559792 559802 559804 559817 559910 559918 559926\n",
" 559960 559977 559982 559997 560012 560031 560122 560213 560325 560375\n",
" 560426 560517 560798 562156 563235 563254 563586 563651 563671 563892\n",
" 564050 564068 564138 564153 564358 564525 564734 564745 564779 564831\n",
" 565008 565180 565272 565276 565521 565620 565701 565891 566046 566604\n",
" 566705 567047 567336 567720 568897 569232 569376 569773 573130 575459\n",
" 575880 576414 579319 579445 579722 579770 580117 580388 580441 580507\n",
" 580518 581594 581767 582047 582713 583256 586403 587027 587239 588764\n",
" 593803 595742 596219 599285 600189 603135 605484]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
" 0%| | 0/127 [00:00<?, ?it/s]"
]
}
],
"source": [
"\n",
"csiborgtools.fits.load_parent_particles(558655, part0, cmap, cat)\n",
"# Xf = csiborgtools.fits.load_parent_particles(378, partf, cmap, cat)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "ee1a8686",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f9cee980a8fb4354aa78f811a8915e85",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB+FElEQVR4nO3de1xT9/0/8FdCCCGEOwKCIFXxUmpRUSmuF7tq6ebq3Gxr281a19vWy9ba9qudvTtn+6tb7Vp7UXtR206tl1atkypqqxURERGjIiJyDxAuCUlIQpLz+4PBdNOac4ICPa/n4+FjFs/nnc/nc07OeeVzTphCEAQBRERERCQbyp7uABERERFdWQyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDKj6ukO9GUejwc1NTUIDg6GQqHo6e4QERGRFwRBQGtrK+Li4qBUynMtjAHQBzU1NUhISOjpbhAREZEElZWVGDBgQE93o0cwAPogODgYQMcBFBIS0sO9ISIiIm+YzWYkJCR0XcfliAHQB523fUNCQhgAiYiI+hg5P74lzxvfRERERDLGAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARES9mM3pwqaCKticrh6tQUQ/LgyARESXSXcEryy9AQaTHX/9+oTkOll6A5osTnyjr5PcDyL6cWEAJCK6TLojeGWmxKK6uQ3xYYGS62SmxCJSF4BbU2Ik94OIflwYAImILpPuCF5atQp/njIC/cMCJdfRqlWYNjoeWrVKcj+I6MdFIQiC0NOd6KvMZjNCQ0NhMpkQEhLS090hIiIiL/D6zRVAIiIiItlhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQi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R2lpKV544QUMHjxYVPAkIiIi6mt6RQCcMWMGGhoa8OKLL8JgMGDUqFHYvn171xdDKioqoFT+Z7HSarXi0UcfRVVVFQIDAzF8+HB8+umnmDFjBgDAz88PJ0+exMqVK2E0GhEZGYlx48Zh7969SElJAQBotVps3LgRL730EqxWK/r374/bbrsNzz//PAICAq78JBARERFdIT3+DGBfxmcIiIiI+h5ev3vBM4BEREREdGUxABIRERHJDAMgERERkcwwABIRERHJDAMgERERkcwwABIRERHJDAMgERERkcwwABIRERHJDAMgERERkcwwABIRERHJDAMgERERkcwwABIRERHJDAMgERERkcwwABIRERH
"text/html": [
"\n",
" <div style=\"display: inline-block;\">\n",
" <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
" Figure\n",
" </div>\n",
" <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAB+FElEQVR4nO3de1xT9/0/8FdCCCGEOwKCIFXxUmpRUSmuF7tq6ebq3Gxr281a19vWy9ba9qudvTtn+6tb7Vp7UXtR206tl1atkypqqxURERGjIiJyDxAuCUlIQpLz+4PBdNOac4ICPa/n4+FjFs/nnc/nc07OeeVzTphCEAQBRERERCQbyp7uABERERFdWQyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDKj6ukO9GUejwc1NTUIDg6GQqHo6e4QERGRFwRBQGtrK+Li4qBUynMtjAHQBzU1NUhISOjpbhAREZEElZWVGDBgQE93o0cwAPogODgYQMcBFBIS0sO9ISIiIm+YzWYkJCR0XcfliAHQB523fUNCQhgAiYiI+hg5P74lzxvfRERERDLGAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARERERDLDAEhEREQkMwyARES9mM3pwqaCKticrh6tQUQ/LgyARESXSXcEryy9AQaTHX/9+oTkOll6A5osTnyjr5PcDyL6cWEAJCK6TLojeGWmxKK6uQ3xYYGS62SmxCJSF4BbU2Ik94OIflwYAImILpPuCF5atQp/njIC/cMCJdfRqlWYNjoeWrVKcj+I6MdFIQiC0NOd6KvMZjNCQ0NhMpkQEhLS090hIiIiL/D6zRVAIiIiItlhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIiIiIplhACQiIiKSGQZAIupWNqcLmwqqYHO6ekUd6n182bc8Loi6R68JgEuXLkVSUhI0Gg3S09Nx8ODBi267ceNGjB07FmFhYQgKCsKoUaOwevXq87Z5+eWXMXz4cAQFBSE8PByTJk1Cbm7uedtMnToViYmJ0Gg06N+/P2bOnImamprLMj4iucjSG9BkceIbfZ2k9janC2vyKvDchqNYuf8sNuRXSa7T00GhO/rQG8YBAEaLHXM3FGJVzlnJ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O2338bkyZPP22br1q3Q6XTQaDR48803sWPHDkRFRZ23zdy5cxEUFITIyEhUVFTgq6++uuhrLlq0CKGhoV1/EhISJIyYiC4nrVqFmRlJWHzXaMzMkBYQ1Colxl8VgYGRQXgmc5ikfqhVfojUqRGl00CtknaqjdJpsPJ34zFn8jAM6qfDa9NHSqrz7m/GIGNwJD5/KF1yYHrr7tFIGxiB1Q+M9yl0DY0NwY45N2ForPRVF61ahWmj4xn+iHzQ47eAa2pqEB8fj/379yMjI6Pr5//3f/+Hb7/99n++uNHJ4/HgzJkzsFgsyM7OxoIFC/Dll19i4sSJXdtYrVbU1tbCaDRi+fLl2LVrF3JzcxEdHd21jdFoRFNTE8rLy/HKK68gNDQUW7duhUKh+J/XvNAKYEJCgqyXkIl+jGxOF77R1+HWlBjJIaPzVjYA3qIk6mV4C7gXBECn0wmtVov169dj2rRpXT+fNWsWWlpafnBF7lwPPvggKisrz/siyH9LTk7G7373u/NuN5+rqqoKCQkJ/xNGL4YHEBERUd/D63cvuAWsVquRlpaG7Ozsrp95PB5kZ2d7FcLObXPu6pyUbTweDwBcsg4RERFRX9Yr7knMmTMHs2bNwtixYzF+/HgsWbIEVqsVs2fPBgDcd999iI+Px6JFiwB0PIs3duxYDB48GA6HA9u2bcPq1avx3nvvAei49btw4UJMnToV/fv3h9FoxNKlS1FdXY0777wTAJCbm4u8vDxcf/31CA8PR2lpKV544QUMHjxYVPAkIiIi6mt6RQCcMWMGGhoa8OKLL8JgMGDUqFHYvn171xdDKioqoFT+Z7HSarXi0UcfRVVVFQIDAzF8+HB8+umnmDFjBgDAz88PJ0+exMqVK2E0GhEZGYlx48Zh7969SElJAQBotVps3LgRL730EqxWK/r374/bbrsNzz//PAICAq78JBARERFdIT3+DGBfxmcIiIiI+h5ev3vBM4BEREREdGUxABIRERHJDAMgERERkcwwABIRERHJDAMgERERkcwwABIRERHJDAMgERERkcwwABIRERHJDAMgERERkcwwABIRERHJDAM
" </div>\n",
" "
],
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure()\n",
"\n",
"plt.scatter(X[:, 0], X[:, 1], s=0.1)\n",
"# plt.scatter(Xf[:, 0], Xf[:, 1], s=0.1)\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1bbda411",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 3,
"id": "6e9d36ca",
"metadata": {},
"outputs": [],
"source": [
"pid_final = np.load(\"pid_final.npy\")\n",
"pid_init = np.load(\"pid_initial.npy\")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "ac9c5c58",
"metadata": {},
"outputs": [],
"source": [
"pid_order = np.argsort(pid_final).astype(np.int32)\n",
"\n",
"pid_order_2 = np.argsort(pid_order).astype(np.int32)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "bcf3be0a",
"metadata": {},
"outputs": [],
"source": [
"# Sort them\n",
"\n",
"pid_init = pid_init[np.argsort(pid_init)]"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "1218ba7f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.alltrue(pid_init[pid_order_2] == pid_final)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "0a12563b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 6, 7, 8, ..., 429538984, 456581538,\n",
" 456482476], dtype=int32)"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "95d9f0f7",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "c7998177",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "1b1ef66c",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 25,
"id": "5b9362d2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 6, 7, 8, ..., 429538984, 456581538,\n",
" 456482476], dtype=int32)"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"\n",
"\n",
"pid_final[pid_order][pid_order_2]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a333cacf",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "cf7a4005",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "884cfa0f",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "ebcc11ae",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 18,
"id": "3f155db8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 1, 2, 3, ..., 460357796, 460357797,\n",
" 460357798], dtype=int32)"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"part0['ID']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "88feaaff",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 8,
"id": "20d1a6a0",
"metadata": {},
"outputs": [],
"source": [
"indx1 = numpy.argsort(part0['ID'])\n",
"\n",
"indx2 = numpy.argsort(pid)\n",
"\n",
"indx1_inv = numpy.argsort(indx1)\n",
"part0 = part0[indx2][indx1_inv]\n",
"# pid = pid[indx2]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([(0.6463347 , 0.5915494 , 0.3729033 , 1.1641532e-10, 285313656),\n",
" (0.22073722, 0.49019635, 0.9627326 , 5.9604645e-08, 58672855),\n",
" (0.7210556 , 0.18949312, 0.37298316, 5.9604645e-08, 459417395),\n",
" ...,\n",
" (0.46851808, 0.2966002 , 0.44987014, 1.1641532e-10, 2684309),\n",
" (0.7481397 , 0.02954267, 0.8927611 , 5.9604645e-08, 402473389),\n",
" (0.9159686 , 0.8301242 , 0.67392564, 5.9604645e-08, 287235917)],\n",
" dtype=[('x', '<f4'), ('y', '<f4'), ('z', '<f4'), ('M', '<f4'), ('ID', '<i4')])"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"part0"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "53d0f130",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "78041a0a",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "b6059fb3",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "aafbd8d9",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 10,
"id": "4d989091",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 6, 7, 8, ..., 429538984, 456581538,\n",
" 456482476], dtype=int32)"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pid"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "c97c3f51",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 1, 2, 3, ..., 460471465, 460471466,\n",
" 460471467], dtype=int32)"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pid"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 1, 2, 3, 5, 6, 7, 9, 11, 12, 13, 15, 17, 19,\n",
" 21, 22, 23, 29, 32, 34, 39, 134, 137, 138, 139, 149, 151,\n",
" 156, 157, 158, 159, 161, 163, 167, 168, 169, 172, 173, 175, 178,\n",
" 181, 186, 188, 189, 191, 196, 197, 198, 204, 209, 211], dtype=int32)"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cat = csiborgtools.read.ClumpsCatalogue(nsim, paths, load_fitted=False, rawdata=True)\n",
"parent_ids = cat[\"index\"][cat.ismain]\n",
"\n",
"parent_ids[:50]"
]
},
{
"cell_type": "code",
"execution_count": 54,
"id": "af4fa7e0",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"11031538"
]
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"i = cat[\"index\"][np.argsort(cat[\"mass_cl\"])[::-3][213]]\n",
"i"
]
},
{
"cell_type": "code",
"execution_count": 55,
"id": "c57a56ac",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[11031538 11032027 11033906 11034471 11034477 11034692 11035306 11049411\n",
" 11057461 11058959]\n",
"[24440, 256, 133, 0, 0, 0, 113, 0, 0, 0]\n"
]
}
],
"source": [
"# clid = 10170336\n",
"# clid = 10170336 + 12\n",
"clid = i\n",
"\n",
"\n",
"mmain_indxs = cat[\"index\"][cat[\"parent\"] == clid]\n",
"# mask = clump_ids == clid\n",
"# print(mask.sum())\n",
"print(mmain_indxs)\n",
"\n",
"print([numpy.sum(clump_ids == j) for j in mmain_indxs])\n"
]
},
{
"cell_type": "code",
"execution_count": 56,
"id": "4ad427f1",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"24942"
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mask = numpy.isin(clump_ids, mmain_indxs)\n",
"mask.sum()"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "410c3b97efc14cd8b1b34d7a3666483f",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG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YmFWh42i+5sxL8wHls8ZqlSxTK/airvFy9L8zgwEcLrvbenwAsHK2vjwAGLFkJ1rbHM+4ocUhV71PzRypjZXjAGBcdn9ULbjTs0xbnBprO+dTK36JusZmzziGYZhkwP03jwAyPZDQ0chuF6Gj9t0u5N+3Wb7mbNp3Bo3Xkr80H1A0LVcb0ywJk9ucyM90yMkf9fhEHSZapQbY4sZl94/+/8bmVmOsHAcAR+uaSGXa4gAgO7NdtF4wzryjTtG0XAQDfvg84hiGYZjkwAkg0+MoGJeFNJ934iD/Xk5MVIqm5SIzGEBmMGAc1ZMTlnHZ/ZGdGdQminJdmcFeyM4M4qmZIz2PL5DmM5YHtCdhXnFVC+7Eytljo+0xxVYtuBNnKwqi5aoJoRpLiQOA/cXTcbaiAGcrCqyjs3Mn5+DEinvxnkccwzAMkxz4FXAn4CFkhmEYhul5cP/NI4AMwzAMwzApByeADMMwDMMwKQYngAzDMAzDMCkGJ4AMwzAMwzApRq+uPgCGEVRW12LTvjMompZr9NwBEX/ejiP1yAj4saRgtDFWuPsut4Zx/3i7M1CUS/ELMmao11B2JRZ6XBsRa3MvAhFh9dG6JgTSfCi7f4y1foZhmFSHE0Cm27Bp3xnUNTZj074z1s5byJObW8PWWNndt+NIvTbJUGXMQMTPp8bKcZnBXuibHjAmOSMW70Rr2EHA70NZ4RhjQpR
"text/html": [
"\n",
" <div style=\"display: inline-block;\">\n",
" <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
" Figure\n",
" </div>\n",
" <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAADEqklEQVR4nOy9e3RUx5mv/esWjdQQg+zYXCQTAQohXAJiyCAw/iYcQ4xtHQvOZK3jISF4fHyZKBgcczyxB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0LVcb0ywJk9ucyM90yMkf9fhEHSZapQbY4sZl94/+/8bmVmOsHAcAR+uaSGXa4gAgO7NdtF4wzryjTtG0XAQDfvg84hiGYZjkwAkg0+MoGJeFNJ934iD/Xk5MVIqm5SIzGEBmMGAc1ZMTlnHZ/ZGdGdQminJdmcFeyM4M4qmZIz2PL5DmM5YHtCdhXnFVC+7Eytljo+0xxVYtuBNnKwqi5aoJoRpLiQOA/cXTcbaiAGcrCqyjs3Mn5+DEinvxnkccwzAMkxz4FXAn4CFkhmEYhul5cP/NI4AMwzAMwzApByeADMMwDMMwKQYngAzDMAzDMCkGJ4AMwzAMwzApRq+uPgCGEVRW12LTvjMompZr9NwBEX/ejiP1yAj4saRgtDFWuPsut4Zx/3i7M1CUS/ELMmao11B2JRZ6XBsRa3MvAhFh9dG6JgTSfCi7f4y1foZhmFSHE0Cm27Bp3xnUNTZj074z1s5byJObW8PWWNndt+NIvTbJUGXMQMTPp8b
" </div>\n",
" "
],
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# coords = part0[mask, :]\n",
"plt.figure()\n",
"plt.scatter(part0['x'][mask], part0['y'][mask], s=1)\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "72a723d2",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "33d088f2",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "e54f3005",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 193,
"id": "b097637b",
"metadata": {},
"outputs": [],
"source": [
"particles0 = h5py.File(paths.initmatch_path(nsim0, \"particles\"), 'r')['particles']\n",
"particlesx = h5py.File(paths.initmatch_path(nsimx, \"particles\") , 'r')['particles']"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "c3cf4c91",
"metadata": {},
"outputs": [],
"source": [
"# delta_bckg = overlapper.make_bckg_delta(particles0, verbose=True)\n",
"# delta_bckg = overlapper.make_bckg_delta(particlesx, delta=delta_bckg, verbose=True)\n",
"# np.save(\"./bckg_{}_{}.npy\".format(nsim0, nsimx), delta_bckg)\n",
"# delta_bckg = np.load(\"./bckg_{}_{}.npy\".format(nsim0, nsimx))"
]
},
{
"cell_type": "code",
"execution_count": 194,
"id": "f7a602a5",
"metadata": {},
"outputs": [],
"source": [
"map0 = h5py.File(paths.initmatch_path(nsim0, \"halomap\"), 'r')\n",
"mapx = h5py.File(paths.initmatch_path(nsimx, \"halomap\"), 'r')"
]
},
{
"cell_type": "code",
"execution_count": 174,
"id": "79ddf8f5",
"metadata": {},
"outputs": [],
"source": [
"keys = np.array(sorted([int(x) for x in mapx.keys()]))"
]
},
{
"cell_type": "code",
"execution_count": 175,
"id": "326b4ae8",
"metadata": {},
"outputs": [],
"source": [
"paths = csiborgtools.read.CSiBORGPaths(**csiborgtools.paths_glamdring)\n",
"\n",
"halocat = csiborgtools.read.HaloCatalogue(nsimx, paths, rawdata=True)\n",
"clumpcat = csiborgtools.read.ClumpsCatalogue(nsimx, paths, rawdata=True)"
]
},
{
"cell_type": "code",
"execution_count": 176,
"id": "6d5a86b2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"10"
]
},
"execution_count": 176,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"clid = 2\n",
"\n",
"\n",
"np.sum(clumpcat[\"parent\"] == clid)\n",
"\n",
"# mmain_indxs = clumpcat[\"index\"][clumpcat[\"parent\"] == clid]\n",
"\n",
"# mmain_indxs\n",
"# mmain_mask = numpy.isin(clump_ids, mmain_indxs, assume_unique=True)"
]
},
{
"cell_type": "code",
"execution_count": 195,
"id": "099d3357",
"metadata": {},
"outputs": [],
"source": [
"fs = list(map0.keys())"
]
},
{
"cell_type": "code",
"execution_count": 196,
"id": "21aa49af",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 173643/173643 [01:29<00:00, 1947.49it/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"362439022\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n"
]
}
],
"source": [
"from tqdm import tqdm\n",
"tot = 0\n",
"for f in tqdm(fs):\n",
" tot += map0[f].shape[0]\n",
"\n",
"print(tot)"
]
},
{
"cell_type": "code",
"execution_count": 197,
"id": "278de818",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<HDF5 dataset \"particles\": shape (182510395, 4), type \"<f4\">"
]
},
"execution_count": 197,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"particles0"
]
},
{
"cell_type": "code",
"execution_count": 198,
"id": "e55b65c4",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.9858541317605498"
]
},
"execution_count": 198,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tot / 182510395"
]
},
{
"cell_type": "code",
"execution_count": 172,
"id": "373423b2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<HDF5 dataset \"particles\": shape (182036133, 4), type \"<f4\">"
]
},
"execution_count": 172,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"particlesx"
]
},
{
"cell_type": "code",
"execution_count": 177,
"id": "d5b65fcb",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"86031"
]
},
"execution_count": 177,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"i = 10170336\n",
"\n",
"\n",
"k = np.where(cat[\"ID\"] == i)[0][0]\n",
"k"
]
},
{
"cell_type": "code",
"execution_count": 178,
"id": "709cb935",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"10170336\n"
]
},
{
"data": {
"text/plain": [
"<HDF5 dataset \"10170336\": shape (2085,), type \"<i8\">"
]
},
"execution_count": 178,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# i = np.random.choice(keys[keys<100000])\n",
"\n",
"# # i = 10040155 #+ 11\n",
"\n",
"print(i)\n",
"# i = 32\n",
"\n",
"\n",
"mask = map0[str(i)]\n",
"mask"
]
},
{
"cell_type": "code",
"execution_count": 183,
"id": "7f4a40a5",
"metadata": {},
"outputs": [],
"source": [
"halo = particlesx[mask, :]"
]
},
{
"cell_type": "code",
"execution_count": 184,
"id": "e83806b1",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2085.000032720428"
]
},
"execution_count": 184,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.sum(halo[:, 3]) / 1.1641532e-10"
]
},
{
"cell_type": "code",
"execution_count": 186,
"id": "7fe3494d",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "92b87db2ae5440c19f4b4694e9e98aaf",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAADG30lEQVR4nOz9e3hU5b33j7/nkGSSTGYghIRMIBCFpGoCWJQAUWktPnbXVqqt2MNV3eyqqEGp+LTWdmt367fS1oJYQWG3Pw99dm1BC0U33bYWWqrhoEWQQLcJSDRIIAcCk0zOc/j9MVl37nXPWmvWHLNm5vO6Li+czDrea8263+tzNAUCgQAIgiAIgiCIjME83gdAEARBEARBJBcSgARBEARBEBkGCUCCIAiCIIgMgwQgQRAEQRBEhkECkCAIgiAIIsMgAUgQBEEQBJFhkA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yQa4lOve7fSISk3mWpTzBBEER6YvgZuqurCz6fDyUlJbK/l5SU4P3331dc5+TJk9i9eze+/vWv449//CNOnDiBe++9FyMjI/jBD34Qsrzf78e3vvUt1NXVobq6WvVYhoaGMDQ0xD739Ci7aeOB1WLGrJICmQWmqsSOHfV1uuPHrBYzExnlhXnw+vyyIszSRK4VBvoR5wJt6vBg6gQbPr4wGNyvsNpP/ud/8UFXcHmb1Yx/fP8z6PAMs+NKlTi2eHXF4K9dtcuB3CwzBkb8yM0yo9ieHVIzUUy8EbcRzgInWi+L7dnY09ShWHRbr6WTElAIgiDSE8MLwGjw+/0oLi7Gf/7
"text/html": [
"\n",
" <div style=\"display: inline-block;\">\n",
" <div class=\"jupyter-widgets widget-label\" style=\"text-align: center;\">\n",
" Figure\n",
" </div>\n",
" <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAADG30lEQVR4nOz9e3hU5b33j7/nkGSSTGYghIRMIBCFpGoCWJQAUWktPnbXVqqt2MNV3eyqqEGp+LTWdmt367fS1oJYQWG3Pw99dm1BC0U33bYWWqrhoEWQQLcJSDRIIAcCk0zOc/j9MVl37nXPWmvWHLNm5vO6Li+czDrea8263+tzNAUCgQAIgiAIgiCIjME83gdAEARBEARBJBcSgARBEARBEBkGCUCCIAiCIIgMgwQgQRAEQRBEhkECkCAIgiAIIsMgAUgQBEEQBJFhkAAkCIIgCILIMEgAEgRBEARBZBgkAAmCIAiCIDIMEoAEQRAEQRAZBglAgiAIgiCIDIMEIEEQBEEQRIZBApAgCIIgCCLDIAFIEARBEASRYZAAJAiCIAiCyDBIABIEQRAEQWQYJAAJgiAIgiAyDBKABEEQBEEQGQYJQIIgCIIgiAyDBCBBEARBEESGQQKQIAiCI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R5wJt6vBg6gQbPr4wGNyvsNpP/ud/8UFXcHmb1Yx/fP8z6PAMs+NKlTi2eHXF4K9dtcuB3CwzBkb8yM0yo9ieHVIzUUy8EbcRzgInWi+L7dnY09S
" </div>\n",
" "
],
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure()\n",
"plt.scatter(halo[:, 0], halo[:, 1], s=2)\n",
"# plt.scatter(cat['x'][k], cat['y'][k], s=10, c='r')\n",
"\n",
"plt.xlabel(r\"x\")\n",
"plt.ylabel(r\"y\")\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c0c2d4fe",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "2f2ead3e",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "d48adc68",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "276b5823",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "13f4cf79",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "11a909af",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "105862df",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "a2f25a4e",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "93fbe29d",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "64608a92",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 21,
"id": "35442e33",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_7442/2249068321.py:2: RuntimeWarning: divide by zero encountered in log10\n",
" plt.imshow(np.log10(np.sum(delta_bckg, axis=0)))\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "bb36c88a57034c6ea702eb545cc6e57b",
"version_major": 2,
"version_minor": 0
},
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9W6xt2VkdCrev9zHmXGvfytjE9okwwXb5Eh9IUICAFSkPiYUVOQ8IIuUBIRLxhAoUbA4JPiLmGmzKeBc5AkROFAFSQoh4iCKQckFO4jxgRGQU/YQcnJDzn9gS8iXJocquvdecY/T+nYfv0r8+5izblOuyd63epKW11pzj0kcfY87RRmvfhZiZMTAwMDAwMDAwcG2QXuwBDAwMDAwMDAwMvLAYBHBgYGBgYGBg4JphEMCBgYGBgYGBgWuGQQAHBgYGBgYGBq4ZBgEcGBgYGBgYGLhmGARwYGBgYGBgYOCaYRDAgYGBgYGBgYFrhkEABwYGBgYGBgauGQYBHBgYGBgYGBi4ZhgEcGBgYGBgYGDgmmEQwIGBgYGBgYGBa4ZBAAcGBgYGBgYGrhkGARwYGBgYGBgYuGYYBHBgYGBgYGBg4JphEMCBgYGBgYGBgWuGQQAHBgYGBgYGBq4ZBgEcGBgYGBgYGLhmGARwYGBgYGBgYOCaYRDAgYGBgYGBgYFrhkEABwYGBgYGBgauGQYBHBgYGBgYGBi4ZhgEcGBgYGBgYGDgmmEQwIGBgYGBgYGBa4ZBAAcGBgYGBgYGrhkGARwYGBgYGBgYuGYYBHBgYGBgYGBg4JphEMCBgYGBgYGBgWuGQQAHBgYGBgYGBq4ZBgEcGBgYGBgYGLhmGARwYGBgYGBgYOCaYRDAgYGBgYGBgYFrhkEABwYGBgYGBgauGQYBHBgYGBgYGB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XpDYv/Y6Z1ungo7JVck6s5O6utO/fRtiWYs9rMdMQhbLhSxULhmPvu8uAOD3v38QwYGBgT8aBgEcGBh43vHGH30Cx5dV7P9HAk+M9SZj/z8Syk3GkoWQlUvJzJ0+K2Sqzow6ATzByVq5USXWbyXUCwYtBCRJ4MCBkIqSObWC6xRi8dQyJpbMXk7AeqsAAKbPZqyPFCGJR0K9s4I/MwGJUW8IcYOFS9Pm4DKDIYqgk0PS/U0yRtb4QE4MVuJHK6HeKqCrBFoJ5WUr6OmpbV7JZbldke5JsKHHGjIJgaxCZF//+F3kI7BeAv/39w4yODAw8PkxCODAwMBzjjf90BOoO5bkigLwHshXkoVrFudym70cy5qFLKVF1C5Wq7ROQtbqhRA/QEnUjQpaggXLAHbAelmR7qvKliEEkWUdVImpq1neQ1JVMAmxBAM8qdy3JNRdFWWvEJiaVWsEjKGv7SqwKvnLIh2ykjckyRImFhIYVUpOEBt5YlQm0L0sZFLH5GNcCHVfZV0FMQmxzJKlXPcAZyHDj/7EXVBVm7gAuz8k/KcfHzGEAwMDPQYBHBgYeE7xxh+7698sadGM3CSZtlVLprA6pmkxUqekbxVli5MSxykQvAoQQhJFCgUMSOPsCKiX1V9OnFqCiCqAFjNYJ7RS+Kw/hQCzlldqpCsLgZTlSP43re6QVYWsugz5mKRwIJQsyn6pyHbJjqmILElViSZ0XCTJJ2YTm83MxPKzZ6RDEhKrZBMMrDdY5l2zkdcbjDf90BMyJAZ+74cHGRwYGBgEcGBg4IvAm37kCTABh1etkh2bGeWVFbtPZ9QdsN4u2H86gydgfeUR+X/MYr/eLKBPz5JQsWOkewl8WUUJ06QLAMCif9fNjisBcxXCBgghK9QpdKLoCSkqkxAiuJLHorZdFPn/kEA3V/AhA5WQ7iyo9ybZ5k73Qwysuj8G0s0F9em5pRp3xE/HQdCslFb/JZI8jsdwJFc56+1VFEEltHRUG3nSMYQeThJ
"text/html": [
"\n",
" <div style=\"display: inline-block;\">\n",
" <div class=\"jupyter-widgets widget-label\" style=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+M9SZj/z8Syk3GkoWQlUvJzJ0+K2Sqzow6ATzByVq5USXWbyXUCwYtBCRJ4MCBkIqSObWC6xRi8dQyJpbMXk7AeqsAAKbPZqyPFCGJR0K9s4I/MwGJUW8IcYOFS9Pm4DKDIYqgk0PS/U0yRtb4QE4MVuJHK6HeKqCrBFoJ5WUr6OmpbV7JZbldke5JsKHHGjIJgaxCZF//+F3kI7BeAv/39w4yODAw8PkxCODAwMBzjjf90BOoO5bkigLwHshXkoVrFudym70cy5qFLKVF1C5Wq7ROQtbqhRA/QEnUjQpaggXLAHbAelmR7qvKliEEkWUdVImpq1neQ1JVMAmxBAM8qdy3JNRdFWWvEJiaVWsEjKGv7SqwKvnLIh2ykjckyRImFhIYVUpOEBt5YlQm0L0sZFLH5GNcCHVfZV0FMQmxzJKlXPcAZyHDj/7EXVBVm7gAuz8k/KcfHzGEAwMDPQYBHBgYeE7xxh+7698sadGM3CSZtlVLprA6pmkxUqekbxVli5MSxykQvAoQQhJFCgUMSOPsCKiX1V9OnFqCiCqAFjNYJ7RS+Kw/hQCzlldqpCsLgZTlSP43re6QVYWsugz5mKRwIJQsyn6pyHbJjqmILElViSZ0XCTJJ2YTm83MxPKzZ6RDEhKrZBMMrDdY5l2zkdcbjDf90BMyJAZ+74cHGRwYGBgEcGBg4IvAm37kCTABh1etkh2bGeWVFbtPZ9QdsN4u2H86gydgfeUR+X/MYr/eLKBPz5JQsWOkewl8WUUJ06QLAMCif9fNjisBcxXCBgghK9QpdKLoCSkqkxAiuJLHorZdFPn/kEA3V/AhA5WQ7iyo9ybZ5k73Qwysuj8G0s0F9em5pRp3xE/HQdCslFb
" </div>\n",
" "
],
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure()\n",
"plt.imshow(np.log10(np.sum(delta_bckg, axis=0)))\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "1d8ad8fe",
"metadata": {},
"outputs": [],
"source": [
"f = h5py.File(\"../data/particles_7444.h5\", \"r\")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "020ac8e4",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 4.42346358e-01, 7.09757663e-03, 4.64053304e-01, -1.96926287e-03,\n",
" -2.67177823e-03, -6.45721859e-04, 1.16415322e-10])"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"f[\"particles\"][0, :]"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1eb74f46",
"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.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}