minor
This commit is contained in:
parent
a38f1b2585
commit
7cb65744f3
2 changed files with 102 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,6 +8,7 @@
|
|||
*.o
|
||||
*.so
|
||||
*/build/*
|
||||
*egg-info*
|
||||
|
||||
############
|
||||
# Packages #
|
||||
|
|
101
notebooks/3_constants.ipynb
Normal file
101
notebooks/3_constants.ipynb
Normal file
|
@ -0,0 +1,101 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "65c59396",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Tristan Hoellinger<br/>\n",
|
||||
"Institut d'Astrophysique de Paris</br>\n",
|
||||
"tristan.hoellinger@iap.fr"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "5b0cf9e5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import numpy as np"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "eae75fe1",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Min k (1D): 0.025 h/Mpc\n",
|
||||
"Min k: 0.014 h/Mpc\n",
|
||||
"Nyquist ('particles grid'): 3.14 h/Mpc\n",
|
||||
"Nyquist (density grid): 6.28 h/Mpc\n",
|
||||
"Nyquist (PM grid): 6.28 h/Mpc\n",
|
||||
"Particle wavenumber: 104.72 h/Mpc\n",
|
||||
"Split wavenumber: 10.05 h/Mpc\n",
|
||||
"Short-range reach: 2.23 h/Mpc\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"L = 256\n",
|
||||
"N = 512\n",
|
||||
"Np = 256\n",
|
||||
"Npm = 512\n",
|
||||
"min_k_1D = 2 * np.pi / L\n",
|
||||
"min_k = 2 * np.pi / L / np.sqrt(3)\n",
|
||||
"nyquist = np.pi * N / L\n",
|
||||
"nyquist_PM = np.pi * Npm / L\n",
|
||||
"nyquist_particles = np.pi * Np / L\n",
|
||||
"epsilon = 0.03 * L / Np\n",
|
||||
"particle_length = 2*epsilon\n",
|
||||
"xs = 1.25 * L / Npm\n",
|
||||
"xr = 4.5 * xs\n",
|
||||
"particle_wavenumber = 2*np.pi / particle_length\n",
|
||||
"xs_inv = 2*np.pi / xs\n",
|
||||
"xr_inv = 2*np.pi / xr\n",
|
||||
"print(f\"Min k (1D): {min_k_1D:.3f} h/Mpc\")\n",
|
||||
"print(f\"Min k: {min_k:.3f} h/Mpc\")\n",
|
||||
"print(f\"Nyquist ('particles grid'): {nyquist_particles:.2f} h/Mpc\")\n",
|
||||
"print(f\"Nyquist (density grid): {nyquist:.2f} h/Mpc\")\n",
|
||||
"print(f\"Nyquist (PM grid): {nyquist_PM:.2f} h/Mpc\")\n",
|
||||
"print(f\"Particle wavenumber: {particle_wavenumber:.2f} h/Mpc\")\n",
|
||||
"print(f\"Split wavenumber: {xs_inv:.2f} h/Mpc\")\n",
|
||||
"print(f\"Short-range reach: {xr_inv:.2f} h/Mpc\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "16e60561",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "p3m",
|
||||
"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.13.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue