Skip to content

Commit 78e68b7

Browse files
authored
Merge pull request #140 from tepickering/fix_doc_build
Enable nitpicky mode for sphinx and get docs to build cleanly
2 parents b19747e + 76f75ad commit 78e68b7

File tree

8 files changed

+103
-86
lines changed

8 files changed

+103
-86
lines changed

docs/conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,14 @@
169169

170170
# -- Turn on nitpicky mode for sphinx (to warn about references not found) ----
171171
#
172-
# nitpicky = True
173-
# nitpick_ignore = []
172+
nitpicky = True
173+
intersphinx_mapping.update(
174+
{
175+
'astropy': ('https://docs.astropy.org/en/stable/', None),
176+
'ccdproc': ('https://ccdproc.readthedocs.io/en/stable/', None),
177+
'specutils': ('https://specutils.readthedocs.io/en/stable/', None)
178+
}
179+
)
174180
#
175181
# Some warnings are impossible to suppress, and you can list specific references
176182
# that should be ignored in a nitpick-exceptions file which should be inside

docs/extinction.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ and infrared.
1111
Supported Optical Extinction Models
1212
-----------------------------------
1313

14-
`specreduce` offers support for average optical extinction models for a set of observatories:
14+
``specreduce`` offers support for average optical extinction models for a set of observatories:
1515

1616
.. csv-table::
1717
:header: "Model Name", "Observatory", "Lat", "Lon", "Elevation (m)", "Ref"
@@ -55,8 +55,8 @@ https://www.aanda.org/articles/aa/pdf/2011/03/aa15537-10.pdf.
5555
available at https://www.apo.nmsu.edu/arc35m/Instruments/DIS/ (https://www.apo.nmsu.edu/arc35m/Instruments/DIS/images/apoextinct.dat).
5656

5757
In each case, the extinction is given in magnitudes per airmass and the wavelengths are in Angstroms. Here is an example that
58-
uses the `AtmosphericExtinction` class to load each model and plots the extinction in magnitudes as well as fractional transmission
59-
as a function of wavelength:
58+
uses the `~specreduce.calibration_data.AtmosphericExtinction` class to load each model and plots the extinction in magnitudes as well
59+
as fractional transmission as a function of wavelength:
6060

6161
.. plot::
6262
:include-source:
@@ -76,9 +76,9 @@ as a function of wavelength:
7676
plt.tight_layout()
7777
fig.show()
7878

79-
A convenience class, `AtmosphericTransmission`, is provided for loading data files containing atmospheric transmission versus wavelength.
80-
The common use case for this would be loading the output of telluric models. By default it loads a telluric model for an airmass of 1 and
81-
1 mm of precipitable water. Some resources for generating more realistic model atmospheric transmission spectra include
79+
A convenience class, `~specreduce.calibration_data.AtmosphericTransmission`, is provided for loading data files containing atmospheric transmission
80+
versus wavelength. The common use case for this would be loading the output of telluric models. By default it loads a telluric model for an
81+
airmass of 1 and 1 mm of precipitable water. Some resources for generating more realistic model atmospheric transmission spectra include
8282
https://mwvgroup.github.io/pwv_kpno/1.0.0/documentation/html/index.html and http://www.eso.org/sci/software/pipelines/skytools/molecfit.
8383

8484
.. plot::

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Specreduce documentation
33
########################
44

5-
The `specreduce` package aims to provide a data reduction toolkit for optical
5+
The `specreduce <https://specreduce.readthedocs.io/en/latest/index.html>`_ package aims to provide a data reduction toolkit for optical
66
and infrared spectroscopy, on which applications such as pipeline processes for
77
specific instruments can be built. The scope of its functionality is limited to
88
basic spectroscopic reduction, with basic *image* processing steps (such as
9-
bias subtraction) instead covered by `ccdproc` and other packages, data
10-
analysis by `specutils` and visualization by `specviz` or `cubeviz`. A few
9+
bias subtraction) instead covered by `ccdproc <https://ccdproc.readthedocs.io/en/latest/>`_ and other packages, data
10+
analysis by `specutils <https://specutils.readthedocs.io/en/latest/>`_ and visualization by `matplotlib <https://matplotlib.org/>`_. A few
1111
examples will nevertheless be provided of its usage in conjunction with these
1212
complementary packages.
1313

docs/process/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Spectroscopic data reduction outline
66

77
Here are some examples of complete DR processes, to help guide development
88
(including basic image reduction steps, provided by other packages). These are
9-
not a summary of functionality actually implemented in `specreduce` today.
9+
not a summary of functionality actually implemented in
10+
`specreduce <https://specreduce.readthedocs.io/en/stable/index.html>`_ today.
1011

1112

1213
.. _specreduce-nir-mos:

docs/specphot_standards.rst

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Introduction
77
------------
88

99
Instrument sensitivity as a function of wavelength is calibrated using observations of
10-
spectrophotometric standard stars. `~specreduce` offers some convenience functions for accessing
11-
some databases of commonly used standard stars and loading the data into `~specutils.Spectrum1D`
10+
spectrophotometric standard stars. `specreduce <https://specreduce.readthedocs.io/en/stable/index.html>`_ offers some
11+
convenience functions for accessing some databases of commonly used standard stars and loading the data into `~specutils.Spectrum1D`
1212
instances.
1313

1414
Supported Databases
@@ -18,8 +18,9 @@ Probably the most well-curated database of spectrophotometric calibration data i
1818
`CALSPEC <https://www.stsci.edu/hst/instrumentation/reference-data-for-calibration-and-tools/astronomical-catalogs/calspec>`_
1919
database at `MAST <https://archive.stsci.edu/>`_ (Ref.: `Bohlin, Gordon, & Tremblay 2014 <https://iopscience.iop.org/article/10.1086/677655>`_).
2020
It also has the advantage of including data that extends well into both the UV and the IR. The `~specreduce.calibration_data.load_MAST_calspec`
21-
function provides a way to easily load CALSPEC data either directly from `MAST` (specifically, https://archive.stsci.edu/hlsps/reference-atlases/cdbs/calspec/)
22-
or from a previously downloaded local file. Here is an example of how to use it and of a CALSPEC standard that has both UV and IR coverage:
21+
function provides a way to easily load CALSPEC data either directly from `MAST <https://archive.stsci.edu/>`_
22+
(specifically, https://archive.stsci.edu/hlsps/reference-atlases/cdbs/calspec/) or from a previously downloaded local file.
23+
Here is an example of how to use it and of a CALSPEC standard that has both UV and IR coverage:
2324

2425
.. plot::
2526
:include-source:
@@ -38,91 +39,102 @@ or from a previously downloaded local file. Here is an example of how to use it
3839
fig.show()
3940

4041
The `specreduce_data <https://github.com/astropy/specreduce-data/>`_ package provides several datasets of spectrophotometric standard spectra.
41-
The bulk of them are inherited from IRAF's `onedstds` datasets, but some more recently curated datasets from `ESO
42-
<https://www.eso.org/sci/observing/tools/standards/spectra/stanlis.html>`_, the
42+
The bulk of them are inherited from IRAF's `onedstds <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds>`_ datasets, but
43+
some more recently curated datasets from `ESO <https://www.eso.org/sci/observing/tools/standards/spectra/stanlis.html>`_, the
4344
`Nearby Supernova Factory <https://snfactory.lbl.gov/>`_, and `Gemini
4445
<https://github.com/GeminiDRSoftware/DRAGONS/tree/master/geminidr/gemini/lookups/spectrophotometric_standards>`_ are included as well. The
4546
`~specreduce.calibration_data.load_onedstds` function is provided to load these data into `~specutils.Spectrum1D`
46-
instances. If `specreduce_data` is not installed, the data will be downloaded from the GitHub
47+
instances. If `specreduce_data <https://github.com/astropy/specreduce-data/>`_ is not installed, the data will be downloaded from the GitHub
4748
`repository <https://github.com/astropy/specreduce-data/tree/main/specreduce_data/reference_data/onedstds>`_. The available
4849
database names and their descriptions are listed here. Please refer to the `specreduce-data repository
4950
<https://github.com/astropy/specreduce-data/tree/main/specreduce_data/reference_data/onedstds>`_ for details on the
5051
specific data files that are available:
5152

52-
- `bstdscal`: Directory of the brighter KPNO IRS standards (i.e. those with HR numbers) at 29 bandpasses,
53-
data from various sources transformed to the Hayes and Latham system, unpublished.
53+
- `bstdscal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/bstdscal>`_: Directory of the brighter KPNO IRS
54+
standards (i.e., those with HR numbers) at 29 bandpasses, data from various sources transformed to the Hayes and Latham system, unpublished.
5455

55-
- `ctiocal`: Directory containing fluxes for the southern tertiary standards as published by
56+
- `ctiocal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/ctiocal>`_:
57+
Directory containing fluxes for the southern tertiary standards as published by
5658
`Baldwin & Stone, 1984, MNRAS, 206, 241 <https://ui.adsabs.harvard.edu/abs/1984MNRAS.206..241B/abstract>`_
5759
and `Stone and Baldwin, 1983, MNRAS, 204, 347 <https://ui.adsabs.harvard.edu/abs/1983MNRAS.204..347S/abstract>`_.
5860

59-
- `ctionewcal`: Directory containing fluxes at 50A steps in the blue range 3300-7550A for the
61+
- `ctionewcal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/ctionewcal>`_:
62+
Directory containing fluxes at 50 Å steps in the blue range 3300-7550 Å for the
6063
tertiary standards of Baldwin and Stone derived from the revised calibration of
6164
`Hamuy et al., 1992, PASP, 104, 533
6265
<https://ui.adsabs.harvard.edu/abs/1992PASP..104..533H/abstract>`_. This
63-
directory also contains the fluxes of the tertiaries in the red (6050-10000A) at
64-
50A steps as will be published in PASP (Hamuy et al 1994). The combined fluxes
66+
directory also contains the fluxes of the tertiaries in the red (6050-10000 Å) at
67+
50 Å steps as will be published in PASP (Hamuy et al 1994). The combined fluxes
6568
are obtained by gray shifting the blue fluxes to match the red fluxes in the
66-
overlap region of 6500A-7500A and averaging the red and blue fluxes in the
69+
overlap region of 6500-7500 Å and averaging the red and blue fluxes in the
6770
overlap. The separate red and blue fluxes may be selected by following the star
6871
name with "red" or "blue"; i.e. CD 32 blue.
6972

70-
- `iidscal`: Directory of the KPNO IIDS standards at 29 bandpasses,
73+
- `iidscal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/iidscal>`_:
74+
Directory of the KPNO IIDS standards at 29 bandpasses,
7175
data from various sources transformed to the Hayes and Latham
7276
system, unpublished.
7377

74-
- `irscal`: Directory of the KPNO IRS standards at 78 bandpasses,
78+
- `irscal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/irscal>`_:
79+
Directory of the KPNO IRS standards at 78 bandpasses,
7580
data from various sources transformed to the Hayes and
7681
Latham system, unpublished (note that in this directory the
77-
brighter standards have no values - the `bstdscal` directory
78-
must be used for these standards).
82+
brighter standards have no values - the `bstdscal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/bstdscal>`_
83+
directory must be used for these standards).
7984

80-
- `oke1990`: Directory of spectrophotometric standards observed for use with the HST, Table
85+
- `oke1990 <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/oke1990>`_:
86+
Directory of spectrophotometric standards observed for use with the HST, Table
8187
VII, `Oke 1990, AJ, 99, 1621
8288
<https://ui.adsabs.harvard.edu/abs/1990AJ.....99.1621O/abstract>`_ (no
83-
correction was applied). An arbitrary 1A bandpass is specified for these
89+
correction was applied). An arbitrary 1 Å bandpass is specified for these
8490
smoothed and interpolated flux "points".
8591

