Skip to content

Fix Raman invariant preparation - #33

Draft
mesonepigreco wants to merge 1 commit into
mainfrom
fix/raman-invariants
Draft

Fix Raman invariant preparation#33
mesonepigreco wants to merge 1 commit into
mainfrom
fix/raman-invariants

Conversation

@mesonepigreco

Copy link
Copy Markdown
Collaborator

Summary

  • centralize polarized, mixed, and seven-channel unpolarized Raman vector construction
  • prepare each real-space and Q-space Raman perturbation in one backend-specific projection call
  • compute add=True perturbation moduli from the complete accumulated projected vector
  • document the equivalent normalized and raw unpolarized Raman conventions and correct the required channel weights
  • add fast regression coverage for Raman invariants, backend parity, modulus accounting, interpolation inheritance, and IR scaling

Root cause

DynamicalLanczos.prepare_raman(unpolarized=...) accumulated diagonal components for channels 0–3, but an unconditional final preparation call overwrote the result with the last Cartesian component. The real-space and Q-space add=True paths also stored the norm of only the latest projected component rather than the accumulated vector.

User impact

Unpolarized Raman channels 0–3 now contain the complete rotational-invariant combinations. Previously saved channels 0–3 must be recomputed; channels 4–6 remain reusable. Polarized Raman and IR formulas and scaling are unchanged.

Validation

  • focused Raman/IR tests: 11 passed, 1 interpolation-only skip
  • normal real-space/Julia tests: 10 passed, 3 skipped
  • full Q-space tests: 31 passed, 8 skipped
  • Python syntax compilation passed
  • MkDocs build passed

The strict MkDocs build still reports the repository's existing API-docstring warnings; the standard documentation build succeeds.

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