fdtdx.unfold_detector_states

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_volume sums/means are rescaled per component (even components double/keep, odd components vanish); as_slices energy 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 with unfold_fields() and recompute.

Parameters:
Returns:

A copy of arrays with detector_states reconstructed to full domain.

Return type:

ArrayContainer

Raises:
  • ValueError – If config.symmetry is (0, 0, 0) (nothing to unfold).

  • NotImplementedError – For a DiffractiveDetector (see above).