get_adjoint_fields#
- PortFom.get_adjoint_fields(fdtd_session, entry)#
Extract and scale adjoint fields for port-based simulation, one per wavelength.
For port-based simulations, the adjoint simulation is set with unit amplitude and 0 phase, so the adjoint fields need to be scaled appropriately. The mode profiles (
em,hm) and spatial coordinates (x,y,z) are wavelength-independent; all other quantities (e,h,Nm,freq, phase corrections) are extracted at each requested wavelength.- Parameters:
- fdtd_session
FdtdSession FDTD session providing access to simulation data and parameters.
- entry
dict Dictionary containing filenames and simulation results for the current entry.
- fdtd_session
- Returns:
listofnp.ndarrayScaled adjoint electric field data, one array per wavelength in
entry['sim_result'].wavelengths.