Skip to content

Specreduce Glossary#304

Open
hpparvi wants to merge 8 commits intoastropy:mainfrom
hpparvi:glossary
Open

Specreduce Glossary#304
hpparvi wants to merge 8 commits intoastropy:mainfrom
hpparvi:glossary

Conversation

@hpparvi
Copy link
Copy Markdown
Contributor

@hpparvi hpparvi commented Mar 27, 2026

This PR addresses #285 by replacing the old terms.rst document with a full glossary. Please go through it and let me know if you disagree with any of the definitions or if you think anything is missing. You can find a rendered version of the glossary at https://specreduce--304.org.readthedocs.build/en/304/glossary.html.

LLM disclaimer: This PR includes rather (very) heavy use of LLMs, and I'd like to hear comments from people who might not be comfortable with this (comments from people who are comfortable with this are, of course, also welcome ;) ). My workflow was:

  1. I started with the original terminology document terms.rst
  2. I added terms I thought should be included, with basic definitions.
  3. I tasked Claude Code (Opus 4.6) to rewrite the document into a proper, sorted, Sphinx glossary, and to include terms that are used in the specreduce package and documentation that were not included in the original terminology document.
  4. I went through the glossary created by Claude code and revised it based on my own opinions and knowledge.
  5. I fed the glossary to ChatGPT (5.4) and asked its opinion about the definitions, and whether there were any important terms missing.
  6. I revised the document based on the ChatGPT output (and my own judgement).
  7. I fed the revised glossary to Gemini (3.1 Pro) and asked it to review the definitions in a similar fashion to ChatGPT.
  8. I revised the document based on Gemini output (and my own judgement).
  9. I went through the definitions manually (with some minor tweaks, adding some hyperlinks, etc.).
  10. I tasked Claude Code to again check the terms and definitions against the specreduce codebase.

So, the glossary is based on the existing terminology document, my own knowledge, and three (paid) LLMs. The input from the LLMs is substantial, but I have gone through the final set of definitions several times to ensure that there is nothing I would consider wrong (and likely added some typos along the way).

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.45%. Comparing base (b0f657c) to head (6ff5c73).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #304   +/-   ##
=======================================
  Coverage   90.45%   90.45%           
=======================================
  Files          16       16           
  Lines        1855     1855           
=======================================
  Hits         1678     1678           
  Misses        177      177           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hpparvi hpparvi added this to the v1.9 milestone Mar 27, 2026
Copy link
Copy Markdown
Member

@kelle kelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments, but overall looks extremely useful!!!

@hpparvi hpparvi requested a review from weaverba137 March 27, 2026 21:19
Copy link
Copy Markdown
Member

@weaverba137 weaverba137 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great document, and most of my comments are minor. However, I have one major concern: I don't think the Terminology document (terms.rst) should be eliminated unless we are completely satisfied that:

  • All information contained in terms.rst has been migrated to glossary.rst.
  • terms.rst also functioned as a thesaurus to some degree, so we should double-check that all items in glossary.rst include synonyms and antonyms. Some entries already do, but this should be verified systematically.

Finally, if we do eliminate terms.rst can we provide a redirect to glossary.rst? Alternatively, keep the existing terms.rst, mark it as deprecated, and link to glossary.rst.

light from one or more sources. One axis corresponds to wavelength (the
:term:`dispersion axis`) and the other to spatial position along the slit
(the :term:`cross-dispersion axis`). Also called a spectral image. This is
the input to the extraction process that produces a :term:`1D spectrum`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a qualifier here that 2D Spectra are not unique to slit spectroscopy, fiber spectrographs start with 2d images as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also reference MOS (multi-object spectroscopy) here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've revised the 2D Spectrum definition to include the qualifier, added a link to MOS, and also added a definition for "Fiber-fed spectroscopy".

A three-dimensional data structure with two spatial dimensions and one
spectral dimension. Data cubes are the standard output format for
:term:`IFU` observations, where each spatial pixel contains a complete
spectrum. Also called a spectral data cube or hyperspectral cube.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might also want to include the term "spaxel".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

different wavelengths falls on different positions along this axis.

Emission Line
A bright, narrow feature in a spectrum at a specific wavelength,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't use the term "narrow" without some qualification. For example, QSO emission lines can be very broad. In fact, "bright" could also be a bit vague. Maybe "An excess flux feature in a spectrum at a specific wavelength, ...". I'd be open to any alternate wording here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've revised this now.

FWHM
Full Width at Half Maximum. A measure of the width of a peak or line
profile, defined as the width at which the intensity drops to half its
maximum value. FWHM is commonly used to characterize :term:`spectral
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absorption lines also have a FWHM, so "drops to half" isn't quite right here. You could do something simple like "width at which the intensity drops (rises) to half its maximum (minimum) value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at the revised version. I've also added a definition for "Absorption line".

A spectrum that has been resampled so that the :term:`dispersion axis`
is aligned with image rows or columns, with constant wavelength spacing.
Rectification involves :term:`resampling`. A rectified
ND spectrum has one axis that is purely spectral.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "ND" meant to be "2D"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used ND originally to include 3D data cubes, etc. I've changed this now to 2D for simplicity.

@hpparvi
Copy link
Copy Markdown
Contributor Author

hpparvi commented Mar 30, 2026

This is a great document, and most of my comments are minor. However, I have one major concern: I don't think the Terminology document (terms.rst) should be eliminated unless we are completely satisfied that:

* All information contained in `terms.rst` has been migrated to `glossary.rst`.

* `terms.rst` also functioned as a _thesaurus_ to some degree, so we should double-check that all items in `glossary.rst` include synonyms and antonyms. Some entries already do, but this should be verified systematically.

Finally, if we do eliminate terms.rst can we provide a redirect to glossary.rst? Alternatively, keep the existing terms.rst, mark it as deprecated, and link to glossary.rst.

I chose the third option. The original terms.rst document is now back as it was (and where it was), but with a deprecation warning and a link to the glossary document. A compiled version of the terms doc can be found at https://specreduce--304.org.readthedocs.build/en/304/terms.html and the glossary at https://specreduce--304.org.readthedocs.build/en/304/glossary.html.

@hpparvi hpparvi requested a review from weaverba137 March 30, 2026 15:56
Copy link
Copy Markdown
Member

@weaverba137 weaverba137 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had two minor comments on this round. Looking good overall.

:term:`barycentric correction`, which provides higher precision.

IFU
`Integral Field Unit <https://en.wikipedia.org/wiki/Integral_field_spectrograph>`__.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not make any practical difference, but this external hyperlink is terminated with two underscores, while other external hyperlinks have one underscore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this; it was a typo.


Spectrum
The distribution of light intensity as a function of wavelength or
frequency. In specreduce and specutils, ``Spectrum`` specifically
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make this a link to specutils.Spectrum.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@hpparvi hpparvi requested a review from kbwestfall April 5, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider expanding definitions of unfamiliar terms in the Terminology page.

3 participants