86-
- `redcal`: Directory of standard stars with flux data beyond 8370A.
92+
- `redcal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/redcal>`_:
93+
Directory of standard stars with flux data beyond 8370 Å.
8794
These stars are from the IRS or the IIDS directory but
8895
have data extending as far out into the red as the
8996
literature permits. Data from various sources.
9097

91-
- `spechayescal`: The KPNO spectrophotometric standards at the Hayes flux
98+
- `spechayescal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/spechayescal>`_:
99+
The KPNO spectrophotometric standards at the Hayes flux
92100
points, Table IV, Spectrophotometric Standards, `Massey
93101
et al., 1988, ApJ 328, p. 315 <https://ui.adsabs.harvard.edu/abs/1988ApJ...328..315M/abstract>`_.
94102

95-
- `spec16cal`: Directory containing fluxes at 16A steps in the blue
96-
range 3300-7550A for the secondary standards, published in `Hamuy et al., 1992,
103+
- `spec16cal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/spec16cal>`_:
104+
Directory containing fluxes at 16 Å steps in the blue
105+
range 3300-7550 Å for the secondary standards, published in `Hamuy et al., 1992,
97106
PASP, 104, 533
98107
<https://ui.adsabs.harvard.edu/abs/1992PASP..104..533H/abstract>`_. This
99-
directory also contains the fluxes of the secondaries in the red (6020-10300A)
100-
at 16A steps as will be published in PASP (`Hamuy et al 1994
108+
directory also contains the fluxes of the secondaries in the red (6020-10300 Å)
109+
at 16 Å steps as will be published in PASP (`Hamuy et al 1994
101110
<https://ui.adsabs.harvard.edu/abs/1994PASP..106..566H/abstract>`_). The
102111
combined fluxes are obtained by gray shifting the blue fluxes to match the red
103-
fluxes in the overlap region of 6500A-7500A and averaging the blue and red
112+
fluxes in the overlap region of 6500-7500 Å and averaging the blue and red
104113
fluxes in the overlap. The separate red and blue fluxes may be selected by
105114
following the star name with "red" or "blue"; i.e. HR 1544 blue.
106115

107-
- `spec50cal`: The KPNO spectrophotometric standards at 50 A intervals. The data
116+
- `spec50cal <https://github.com/iraf-community/iraf/tree/main/noao/lib/onedstds/spec50cal>`_:
117+
The KPNO spectrophotometric standards at 50 Å intervals. The data
108118
are from (1) Table V, Spectrophotometric Standards, `Massey et al., 1988, ApJ
109119
328, p. 315 <https://ui.adsabs.harvard.edu/abs/1988ApJ...328..315M/abstract>`_
110120
and (2) Table 3, The Kitt Peak Spectrophotometric Standards: Extension to 1
111121
micron, `Massey and Gronwall, 1990, ApJ 358, p. 344
112122
<https://ui.adsabs.harvard.edu/abs/1990ApJ...358..344M/abstract>`_.
113123

114-
- `snfactory`: Preferred standard stars from the LBL Nearby Supernova Factory project:
124+
- `snfactory <https://snfactory.lbl.gov/>`_:
125+
Preferred standard stars from the LBL Nearby Supernova Factory project:
115126
https://ui.adsabs.harvard.edu/abs/2002SPIE.4836...61A/abstract
116127
Data compiled from https://snfactory.lbl.gov/snf/snf-specstars.html.
117128
See notes there for details and references.
118129

119-
- `eso`: Directories of spectrophotometric standards copied from
130+
- `eso`_:
131+
Directories of spectrophotometric standards copied from
120132
ftp://ftp.eso.org/pub/stecf/standards/. See
121133
https://www.eso.org/sci/observing/tools/standards/spectra/stanlis.html
122134
for links, notes, and details.
123135

124-
- `gemini`: Directory of spectrophotometric standards used by Gemini.
125-
Originally copied from
136+
- `gemini <https://github.com/GeminiDRSoftware/DRAGONS/tree/master/geminidr/gemini/lookups/spectrophotometric_standards>`_:
137+
Directory of spectrophotometric standards used by Gemini. Originally copied from
126138
https://github.com/GeminiDRSoftware/DRAGONS/tree/master/geminidr/gemini/lookups/spectrophotometric_standards.
127139

128140

@@ -133,7 +145,7 @@ Many commonly used standard stars have spectra in multiple datasets, but the qua
133145
The `~specreduce.calibration_data.load_MAST_calspec` and `~specreduce.calibration_data.load_onedstds` functions can be
134146
useful tools for exploring and comparing spectra from the various databases. An example is shown here for `LTT 9491
135147
<http://simbad.u-strasbg.fr/simbad/sim-id?Ident=LTT+9491&NbIdent=1&Radius=2&Radius.unit=arcmin&submit=submit+id>`_ which has
136-
spectra available from `MAST`, `ESO`, and the Nearby Supernova factory:
148+
spectra available from MAST, ESO, and the Nearby Supernova factory:
137149

138150
.. plot::
139151
:include-source:
@@ -156,8 +168,9 @@ spectra available from `MAST`, `ESO`, and the Nearby Supernova factory:
156168
ax.legend()
157169
fig.show()
158170

159-
The `MAST` data have the best UV coverage, but that's not useful from the ground and they only extend to 0.9 microns in the red in this case.
160-
The other data extend to 1.0 microns, but both spectra show systematics due to telluric absorption. The `SNFactory`
161-
data extend well past the atmospheric cutoff with no correction applied for atmospheric transmission. The `ESO` data, on the
162-
other hand, are not corrected for the telluric features in the near-IR while the `SNFactory` data are. Regions affected by
163-
such telluric systematics should be masked out before these spectra are used for calibration purposes.
171+
The `MAST`_ data have the best UV coverage, but that's not useful from the ground and
172+
they only extend to 0.9 microns in the red in this case. The other data extend to 1.0 microns, but both spectra show
173+
systematics due to telluric absorption. The `SNFactory`_ data extend well past the atmospheric
174+
cutoff with no correction applied for atmospheric transmission. The `ESO`_ data, on the other hand,
175+
are not corrected for the telluric features in the near-IR while the `SNFactory`_ data are.
176+
Regions affected by such telluric systematics should be masked out before these spectra are used for calibration purposes.

0 commit comments

Comments
 (0)