Skip to content

Add optional arcsecond double-prime tick labels#350

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/arcsec-symbol-over-decimal
Jun 25, 2026
Merged

Add optional arcsecond double-prime tick labels#350
Jammy2211 merged 2 commits into
mainfrom
feature/arcsec-symbol-over-decimal

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds an optional plotting config toggle for arcsecond tick labels that places the arcsecond symbol over the decimal point using the Style Guide double-prime glyph. The default remains off, preserving existing downstream plot labels unless a caller or workspace explicitly opts in.

API Changes

Adds one optional config key, visualize.general.ticks.symbol_over_decimal, defaulting to false.
When enabled, 2D arcsecond tick labels use the double-prime symbol over the decimal point, e.g. 3.″8; when disabled, labels remain unchanged, e.g. 3.8".
See full details below.

Test Plan

  • NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autoarray/plot/test_utils.py test_autoarray/plot/test_output.py
  • NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autoarray/ -x
Full API Changes (for automation & release notes)

Added

  • visualize.general.ticks.symbol_over_decimal — optional plotting config key, default false, for placing arcsecond symbols over decimal points in 2D plot tick labels.

Changed Behaviour

  • _arcsec_labels(...) keeps the existing ASCII trailing-quote output when symbol_over_decimal is false.
  • _arcsec_labels(...) emits double-prime arcsecond labels such as 3.″8, -1.″69, and 3″ when symbol_over_decimal is true.

Migration

  • Existing users: no change required; the default is unchanged.
  • Opt-in users: set conf.instance["visualize"]["general"]["ticks"]["symbol_over_decimal"] = True or provide the equivalent config override.

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits June 25, 2026 14:20
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 25, 2026 13:38
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jun 25, 2026
@Jammy2211 Jammy2211 merged commit 6777494 into main Jun 25, 2026
1 check passed
@Jammy2211 Jammy2211 deleted the feature/arcsec-symbol-over-decimal branch June 25, 2026 13:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an opt-in plotting configuration to render arcsecond tick labels using a double-prime glyph placed over the decimal point, while preserving the existing trailing-quote formatting by default. This fits into autoarray.plot’s config-driven plotting utilities used across the PyAuto ecosystem.

Changes:

  • Add visualize.general.ticks.symbol_over_decimal config flag (default false) in packaged defaults.
  • Extend _arcsec_labels(...) to emit labels like 3.″8 / 3″ when the flag is enabled, otherwise keep 3.8" / 3".
  • Add unit tests covering both the default and opt-in formatting paths.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
autoarray/plot/utils.py Adds a config-backed boolean flag reader and updates _arcsec_labels to support symbol-over-decimal formatting.
autoarray/config/visualize/general.yaml Introduces the new ticks.symbol_over_decimal default configuration key.
test_autoarray/plot/test_utils.py Adds tests validating default suffix labels and the opt-in double-prime formatting.

Comment on lines +6 to +10
def test_arcsec_labels_default_suffix_format():
conf.instance["visualize"]["general"]["ticks"]["symbol_over_decimal"] = False

assert _arcsec_labels([-1.0, 0.0, 1.0]) == ['-1"', '0"', '1"']
assert _arcsec_labels([3.8]) == ['3.8"']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants