mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-23 03:18:03 +00:00
f48eb6dcb0
* add radial position path * pep8 * Add basic fit profile dumping * pep8 * pep8 * pep8 * pep8 * pep8 * pep8 * Update TODO * Fix parts is None bug * Update nb
93 lines
2.1 KiB
Text
93 lines
2.1 KiB
Text
{
|
|
"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 matplotlib.pyplot as plt\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 = 7444\n",
|
|
"nsimx = 7444 + 24\n",
|
|
"nsnap0 = max(paths.get_snapshots(nsim0))\n",
|
|
"nsnapx = max(paths.get_snapshots(nsimx))\n",
|
|
"overlapper = csiborgtools.match.ParticleOverlap()"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 3,
|
|
"id": "b097637b",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"halo0_archive = np.load(paths.split_path(nsnap0, nsim0))\n",
|
|
"halox_archive = np.load(paths.split_path(nsnapx, nsimx))"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 13,
|
|
"id": "c3cf4c91",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stderr",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"100%|██████████| 204873/204873 [16:48<00:00, 203.15it/s]\n",
|
|
"100%|██████████| 204960/204960 [16:42<00:00, 204.55it/s]\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"# delta_bckg = overlapper.make_bckg_delta(halo0_archive, verbose=True)\n",
|
|
"# delta_bckg = overlapper.make_bckg_delta(halox_archive, delta=delta_bckg, verbose=True)\n",
|
|
"# np.save(\"./bckg_{}_{}.npy\".format(nsim0, nsimx), delta_bckg)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "f2986dd2",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "venv_galomatch",
|
|
"language": "python",
|
|
"name": "venv_galomatch"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|