Skip to content

Support element and direction combinations in partial SED postprocessing - #102

Merged
Tingliangstu merged 2 commits into
codex/pysed-3.0-architecturefrom
codex/partial-sed-postprocessing
Nov 4, 2026
Merged

Tingliangstu merged 2 commits into
codex/pysed-3.0-architecturefrom
codex/partial-sed-postprocessing

Conversation

@Tingliangstu

@Tingliangstu Tingliangstu commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Saved partial SED components can now be combined for plotting and fitting, for example plot_partial_SED = Sr+Ti x+z or plot_partial_SED = all x. This addresses the element-group and whole-system directional workflows discussed in #63 and #81 through postprocessing of existing output_partial = 1 files.

Changes

  • Add + selections for elements and Cartesian directions; omitted directions mean x+y+z. Preserve the existing Sr and Sr x behavior and figure names.
  • Add save_partial_SED = 1 by default to export only the selected sum beside the figures. Set it to 0 to skip export. Saved sums retain the full frequency grid and linear intensities; original components are unchanged.
  • Read components one at a time, exclude derived sums from all, and report invalid selections, missing components, mismatched shapes, and inconsistent scales.
  • Update the manual and add seven small tests covering sums, exports, compatibility, error handling, actual plot data/rendering, and fitting input.

SED computation, FFTs, normalization, and CPU/GPU kernels are unchanged. Only code, documentation, and tests are included; no trajectory data, calculation results, or generated images are uploaded. This PR is independent of the q-path changes in #101.

Validation

  • Windows: python -m unittest tests.test_partial_sed tests.test_pipeline_io tests.test_cli -q — 46 tests passed.
  • WSL pysed environment: python -m unittest tests.test_partial_sed -q — 7 tests passed.
  • Strict Sphinx HTML build (-W --keep-going) and git diff --check passed.
  • Compatibility with Support explicit disconnected q paths in pySED 3.0 #101: Git merged both branch tips without conflicts; all 14 partial-SED and q-path tests passed on that merged tree in a temporary directory.
  • Tests ran with BLAS/OpenMP thread limits set to 1 and small temporary data.
  • GitHub's push CI passed Linux Python 3.10/3.12/3.13, documentation, and wheel checks. Windows Python 3.12 reports the existing text-progress byte-count failure (264 != 256 in tests/io/test_text.py:161, two batch-size subtests); the same failure is present on the unchanged 3.0 base. The feature-branch job passed the other 122 tests. This PR does not change that Windows test or its trajectory reader.

@Tingliangstu
Tingliangstu merged commit b0927d2 into codex/pysed-3.0-architecture Nov 4, 2026
10 of 16 checks passed
@Tingliangstu
Tingliangstu deleted the codex/partial-sed-postprocessing branch November 6, 2026 06:36
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