Dimension refactor; work with --unit, --display#21
Merged
JamesMcClung merged 17 commits intomainfrom Apr 17, 2026
Merged
Conversation
Pure mechanical rename ahead of moving dim display/unit info onto Metadata. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Empty dict by default. Not populated or read anywhere yet. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Helper for loaders to seed metadata.dims with a default Dimension per data dim, falling back to a minimal linear Dimension for unknown keys. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Populate metadata.dims from DIM_DEFAULTS (with fallback) for every coord/column on the loaded data. Nothing reads the field yet. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Axis labels now come from the per-instance metadata.dims populated at load time. Falls back to DIM_DEFAULTS for dims created by adaptors (Fourier, transforms) which don't yet populate metadata.dims; the fallback will be removed once Tasks 7-9 migrate those adaptors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Last reads of DIM_DEFAULTS from plotting code routed through metadata.dims via a shared plt_util.get_dim helper (with DIM_DEFAULTS fallback for dims not yet populated by adaptors; removed in later tasks). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fourier takes str|list[str] keys instead of Dimension objects, reads the current Dimension from metadata.dims at apply time, writes the toggled dim back. versus and derived_field_variables adjusted to the new signature. The Fourier display- latex modification is done inside apply_field (where the pre-transform dim latex is still available) rather than via get_modified_display_latex (which runs post-apply). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reads input dims from metadata.dims; builds output polar dims on the fly; writes new dims back into metadata.dims. Drops CartesianToPolar use. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ruction Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Last apply-time read of DIM_DEFAULTS routed through per-instance metadata. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dim existence is checked at apply time against metadata.dims; parse-time validation is now restricted to "is this a valid identifier?". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-register method; -CartesianToPolar; -CartesianToSpherical; -Transform2D/3D. -Fourier pre-seeding in DIM_DEFAULTS. DIM_DEFAULTS populated directly by a module-private helper. Fourier and transform adaptors now construct their output dims on the fly. get_default_dim synthesizes Fourier-space dims from the k_ prefix to preserve behavior for data that stores Fourier-space coords directly (e.g. the hhat2 derived variable). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Override apply directly so dim targets route through metadata.dims instead of the var-only display_latex hook. Unknown targets raise. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mirror display: override apply directly and route dim targets through metadata.dims. Unknown targets raise. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
make sure Fourier is actually working by invoking it directly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dimensions are tracked in metadata, and can thus be manipulated directly by adaptors.