![]() |
QPMS
Electromagnetic multiple scattering library and toolkit.
|
Public Member Functions | |
| __init__ (self, path) | |
| open (cls, path) | |
| __repr__ (self) | |
| __enter__ (self) | |
| __exit__ (self, *exc) | |
| close (self) | |
| resonances (self) | |
| cross_sections (self) | |
| mode_svd (self) | |
| bandstructure (self) | |
| tmatrix (self) | |
| driving (self) | |
| modes (self) | |
| system_metadata (self) | |
| provenance (self) | |
| spec (self) | |
| simspec (self) | |
| system (self, omega=None) | |
| dk_decomposition (self, k, omega=None) | |
| eigenmode_fields (self, block, index, points, omega=None, parts=None, periodic_k=None) | |
Data Fields | |
| path | |
| version | |
| name | |
| contents | |
Protected Member Functions | |
| _str_attr (self, name) | |
| _kind_group (self, kind) | |
| _canonical_omega (self) | |
| _embedded_yaml (self) | |
| _block_bloch (self, block) | |
Protected Attributes | |
| _h5 | |
| _spec | |
| _simspec_obj | |
| _dk_cache | |
A .qpms.h5 results container (h5py-backed, lazy). The kind groups are exposed via attributes/mapping (``res.resonances['name']``, ``res.cross_sections[...]``); the system can be rebuilt as a live ScatteringSystem with ``system()``.
|
protected |
The Bloch vector a stored block belongs to, or None. Resolution order: the bandstructure point index (kNNNNNN → the kpoints row), then the parent experiment's Bloch vector from the embedded simspec.
|
protected |
First angular frequency from /embedding or a kind group sweep.
|
protected |
The embedded simspec YAML text (container v1.1), or None.
| qpms.results.ResultContainer.dk_decomposition | ( | self, | |
| k, | |||
omega = None |
|||
| ) |
The affine-path D_k decomposition of the container's system at the Bloch vector k (cached per k). Uses the auto-detected affine operations of the reconstructed spec (the system must have ``system.symmetry: auto``); the block names match the ones qpms-sim writes into the containers. omega only sets the build frequency of the underlying system (the decomposition itself is ω-independent).
| qpms.results.ResultContainer.eigenmode_fields | ( | self, | |
| block, | |||
| index, | |||
| points, | |||
omega = None, |
|||
parts = None, |
|||
periodic_k = None |
|||
| ) |
Scattered electric field of a stored eigenmode at given points. block: a ResonanceBlock (or a bandstructure block group); index: the eigenvector column; points: (n, 3) cartesian array; omega: override the frequency (defaults to the eigenvalue, i.e. the complex eigenfrequency — meaningful for the T-matrix generators supporting complex ω, e.g. analytic spheres; file- sourced T-matrices are real-ω only); periodic_k: the Bloch vector of periodic systems (auto-resolved from the bandstructure point index or the embedded simspec when omitted). Decomposed periodic containers are handled transparently: the stored per-block eigenvectors live in the symmetry-adapted basis (the affine-path D_k blocks on the affine path, the little-group irrep basis on the point-image path) and are unpacked to the full excitation basis before the field evaluation. Passing the raw block vector to ``scattered_E`` would silently produce wrong fields. Returns an (n, 3) complex array.
| qpms.results.ResultContainer.modes | ( | self | ) |
The /modes basis table (l, m, polarization, index, positions).
| qpms.results.ResultContainer.provenance | ( | self | ) |
The /system/source provenance attributes.
| qpms.results.ResultContainer.simspec | ( | self | ) |
The full parsed Simspec (system + experiments), or None. Available when the container embeds the simspec YAML (v1.1) including an experiments section; used to recover the per-experiment Bloch vectors. Returns None when the embedded text is missing or system-only (not parseable as a simspec).
| qpms.results.ResultContainer.spec | ( | self | ) |
The parsed Scatspec of the container's system (cached). Reconstruction routes, in order of preference: the embedded simspec text (container v1.1, ``/system/source/simspec``), or the recorded ``simspec_path`` (works while the file exists and matches the stored ``simspec_sha256``).
| qpms.results.ResultContainer.system | ( | self, | |
omega = None |
|||
| ) |
Rebuild a live ScatteringSystem from the container. omega: build frequency; defaults to the spec's own value when it declares one, then to the first /embedding sweep frequency, then to an error. See :meth:`spec` for the reconstruction routes.
| qpms.results.ResultContainer.system_metadata | ( | self | ) |
The /system arrangement group as plain numpy/dict data.