Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ docs/_build/
_version.py
_autosummary/
coverage.xml
.ipynb_checkpoints/
7 changes: 4 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Configuration for docs."""

import os
from datetime import datetime, timezone
import sys
from datetime import UTC, datetime
from pathlib import Path

sys.path.insert(0, str(Path(__file__).absolute().parent.parent / "src"))

import tuesday
Expand Down Expand Up @@ -45,7 +46,7 @@
source_suffix = ".rst"
master_doc = "index"
project = "tuesday"
year = str(datetime.now(tz=timezone.utc).year)
year = str(datetime.now(tz=UTC).year)
author = "Daniela Breitman and Steven Murray"
copyright = f"{year}, {author}"
version = release = tuesday.__version__
Expand Down Expand Up @@ -86,4 +87,4 @@
".DS_Store",
"templates",
"**.ipynb_checkpoints",
]
]
70 changes: 36 additions & 34 deletions docs/tutorials/computing_and_plotting_power_spectra.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,13 @@
}
],
"source": [
"\n",
"ax = plot_coeval_slice(\n",
" delta_x,\n",
" box_len,\n",
" transform2slice=coeval2slice_x(idx=15),\n",
" title=\"Slice in x-direction\",\n",
" v_x=delta_x[15,...]*un.m / un.s,\n",
" v_y=delta_x[15,...]*un.m / un.s,\n",
" v_x=delta_x[15, ...] * un.m / un.s,\n",
" v_y=delta_x[15, ...] * un.m / un.s,\n",
" quiver_decimate_factor=3,\n",
")"
]
Expand Down Expand Up @@ -232,7 +231,10 @@
],
"source": [
"plot_coeval_slice(\n",
" delta_x.value*un.mK, box_len, transform2slice=coeval2slice_y(), title=\"Slice in y-direction\"\n",
" delta_x.value * un.mK,\n",
" box_len,\n",
" transform2slice=coeval2slice_y(),\n",
" title=\"Slice in y-direction\",\n",
")"
]
},
Expand Down Expand Up @@ -530,16 +532,16 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from tuesday.core import lc2slice_x, lc2slice_y, plot_redshift_slice"
"from tuesday.core import lc2slice_x, lc2slice_y, plot_lightcone_slice"
]
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -564,7 +566,7 @@
}
],
"source": [
"plot_redshift_slice(\n",
"plot_lightcone_slice(\n",
" lc,\n",
" box_len,\n",
" lc_redshifts,\n",
Expand All @@ -583,7 +585,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -608,7 +610,7 @@
}
],
"source": [
"plot_redshift_slice(\n",
"plot_lightcone_slice(\n",
" lc,\n",
" box_len,\n",
" lc_redshifts,\n",
Expand All @@ -628,7 +630,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -653,7 +655,7 @@
}
],
"source": [
"plot_redshift_slice(\n",
"plot_lightcone_slice(\n",
" lc,\n",
" box_len,\n",
" lc_redshifts,\n",
Expand Down Expand Up @@ -793,16 +795,16 @@
"fig, ax = plt.subplots(1, 1, figsize=(18, 7))\n",
"\n",
"ax = tuesday.core.plot_power_spectrum(\n",
" ps1d,\n",
" at_k=0.05,\n",
" fontsize=20,\n",
" ax=ax,\n",
" color=f\"r\",\n",
" legend=f\"k ~ 0.05\",\n",
" legend_kwargs={\"frameon\": False},\n",
" logx=False,\n",
" logy=False,\n",
" )\n",
" ps1d,\n",
" at_k=0.05,\n",
" fontsize=20,\n",
" ax=ax,\n",
" color=\"r\",\n",
" legend=\"k ~ 0.05\",\n",
" legend_kwargs={\"frameon\": False},\n",
" logx=False,\n",
" logy=False,\n",
")\n",
"\n",
"ax = tuesday.core.plot_power_spectrum(\n",
" all_analytic,\n",
Expand Down Expand Up @@ -840,16 +842,16 @@
"fig, ax = plt.subplots(1, 1, figsize=(18, 7))\n",
"\n",
"ax = tuesday.core.plot_power_spectrum(\n",
" ps1d,\n",
" fontsize=20,\n",
" ax=ax,\n",
" color=f\"r\",\n",
" at_k=at_k,\n",
" legend=f\"k ~ \"+str(at_k),\n",
" legend_kwargs={\"frameon\": False},\n",
" logx=False,\n",
" logy=False,\n",
" )\n",
" ps1d,\n",
" fontsize=20,\n",
" ax=ax,\n",
" color=\"r\",\n",
" at_k=at_k,\n",
" legend=\"k ~ \" + str(at_k),\n",
" legend_kwargs={\"frameon\": False},\n",
" logx=False,\n",
" logy=False,\n",
")\n",
"\n",
"ax = tuesday.core.plot_power_spectrum(\n",
" all_analytic,\n",
Expand Down Expand Up @@ -1064,7 +1066,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "21cmFAST",
"display_name": "tuesday",
"language": "python",
"name": "python3"
},
Expand All @@ -1078,7 +1080,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.12"
"version": "3.12.6"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
Loading
Loading