Skip to content

Commit

Permalink
new GNIRS keyhole imaging tutorial.
Browse files Browse the repository at this point in the history
  • Loading branch information
KathleenLabrie committed May 17, 2019
1 parent ef4c6ab commit 5fdcadd
Show file tree
Hide file tree
Showing 15 changed files with 936 additions and 0 deletions.
20 changes: 20 additions & 0 deletions geminidr/doc/tutorials/GNIRSImg-DRTutorial/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = TutorialSeries-GNIRSImagingDataReductionwithDRAGONS
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

/* , a .rst-content tt, a .rst-content code */

.rst-content code.xref {
background-color: transparent;
border: solid 1px transparent;
color: #2980B9;
padding: 0px 0px;
font-size: 80%;
}

.rst-content code.xref:hover {
/* border: solid 1px #e1e4e5; */
text-decoration: underline;
}

36 changes: 36 additions & 0 deletions geminidr/doc/tutorials/GNIRSImg-DRTutorial/_static/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.red {
color: red;
}

.blue {
color: blue;
}

.green {
color: green;
}

.yellow {
color: yellow;
}

.gray {
color: gray;
}

.lightgray {
color: lightgray;
}

.small {
font-size: 80%;
}

.large {
font-size: 120%;
}

.bolditalic {
font-weight: bold;
font-style: italic;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* override RTD table width restrictions */

@media screen and (min-width: 767px) {

.wy-table-responsive table td, .wy-table-responsive table th {
/* !important prevents the common CSS stylesheets from
overriding this as on RTD the are loaded after this stylesheet */
white-space: normal !important;
}

.wy-table-responsive {
/* margin-bottom: 24px; */
/* max-width: 100%; */
overflow: visible !important;
}

.wy-nav-content {
max-width: 1200px !important;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
div.admonition-todo {
border-top: 2px solid red;
border-bottom: 2px solid red;
border-left: 2px solid red;
border-right: 2px solid red;
background-color: #ff6347
}
209 changes: 209 additions & 0 deletions geminidr/doc/tutorials/GNIRSImg-DRTutorial/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Tutorial Series - GNIRS Imaging Data Reduction with DRAGONS documentation build configuration file, created by
# sphinx-quickstart on Tue May 14 11:01:35 2019.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.imgmath']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'Tutorial Series - GNIRS Imaging Data Reduction with DRAGONS'
copyright = '2019, Kathleen Labrie'
author = 'Kathleen Labrie'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
# html_sidebars = {
# '**': [
# 'about.html',
# 'navigation.html',
# 'relations.html', # needs 'show_related': True theme option to display
# 'searchbox.html',
# 'donate.html',
# ]
# }


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'TutorialSeries-GNIRSImgDRDRAGONS'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'TutorialSeries-GNIRSImgDRDRAGONS.tex', 'Tutorial Series - GNIRS Imaging Data Reduction with DRAGONS Documentation',
'Kathleen Labrie', 'manual'),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'tutorialseries-gnirsimgdrdragons', 'Tutorial Series - GNIRS Imaging Data Reduction with DRAGONS Documentation',
[author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'TutorialSeries-GNIRSImgDRDRAGONS', 'Tutorial Series - GNIRS Imaging Data Reduction with DRAGONS Documentation',
author, 'TutorialSeries-GNIRSImagingDataReductionwithDRAGONS', 'One line description of project.',
'Miscellaneous'),
]



# -- Options for Epub output ----------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']



# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}

# ------

# Adding style in order to have the todos show up in a red box
def setup(app):
app.add_stylesheet('todo-styles.css')
app.add_stylesheet('rtf_theme_overrides.css')
app.add_stylesheet('css/rtd_theme_overrides_references.css')
app.add_stylesheet('fonts.css')


72 changes: 72 additions & 0 deletions geminidr/doc/tutorials/GNIRSImg-DRTutorial/datasets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.. datasets.rst
.. _datasets:

********************************
Setting up and tutorial datasets
********************************

.. _datasetup:

Downloading the tutorial datasets
=================================

All the data needed to run this tutorial are found in the tutorial's data
package (KL??? name of the package, with URL). Download it and unpack it
somewhere convenient.

.. highlight:: bash

::

cd <somewhere convenient>
tar xvzf KL???

The datasets are found in the subdirectory ``gnirsimg_tutorial/playdata``, and we
will work in the subdirectory named ``gnirsimg_tutorial/playground``.

.. note:: All the raw data can also be downloaded from the Gemini Observatory
Archive. Using the tutorial data package is probably more convenient.


Datasets descriptions
=====================

.. _datakeyhole:

Dataset for example 1: Point source through the acquisition keyhole
-------------------------------------------------------------------

This is a GNIRS acquisition keyhole imaging observation of a point source.
The observation sequence uses dither on target. Dithered observations
nearby in time will be use for sky subtraction of each frame.

The calibrations we use for this example include:

* Darks for the science frames
* Flats, as a sequence of lamps-on and lamps-off exposures

Here is the files breakdown. They are included in a tutorial data package.
They can also be downloaded from the Gemini Observatory Archive (GOA).

+---------------+--------------------------------------------+
| Science || N20120117S0014-33 (J-band, on-target) |
+---------------+--------------------------------------------+
| Science darks || N20120102S0538-547 (60 sec, like Science) |
+---------------+--------------------------------------------+
| Flats || N20120117S0034-41 (lamps-on) |
| || N20120117S0042-49 (lamps-off) |
+---------------+--------------------------------------------+

A note about finding the darks in the GOA. Since GNIRS is not an imager and
imaging through the keyhole is done only in extreme circumstances, the archive
does not have calibration association rules for the darks in this case. One
needs to manually search for the darks. Here is the search that was done to
find the darks for this observation sequence:

* Set a date range around the dates of the science observations. In this case
we used "20120101-20120131".
* Set **Instrument** to GNIRS.
* Set **Obs.Type** to DARK.
* Set the exposure time to 60 seconds.
* On the result table, select the darks with a "Pass" setting in the "QA" column.

0 comments on commit 5fdcadd

Please sign in to comment.