get_scaling_factor#
- FieldFom.get_scaling_factor(fdtd_session: FdtdSession, parametrization, sim_result) ndarray#
Compute a per-wavelength scaling factor for the adjoint gradient (field-based).
For field-based simulations, the scaling factor includes the normalization amplitude from the dipole source, which depends on frequency.
- Parameters:
- fdtd_session
FdtdSession FDTD session used to query monitor normalization amplitude.
- parametrization
BaseParametrization Current geometry parametrization supplying mesh cell sizes and counts.
- sim_result
FieldResults Simulation result object whose
wavelengthslist determines the frequencies at which the scaling factor is evaluated.
- fdtd_session
- Returns:
np.ndarrayArray of scaling factors with shape
(n_wavelengths,), one per wavelength insim_result.