diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css
index 15a41eca..961ef3bc 100644
--- a/docs/source/_static/css/custom.css
+++ b/docs/source/_static/css/custom.css
@@ -1,11 +1,95 @@
/* Remove width restriction on content so that diagrams
- are more visible */
- .wy-nav-content {
- max-width: none;
- }
-
- /* Override the logo/searchbar background color;
- it conflicts with the logo color */
- .wy-side-nav-search {
- background-color: #C6B9D2;
- }
+are more visible */
+.wy-nav-content {
+ max-width: none;
+}
+
+/* Override the logo/searchbar background color;
+ it conflicts with the logo color */
+.wy-side-nav-search {
+ background-color: #C6B9D2;
+}
+
+.black {
+ color: black;
+}
+
+.gray {
+ color: gray;
+}
+
+.grey {
+ color: gray;
+}
+
+.silver {
+ color: silver;
+}
+
+.white {
+ color: white;
+}
+
+.maroon {
+ color: maroon;
+}
+
+.red {
+ color: red;
+}
+
+.magenta {
+ color: magenta;
+}
+
+.fuchsia {
+ color: fuchsia;
+}
+
+.pink {
+ color: pink;
+}
+
+.orange {
+ color: orange;
+}
+
+.yellow {
+ color: yellow;
+}
+
+.lime {
+ color: lime;
+}
+
+.green {
+ color: green;
+}
+
+.olive {
+ color: olive;
+}
+
+.teal {
+ color: teal;
+}
+
+.cyan {
+ color: cyan;
+}
+
+.aqua {
+ color: aqua;
+}
+
+.blue {
+ color: blue;
+}
+
+.navy {
+ color: navy;
+}
+
+.purple {
+ color: purple;
+}
diff --git a/docs/source/background/gbo_context.rst b/docs/source/background/gbo_context.rst
deleted file mode 100644
index c394d61a..00000000
--- a/docs/source/background/gbo_context.rst
+++ /dev/null
@@ -1,22 +0,0 @@
-**************************
-Context Within GBO Systems
-**************************
-
-Background
-==========
-
-GBTIDL
-------
-
-`GBTIDL` is the current software used to calibrate SDFITS files from the GBT.
-
-Requirements
-============
-
-At its core, `dysh` needs to read in an SDFITS file and ultimately output calibrated data.
-
-.. mermaid::
-
- flowchart LR
- A[SDFITS File] --> B[Dysh]
- B --> C[Output Data]
diff --git a/docs/source/background/img/.gitkeep b/docs/source/background/img/.gitkeep
deleted file mode 100644
index e69de29b..00000000
diff --git a/docs/source/background/index.rst b/docs/source/background/index.rst
deleted file mode 100644
index c546dc11..00000000
--- a/docs/source/background/index.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-**********
-Background
-**********
-
-Why does this exist?
-
-.. toctree::
- :maxdepth: 2
-
- gbo_context
- sdfits_files/index
diff --git a/docs/source/conf.py b/docs/source/conf.py
index f53bf87e..83a9e822 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -58,6 +58,7 @@
"sphinxcontrib.mermaid",
"numpydoc",
"sphinx_inline_tabs",
+ "sphinx_design",
]
numpydoc_show_class_members = True
@@ -75,6 +76,11 @@
# TODO: These appear to have no effect
mermaid_verbose = True
+# Mermaid configuration
+# https://github.com/mgaitan/sphinxcontrib-mermaid
+mermaid_version = "11.2.0"
+mermaid_params = ["--theme", "dark"]
+
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
@@ -101,7 +107,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
-exclude_patterns = []
+exclude_patterns = ["examples/output"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
@@ -120,11 +126,25 @@
# documentation.
#
html_theme_options = {
+ "repository_url": "https://github.com/GreenBankObservatory/dysh",
+ "repository_branch": "main",
"logo": {
"image_light": "_static/icon/dysh_logo_lightmode.png",
"image_dark": "_static/icon/dysh_logo_darkmode.png",
},
+ # "show_toc_level": 2,
+ "use_source_button": True,
+ "use_issues_button": True,
+ "use_download_button": True,
+ "use_sidenotes": True,
"show_toc_level": 2,
+ "icon_links": [
+ {
+ "name": "GitHub",
+ "url": "https://github.com/GreenBankObservatory/dysh",
+ "icon": "fa-brands fa-github",
+ },
+ ],
}
# Add any paths that contain custom static files (such as style sheets) here,
diff --git a/docs/source/examples b/docs/source/examples
deleted file mode 120000
index dc9f6698..00000000
--- a/docs/source/examples
+++ /dev/null
@@ -1 +0,0 @@
-../../notebooks/examples/
\ No newline at end of file
diff --git a/docs/source/explanations/index.rst b/docs/source/explanations/index.rst
new file mode 100644
index 00000000..3c9841c2
--- /dev/null
+++ b/docs/source/explanations/index.rst
@@ -0,0 +1,58 @@
+.. _explanations:
+
+###############################################
+:octicon:`repo;2em;purple` Explanation Material
+###############################################
+
+Big-picture explanations of higher-level concepts. Most useful for building understanding of a particular topic.
+
+dysh
+====
+
+.. grid:: 1 2 2 2
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :octicon:`container;3em;green` **ScanBlock**
+
+ What is a ScanBlock?
+
+ .. button-link:: scanblock/index.html
+ :color: primary
+ :tooltip: Details of what is a ScanBlock
+ :outline:
+ :click-parent:
+
+ ScanBlock
+
+
+SDFITS
+======
+
+.. grid:: 1 2 2 2
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :octicon:`file;3em;green` **SDFITS**
+
+ What are SDFITS files?
+
+ .. button-link:: sdfits/index.html
+ :color: primary
+ :tooltip: SDFITS details
+ :outline:
+ :click-parent:
+
+ SDFITS
+
+
+.. toctree::
+ :hidden:
+ :maxdepth: 3
+
+ scanblock/index
+ sdfits/index
diff --git a/docs/source/explanations/scanblock/index.rst b/docs/source/explanations/scanblock/index.rst
new file mode 100644
index 00000000..1d4988e4
--- /dev/null
+++ b/docs/source/explanations/scanblock/index.rst
@@ -0,0 +1,42 @@
+.. _scanblocks:
+
+#########
+ScanBlock
+#########
+
+.. mermaid::
+
+ flowchart TD
+
+ subgraph newLines[GBTFITSLoad
+ 50 Scans
+ Position Switching
+ Dual Linear Polarization
+ 1 Beam
+ 4 Frequency Windows
+ 100 integrations each
+ ]
+
+
+
+
+ end
+
+
+ newLines -- getps( scan=45, plnum=1, ifnum=0 ) --> ScanBlock1
+ newLines -- gettp( scan=[17,18,19], intnum=np.r_[50:100], ifnum=2 ) --> ScanBlock2
+
+
+
+ subgraph ScanBlock1[ScanBlock]
+ psscan["spectra.scan.PSScan
scans = 44,45
plnum = 1
ifnum = 0
intnum = (0,100)"]
+ end
+ subgraph ScanBlock2[ScanBlock]
+ tpscan1["spectra.scan.TPScan
scan=17
plnum = 0
ifnum = 2
intnum=(50,100)"]
+ tpscan2["spectra.scan.TPScan
scan=18
plnum = 0
ifnum = 2
intnum=(50,100)"]
+ tpscan3["spectra.scan.TPScan
scan=19
plnum = 0
ifnum = 2
intnum=(50,100)"]
+
+ end
+
+ ScanBlock1[Scan Block] -- timeaverage() --->spectrum1[Spectrum]
+ ScanBlock2[Scan Block] -- timeaverage() --->spectrum2[Spectrum]
diff --git a/docs/source/explanations/sdfits/index.rst b/docs/source/explanations/sdfits/index.rst
new file mode 100644
index 00000000..a57d6d7b
--- /dev/null
+++ b/docs/source/explanations/sdfits/index.rst
@@ -0,0 +1,7 @@
+.. _sdfits-explanation:
+
+############
+SDFITS Files
+############
+
+This section is empty for now, but you can check the column definitions :ref:`here `, or the SDFITS convention as defined in `AIPS++ `_ or at `ADASS IX `_, or `the registered SDFITS convention `_.
diff --git a/docs/source/for_developers/git_workflows.rst b/docs/source/for_developers/git_workflows.rst
index cdd261f5..a98b8ab7 100644
--- a/docs/source/for_developers/git_workflows.rst
+++ b/docs/source/for_developers/git_workflows.rst
@@ -55,6 +55,7 @@ In the directory you want to work in, set up the repo:
To check out a branch called {{branch-name}}, just do
.. code-block:: bash
+
$ git checkout {{branch-name}}
Current development is done in the `main` branch. To set up your own development branch called `{{your-name}}-devel`, do the following:
diff --git a/docs/source/getting_started/index.rst b/docs/source/getting_started/index.rst
index da8e5312..d54ff516 100644
--- a/docs/source/getting_started/index.rst
+++ b/docs/source/getting_started/index.rst
@@ -2,10 +2,40 @@
Getting Started
***************
-Here's how you get started
+Installing ``dysh``
+===================
-.. toctree::
- :maxdepth: 2
+``dysh`` requires Python 3.9+ and recent versions of
+`astropy `_,
+`numpy `_,
+`scipy `_,
+`pandas `_,
+`specutils `_, and
+`matplotlib `_.
- install
- tutorials/index
+We strongly recommend the use of a virtual environment for installing `dysh`.
+
+With `pip` from PyPi
+--------------------
+
+``dysh`` is most easily installed with ``pip``, which will take care of
+any dependencies. The packaged code is hosted at the `Python Packaging
+Index `_.
+
+.. code::
+
+ $ pip install dysh
+
+.. warning::
+ `dysh` is currently in development and the above command will install the latest stable version of `dysh` which might not reflect the contents of the documentation.
+ For beta testing please see :ref:`beta-install`.
+
+From GitHub
+-----------
+
+Installing from GitHub will allow you to install the latest, albeit unstable, version of `dysh`.
+To install the main branch of `dysh` with all extra dependencies from GitHub:
+
+.. code::
+
+ $ pip install "dysh[all] @ git+https://github.com/GreenBankObservatory/dysh"
diff --git a/docs/source/getting_started/install.rst b/docs/source/getting_started/install.rst
deleted file mode 100644
index 077407f1..00000000
--- a/docs/source/getting_started/install.rst
+++ /dev/null
@@ -1,38 +0,0 @@
-*******************
-Installing ``dysh``
-*******************
-
-``dysh`` requires Python 3.9+ and recent versions of
-`astropy `_,
-`numpy `_,
-`scipy `_,
-`pandas `_,
-`specutils `_, and
-`matplotlib `_.
-
-With `pip` from PyPi
-====================
-
-``dysh`` is most easily installed with ``pip``, which will take care of
-any dependencies. The packaged code is hosted at the `Python Packaging
-Index `_.
-
-.. code::
-
- $ pip install dysh
-
-.. warning::
- `dysh` is currently in development and the above command will install the latest stable version of `dysh` which might not reflect the contents of the documentation. For beta testing please see :ref:`beta-install`.
-
-From github
-===========
-
-To install from github without creating a separate virtual environment:
-
-.. code::
-
- $ git clone git@github.com:GreenBankObservatory/dysh.git
- $ cd dysh
- $ pip install -e .
-
-If you wish to install using a virtual environment, which we strongly recommend if you plan to contribute to the code, see :doc:`installation instructions for developers <../for_developers/install>`.
diff --git a/docs/source/how-tos/examples b/docs/source/how-tos/examples
new file mode 120000
index 00000000..d4789f2c
--- /dev/null
+++ b/docs/source/how-tos/examples
@@ -0,0 +1 @@
+../../../notebooks/examples/
\ No newline at end of file
diff --git a/docs/source/how-tos/index.rst b/docs/source/how-tos/index.rst
new file mode 100644
index 00000000..84737709
--- /dev/null
+++ b/docs/source/how-tos/index.rst
@@ -0,0 +1,97 @@
+.. _howtos:
+
+#####################################
+:octicon:`terminal;2em;green` Recipes
+#####################################
+
+Practical step-by-step guides to help you achieve a specific goal. Most useful when you're trying to get something done.
+
+
+.. grid:: 1 2 2 2
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :octicon:`rocket;3em;green` **Velocity Definitions and Rest Frames**
+
+ How to change velocity definitions and reference frames
+
+ .. button-link:: examples/velocity_frames.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Velocity & Frames
+
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :octicon:`file;3em;green` **Metadata Management**
+
+ How to interact with the metadata of an SDFITS file
+
+ .. button-link:: examples/metadata_management.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Metadata Management
+
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :octicon:`pulse;3em;green` **Smoothing**
+
+ How to smooth data
+
+ .. button-link:: examples/smoothing.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Smoothing
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :material-outlined:`save;3em;green` **Data IO**
+
+ How to read and save data
+
+ .. button-link:: examples/dataIO.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Data IO
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :material-outlined:`compare_arrows;3em;green` **Align Spectra**
+
+ How to read and save data
+
+ .. button-link:: examples/align_spectra.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Align Spectra
+
+.. toctree::
+ :maxdepth: 4
+ :hidden:
+
+ examples/velocity_frames
+ examples/metadata_management
+ examples/smoothing
+ examples/dataIO
+ examples/align_spectra
diff --git a/docs/source/index.rst b/docs/source/index.rst
index f3841dac..7dba9adf 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -6,28 +6,100 @@
`Green Bank Observatory `_
and the Laboratory for Millimeter-Wave Astronomy (LMA)
at the `University of Maryland (UMD) `_.
-It is intended to replace `GBTIDL `_, GBO's current spectral line data reduction package.
+It is intended to replace `GBTIDL `_, GBO's current spectral line data reduction package.
Contents
===============
+.. grid:: 1 2 2 2
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :octicon:`mortar-board;3em;orange` **Tutorials**
+
+ Learning-oriented lessons take you through a series
+ of steps to complete a project.
+
+ Most useful when you want to get started reducing your data.
+
+ .. button-link:: tutorials/index.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Go to Tutorials
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :octicon:`terminal;3em;green` **Recipes**
+
+ Practical step-by-step guides to help you achieve a specific goal.
+
+ Most useful when you're trying to get something done.
+
+
+ .. button-link:: how-tos/index.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Go to Recipes
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :octicon:`repo;3em;purple` **Explanation**
+
+ Big-picture explanations of higher-level concepts.
+
+ Most useful for building understanding of a particular topic.
+
+
+ .. button-link:: explanations/index.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Go to Explanation Material
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ :octicon:`tools;3em;sd-text-primary` **References**
+
+ Nitty-gritty technical descriptions of how `dysh` works.
+
+ Most useful when you need detailed information about the API or how to
+ contribute.
+
+
+ .. button-link:: reference/index.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Go to Reference Material
+
+
.. toctree::
:maxdepth: 2
+ :hidden:
whatsnew/0.3.rst
- background/index
getting_started/index
- examples/index
- modules/index
+ tutorials/index
+ how-tos/index
+ explanations/index
+ reference/index
for_beta_testers/index
for_developers/index
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
Reporting Issues
================
@@ -48,4 +120,4 @@ Dev Team
| Peter Teuben (UMD)
| Pedro Salas (GBO)
| Evan Smith (GBO)
-| Thomas Chamberlain (GBO)
+| Thomas Chamberlin (GBO)
diff --git a/docs/source/modules/index.rst b/docs/source/modules/index.rst
deleted file mode 100644
index f2ea3fc3..00000000
--- a/docs/source/modules/index.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-****************
-Modules and APIs
-****************
-
-.. toctree::
- :maxdepth: 2
-
- dysh.fits
- dysh.spectra
- dysh.plot
- dysh.util
diff --git a/docs/source/reference/index.rst b/docs/source/reference/index.rst
new file mode 100644
index 00000000..a9f80fe7
--- /dev/null
+++ b/docs/source/reference/index.rst
@@ -0,0 +1,48 @@
+.. _references:
+
+
+#####################################################
+:octicon:`tools;2em;sd-text-primary` Reference Guides
+#####################################################
+
+
+.. grid:: 1 2 2 2
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ **Modules**
+
+ dysh modules and functions
+
+ .. button-link:: modules/index.html
+ :color: primary
+ :tooltip: Reference materials for dysh modules
+ :outline:
+ :click-parent:
+
+ Modules
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ **SDFITS files**
+
+ SDFITS files
+
+ .. button-link:: sdfits_files/index.html
+ :color: primary
+ :tooltip: Reference materials for SDFITS files
+ :outline:
+ :click-parent:
+
+ SDFITS files
+
+.. toctree::
+ :maxdepth: 3
+ :hidden:
+
+ modules/index
+ sdfits_files/index
diff --git a/docs/source/reference/modules/dysh.coordinates.rst b/docs/source/reference/modules/dysh.coordinates.rst
new file mode 100644
index 00000000..37389e18
--- /dev/null
+++ b/docs/source/reference/modules/dysh.coordinates.rst
@@ -0,0 +1,14 @@
+Spatial and Velocity Coordinates and Reference Frames
+=====================================================
+
+.. automodule:: dysh.coordinates
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
+Core Functions and Classes
+--------------------------
+.. automodule:: dysh.coordinates.core
+ :members:
+ :undoc-members:
+ :show-inheritance:
diff --git a/docs/source/modules/dysh.fits.rst b/docs/source/reference/modules/dysh.fits.rst
similarity index 100%
rename from docs/source/modules/dysh.fits.rst
rename to docs/source/reference/modules/dysh.fits.rst
diff --git a/docs/source/modules/dysh.plot.rst b/docs/source/reference/modules/dysh.plot.rst
similarity index 100%
rename from docs/source/modules/dysh.plot.rst
rename to docs/source/reference/modules/dysh.plot.rst
diff --git a/docs/source/modules/dysh.spectra.rst b/docs/source/reference/modules/dysh.spectra.rst
similarity index 100%
rename from docs/source/modules/dysh.spectra.rst
rename to docs/source/reference/modules/dysh.spectra.rst
diff --git a/docs/source/modules/dysh.util.rst b/docs/source/reference/modules/dysh.util.rst
similarity index 100%
rename from docs/source/modules/dysh.util.rst
rename to docs/source/reference/modules/dysh.util.rst
diff --git a/docs/source/reference/modules/index.rst b/docs/source/reference/modules/index.rst
new file mode 100644
index 00000000..a2c05f05
--- /dev/null
+++ b/docs/source/reference/modules/index.rst
@@ -0,0 +1,80 @@
+****************
+Modules and APIs
+****************
+
+.. grid:: 1 2 2 2
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ **fits**
+
+ .. button-link:: dysh.fits.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Go to dysh.fits
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ **spectra**
+
+ .. button-link:: dysh.spectra.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Go to dysh.spectra
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ **plot**
+
+ .. button-link:: dysh.plot.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Go to dysh.spectra
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ **coordinates**
+
+ .. button-link:: dysh.coordinates.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Go to dysh.coordinates
+
+ .. grid-item-card::
+ :shadow: md
+ :margin: 2 2 0 0
+
+ **util**
+
+ .. button-link:: dysh.util.html
+ :color: primary
+ :outline:
+ :click-parent:
+
+ Go to dysh.util
+
+.. toctree::
+ :maxdepth: 2
+ :hidden:
+
+ dysh.fits
+ dysh.spectra
+ dysh.plot
+ dysh.coordinates
+ dysh.util
diff --git a/docs/source/background/sdfits_files/gbt_sdfits.rst b/docs/source/reference/sdfits_files/gbt_sdfits.rst
similarity index 96%
rename from docs/source/background/sdfits_files/gbt_sdfits.rst
rename to docs/source/reference/sdfits_files/gbt_sdfits.rst
index 32694006..66bd4e80 100644
--- a/docs/source/background/sdfits_files/gbt_sdfits.rst
+++ b/docs/source/reference/sdfits_files/gbt_sdfits.rst
@@ -1,3 +1,5 @@
+.. _sdfits-reference:
+
****************
GBT SDFITS Files
****************
@@ -9,7 +11,12 @@ The single-dish FITS (SDFITS) convention is used for observer-facing GBT data. T
HDU 0 (PRIMARY)
---------------
-.. list-table:: Header
+.. _primary-sdfits-header:
+
+Header
+^^^^^^
+
+.. list-table::
:widths: 25 25 50
:header-rows: 1
@@ -38,7 +45,12 @@ HDU 0 (PRIMARY)
HDU 1 (SINGLE DISH)
-------------------
-.. list-table:: Header
+.. _singledish-sdfits-header:
+
+Header
+^^^^^^
+
+.. list-table::
:widths: 25 25 50
:header-rows: 1
@@ -91,7 +103,10 @@ HDU 1 (SINGLE DISH)
- "SINGLE DISH"
- The name of this binary table extension
-.. list-table:: Data
+Data
+^^^^
+
+.. list-table::
:widths: 20 20 20 40
:header-rows: 1
@@ -630,4 +645,4 @@ Flag files indicate the data that should be ignored. For example, these flags ca
Other Resources
===============
-The full SDFITS documentation for GBO can be found here: `The GBT SDFITS Project Wiki `_
+The full SDFITS documentation for GBO can be found on `the GBT SDFITS Project Wiki `_. However, this page is out of date and requires a login to view.
diff --git a/docs/source/background/sdfits_files/index.rst b/docs/source/reference/sdfits_files/index.rst
similarity index 100%
rename from docs/source/background/sdfits_files/index.rst
rename to docs/source/reference/sdfits_files/index.rst
diff --git a/docs/source/tutorials/examples b/docs/source/tutorials/examples
new file mode 120000
index 00000000..d4789f2c
--- /dev/null
+++ b/docs/source/tutorials/examples
@@ -0,0 +1 @@
+../../../notebooks/examples/
\ No newline at end of file
diff --git a/docs/source/tutorials/index.rst b/docs/source/tutorials/index.rst
new file mode 100644
index 00000000..e10cc460
--- /dev/null
+++ b/docs/source/tutorials/index.rst
@@ -0,0 +1,37 @@
+.. _tutorials:
+
+
+############################################
+:octicon:`mortar-board;2em;orange` Tutorials
+############################################
+
+Learning-oriented lessons take you through a series of steps to complete a project.
+Most useful when you want to get started reducing your data.
+
+
+.. card-carousel:: 2
+
+ .. card:: Position Switched Data
+ :link: examples/positionswitch.html
+
+ - Calibrate the data.
+
+ .. card:: Frequency Switched Data
+ :link: examples/frequencyswitch.html
+
+ - Calibrate the data.
+
+ .. card:: Sub Beam Nod Data
+ :link: examples/subbeamnod.html
+
+ .. card:: Nodding Data
+ :link: examples/nodding.html
+
+.. toctree::
+ :maxdepth: 4
+ :hidden:
+
+ examples/positionswitch
+ examples/frequencyswitch
+ examples/subbeamnod
+ examples/nodding
diff --git a/notebooks/examples/index.rst b/notebooks/examples/index.rst
deleted file mode 100644
index 9aef2736..00000000
--- a/notebooks/examples/index.rst
+++ /dev/null
@@ -1,15 +0,0 @@
-*********************
-Examples for GBT Data
-*********************
-
-.. toctree::
- :glob:
- :maxdepth: 1
-
- frequencyswitch
- positionswitch
- metadata_management
- subbeamnod
- smoothing
- velocity_frames
- dataIO
diff --git a/pyproject.toml b/pyproject.toml
index 8bda1dc5..4b7def3a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -50,6 +50,7 @@ dev = [
"sphinx-autobuild",
"sphinx-inline-tabs",
"sphinx-book-theme",
+ "sphinx-design",
"sphinxcontrib-mermaid",
"nbformat",
"nbclient",
diff --git a/requirements.txt b/requirements.txt
index ed124203..2b62c49e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -525,6 +525,7 @@ sphinx-autobuild==2021.3.14
# via dysh (pyproject.toml)
sphinx-book-theme==1.1.3
# via dysh (pyproject.toml)
+sphinx-design==0.6.0
sphinx-inline-tabs==2023.4.21
# via dysh (pyproject.toml)
sphinxcontrib-applehelp==1.0.7
diff --git a/src/dysh/coordinates/core.py b/src/dysh/coordinates/core.py
index aaeb927c..16a288f3 100644
--- a/src/dysh/coordinates/core.py
+++ b/src/dysh/coordinates/core.py
@@ -342,28 +342,29 @@ def sanitize_skycoord(target):
# @todo version that takes a SpectralCoord
def topocentric_velocity_to_frame(target, toframe, observer, obstime):
"""Compute the difference in topocentric velocity and the velocity in the input frame.
+
Parameters
----------
- target: `~astropy.coordinates.SkyCoord`
- The sky coordinates of the object including proper motion and distance. Must be in ICRS
- target: `~astropy.coordinates.SkyCoord`
- The sky coordinates of the object including proper motion and distance. Must be in ICRS
+ target: `~astropy.coordinates.SkyCoord`
+ The sky coordinates of the object including proper motion and distance. Must be in ICRS
+ target: `~astropy.coordinates.SkyCoord`
+ The sky coordinates of the object including proper motion and distance. Must be in ICRS
- toframe: str
- The frame into which `coord` should be transformed, e.g., 'icrs', 'lsrk', 'hcrs'.
- The string 'topo' is interpreted as 'itrs'.
- See astropy-supported reference frames (link)
+ toframe: str
+ The frame into which `coord` should be transformed, e.g., 'icrs', 'lsrk', 'hcrs'.
+ The string 'topo' is interpreted as 'itrs'.
+ See astropy-supported reference frames (link)
- observer: `~astropy.coordinates.EarthLocation`
- The location of the observer
+ observer: `~astropy.coordinates.EarthLocation`
+ The location of the observer
- obstime: `~astropy.time.Time`
- The time of the observation
+ obstime: `~astropy.time.Time`
+ The time of the observation
Returns
-------
- radial_velocity : `~astropy.units.Quantity`
- The radial velocity of the source in `toframe`
+ radial_velocity : `~astropy.units.Quantity`
+ The radial velocity of the source in `toframe`
"""
if not isinstance(target.frame, coord.ICRS):
@@ -389,8 +390,7 @@ def get_velocity_in_frame(target, toframe, observer=None, obstime=None):
done:
* If proper motions attributes of `target` are not set, they will be set to zero.
- * Similarly, if distance attribute of `target` is not set, it will
- be set to a very large number.
+ * Similarly, if distance attribute of `target` is not set, it will be set to a very large number.
* This is done on a copy of the coordinate so as not to change the input object.
toframe: str
@@ -438,12 +438,13 @@ def veltofreq(velocity, restfreq, veldef):
restfreq: `~astropy.units.Quantity`
The rest frequency
veldef : str
- Velocity definition from FITS header, e.g., 'OPTI-HELO', 'VELO-LSR'
+ Velocity definition from FITS header, e.g., 'OPTI-HELO', 'VELO-LSR'.
Returns
-------
- frequency: `~astropy.units.Quantity`
- The velocity values converted to frequency using `restfreq` and `veldef'
+ frequency: `~astropy.units.Quantity`
+ The velocity values converted to frequency using `restfreq` and `veldef`.
+
"""
vdef = veldef_to_convention(veldef)
@@ -546,7 +547,7 @@ def __new__(cls):
def gbt_location():
"""
Create an astropy EarthLocation for the GBT using the same established by GBO.
- See: page 3: https://www.gb.nrao.edu/GBT/MC/doc/dataproc/gbtLOFits/gbtLOFits.pdf
+ See page 3 of https://www.gb.nrao.edu/GBT/MC/doc/dataproc/gbtLOFits/gbtLOFits.pdf
latitude = 38d 25m 59.265s N
longitude = 79d 50m 23.419s W
height = 854.83 m
@@ -554,9 +555,9 @@ def gbt_location():
Note these differ from astropy's "GBT" EarthLocation by several meters.
Returns
- ----------
- gbt : `~astropy.coordinates.EarthLocation`
- astropy EarthLocation for the GBT
+ -------
+ gbt : `~astropy.coordinates.EarthLocation`
+ astropy EarthLocation for the GBT
"""
gbt_lat = 38.4331291667 * u.deg
gbt_lon = -79.839838611 * u.deg
@@ -582,9 +583,10 @@ class Observatory:
This can be used for instance in transforming velocities between
different reference frames.
- Example usage
- -------------
+ Examples
+ --------
.. code-block::
+
obs = Observatory()
print(obs['GBT'])
print(obs['ALMA'])
@@ -592,6 +594,7 @@ class Observatory:
Alternatively, you can treat Observatory like a dict:
.. code-block::
+
gbt = Observatory["GBT"]
"""