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
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ to exit the virtual environment.
Documentation
-------------

See the `documentation <https://tuesday.readthedocs.io/en/latest/>`_ for more information on how to use ``tuesday``.
See the `documentation <https://tuesday-eor.readthedocs.io/en/latest/>`_ for more information on how to use ``tuesday``.

Contribute
----------
Expand Down
1 change: 1 addition & 0 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ API Reference

.. toctree::
:glob:
:maxdepth: 4

tuesday*
1 change: 0 additions & 1 deletion docs/reference/tuesday.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ Instrument noise simulation
:template: module.rst

tuesday.core.instrument_models

40 changes: 30 additions & 10 deletions docs/tutorials/lc_noise_compare_tools21cm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,17 @@
},
{
"cell_type": "markdown",
"id": "9039a78d",
"metadata": {},
"source": [
"# Compare SKA AA4 layouts\n",
"## Compare SKA AA4 layouts\n",
"We check that the station layouts used in both codes are the same:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "ca600f57",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -76,6 +78,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "790f7903",
"metadata": {},
"outputs": [
{
Expand All @@ -93,6 +96,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "38b52fd4",
"metadata": {},
"outputs": [
{
Expand All @@ -115,18 +119,20 @@
},
{
"cell_type": "markdown",
"id": "c7edca81",
"metadata": {},
"source": [
"We confirm that both `tools21cm` and `21cmSense` are using the same SKA antenna layout.\\\n",
"Next, we calculate the uv coverage with both codes.\\\n",
"To do this, both codes assume that the lightcone is the field of view of the instrument.\n",
"# Calculating uv coverage with `tuesday`\n",
"## Calculating uv coverage with `tuesday`\n",
"With `tuesday`, the user can use the `Observatory` object along with the integration time and daily observation duration to calculate the location of a reference point through zenith as the sky rotates overhead during the day. This will provide us with `daily observation duration in s / integration time in s` time offsets."
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "69017e14",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -137,6 +143,7 @@
},
{
"cell_type": "markdown",
"id": "8ebbf479",
"metadata": {},
"source": [
"Once we have the time offsets, the last missing ingredient is to obtain the baseline groups of the instrument and the weights of each (i.e. how many baselines are in a given group):"
Expand All @@ -145,6 +152,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "6aaf0b7d",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -173,6 +181,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "2606ef91",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -181,6 +190,7 @@
},
{
"cell_type": "markdown",
"id": "9d60ede5",
"metadata": {},
"source": [
"Now that we have the baseline groups and the time offsets, we take the baseline groups and move them for each time offset as the sky rotates over the instrument:"
Expand All @@ -189,6 +199,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "2fe3c23e",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -198,6 +209,7 @@
},
{
"cell_type": "markdown",
"id": "b00adb4c",
"metadata": {},
"source": [
"Now we know how the baselines move at each snapshot (i.e. time offset). \\\n",
Expand All @@ -211,6 +223,7 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "d480c134",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -220,6 +233,7 @@
},
{
"cell_type": "markdown",
"id": "7686304e",
"metadata": {},
"source": [
"We can grid the baselines now. Note that in this step we decimate the baseline and their weight arrays by two. This is because these array originally contain both the positive baselines $\\textit{and}$ their mirrored copy i.e. (u,v) and (-u,-v) which do not contribute to reducing our SNR (since they're the same). The `grid_baselines_uv` assumes we provide only one copy of the baselines and is a little bit faster that way. We loop over the frequencies and rescale the baselines accordingly."
Expand All @@ -228,6 +242,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "df78d8fb",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -243,14 +258,16 @@
},
{
"cell_type": "markdown",
"id": "3c881115",
"metadata": {},
"source": [
"# Calculate uv coverage with `tools21cm`"
"## Calculate uv coverage with `tools21cm`"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "59d6f419",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -316,14 +333,16 @@
},
{
"cell_type": "markdown",
"id": "ecc6565a",
"metadata": {},
"source": [
"# Compare uv coverage"
"## Compare uv coverage"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "e97c605b",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -354,6 +373,7 @@
{
"cell_type": "code",
"execution_count": 14,
"id": "b916912b",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -385,7 +405,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Calculate the thermal RMS noise with `tuesday`\n",
"## Calculate the thermal RMS noise with `tuesday`\n",
"\n",
"To calculate the thermal noise with `tuesday`, we need to define an `Observation`. Note that we choose $T_{\\rm sky}$ parameters to match those in `tools21cm`."
]
Expand Down Expand Up @@ -433,7 +453,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Calculate thermal RMS noise with tools21cm"
"## Calculate thermal RMS noise with tools21cm"
]
},
{
Expand Down Expand Up @@ -489,7 +509,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Compare the thermal RMS noise"
"## Compare the thermal RMS noise"
]
},
{
Expand Down Expand Up @@ -556,7 +576,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Sample lightcone noise with `tools21cm`\n",
"## Sample lightcone noise with `tools21cm`\n",
"The final step is to generate lightcone noise samples."
]
},
Expand Down Expand Up @@ -641,7 +661,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Sample lightcone noise with `tuesday`\n",
"## Sample lightcone noise with `tuesday`\n",
"With `tuesday` we can control the random generation by setting a random seed manually for reproducibility. If not set, a seed is chosen at random.\\\n",
"We can also set the number of noise realisations we want with `nsamples`."
]
Expand Down Expand Up @@ -670,7 +690,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Compare noise realisations"
"## Compare noise realisations"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/tuesday/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
except ImportError:
try:
from setuptools_scm import get_version
__version__ = get_version(root='../..', relative_to=__file__)

__version__ = get_version(root="../..", relative_to=__file__)
except Exception:
__version__ = "0.0.0+unknown"

18 changes: 18 additions & 0 deletions src/tuesday/core/plotting/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
"""A sub-package for typical plotting routines such as power spectra."""

__all__ = [
"plot_1d_power_spectrum_k",
"plot_1d_power_spectrum_z",
"plot_2d_power_spectrum",
"plot_coeval_slice",
"plot_pdf",
"plot_power_spectrum",
"plot_redshift_slice",
]

from .powerspectra import (
plot_1d_power_spectrum_k,
plot_1d_power_spectrum_z,
plot_2d_power_spectrum,
plot_power_spectrum,
)
from .sliceplots import plot_coeval_slice, plot_pdf, plot_redshift_slice
Loading