Skip to content

Docs: explain the shot-number calibration behind spectral ranges; move the ARTS2D benchmark guide to NOTES.md - #163

Merged
almilder merged 1 commit into
mainfrom
docs-calibration-patch
Oct 15, 2026
Merged

almilder merged 1 commit into
mainfrom
docs-calibration-patch

Conversation

@almilder

Copy link
Copy Markdown
Collaborator

Summary

  • Getting Started → Spectral Ranges: new sub-section explaining that fit_rng values are compared against the calibrated wavelength axis (pixel × dispersion + offset), not raw pixels.
    • A range partly off the axis is silently truncated. A range entirely off the axis stops the run with an error.
    • The calibration is chosen by shot number in tsadar/data/calibration.py. Shots not in that table fall back to other.detector_specs in the defaults deck, which is generic and may not match the user's shot. The new text says how to fix this.
  • ARTS2D recovery benchmark guide moved to NOTES.md: the page was development notes (ISS140 design and preflight results) rather than user documentation.
    • Removed docs/source/arts2d_recovery_benchmark.rst and its table-of-contents entry.
    • Its content is kept, unchanged apart from the RST-to-Markdown conversion, as a dated entry at the end of NOTES.md.
    • The README's benchmark section now points to NOTES.md.
    • The benchmark module and its run command are unchanged.

🤖 Generated with Claude Code

…e the ARTS2D benchmark guide to NOTES.md

Getting Started now explains that fit_rng values are compared against
the calibrated wavelength axis (pixel * dispersion + offset), what
happens when a range is partly or entirely off that axis, and that the
calibration is chosen by shot number. Shots missing from
tsadar/data/calibration.py fall back to other.detector_specs in the
defaults deck, which may not be correct for the user's shot.

The ARTS2D recovery benchmark page was development notes rather than
user documentation. It is removed from the docs site and its content
is kept unchanged (converted to Markdown) as a dated entry in NOTES.md.
The README now points there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@ergodic-reviewer ergodic-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One non-blocking documentation correction: angular data do not honor the documented instrument-response fallback. The benchmark guide relocation preserves its instructions and artifact descriptions; this documentation-only change needs no new postprocessing path. Static review only; tests and the documentation build were not run.


**These fallback values are generic and are probably not the correct calibration for your shot.** Spectral ranges chosen against the wrong axis can select the wrong part of the spectrum or fall off the axis entirely, and fitted parameters such as density and temperature depend directly on the wavelength calibration. If the fallback values are missing from the deck, a ``KeyError`` is raised instead.

If you see this warning, either add a calibration entry for your shot to ``tsadar/data/calibration.py``, or set the correct dispersion, offset, and instrument-response values for your shot in ``other.detector_specs`` (see :doc:`defaults`). Then re-check your ``fit_rng`` values against the new axis.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clarify the angular-data exception to this remedy (non-blocking). The preceding paragraph includes angular data, but setting other.detector_specs.widIRF does not change the instrument response when fitting an angular shot. In tsadar/data/calibration.py, the tstype == "angular" fallback reads only EPWDispersion and EPWoffset; it unconditionally sets spect_FWHM_ele = 0.9 and ang_FWHM_ele = 1. Then prepare_data() in tsadar/data/prepare.py replaces the deck's widIRF with that returned dictionary. A user following this advice can therefore supply measured widths yet still fit with the hard-coded ones. Please scope the deck-based IRF remedy to temporal/imaging data and explain that angular IRF changes currently require updating get_calibrations().

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ARTS is still not really supported for users so this will be left as is and fixed once ARTS code paths settle into a more final form.

@almilder
almilder merged commit 1f021a0 into main Oct 15, 2026
2 checks passed
@almilder
almilder deleted the docs-calibration-patch branch October 15, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant