fdtdx.unfold_detector_states#
- fdtdx.unfold_detector_states(arrays, objects, config)[source]#
Reconstruct full-domain detector states from a symmetry-reduced simulation.
This is a pure post-processing step: it transforms each detector’s stored reduced-domain output into the full-domain result using the parity table, with no work added to the FDTD time loop. Each detector that sits on one or more symmetry planes is unfolded per its type — spatial outputs are mirrored with the correct per-component parity;
reduce_volumesums/means are rescaled per component (even components double/keep, odd components vanish);as_slicesenergy planes are mirrored along their in-plane symmetric axes. Detectors that do not touch any symmetry plane are returned unchanged.All detector types are supported except
DiffractiveDetector, whose diffraction-order basis depends on the domain size and so cannot be recovered from the stored efficiencies; for that, unfold the fields withunfold_fields()and recompute.- Parameters:
arrays (ArrayContainer) – Arrays returned by the reduced simulation.
objects (ObjectContainer) – The placed (reduced) objects.
config (SimulationConfig) – Simulation config (must have nonzero
symmetry).
- Returns:
A copy of
arrayswithdetector_statesreconstructed to full domain.- Return type:
- Raises:
ValueError – If
config.symmetryis(0, 0, 0)(nothing to unfold).NotImplementedError – For a
DiffractiveDetector(see above).