compare_silver¶
- mqed.BEM.compare_silver._load_meep_h5(h5_path: Path) dict[source]¶
Load MEEP planar simulation HDF5.
- Parameters:
h5_path – Path to MEEP output (e.g., MEEP_planar_silver_665nm_2D.h5)
- Returns:
E_field : (Npts, 3, 3) complex128 x_nm : (Npts,) float64
- Return type:
dict with keys
- mqed.BEM.compare_silver._meep_enhancement(meep_plane: dict, meep_vac: dict, component: str) tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray][source]¶
Compute E(silver)/E(vacuum) enhancement from MEEP data.
- Parameters:
meep_plane – MEEP data dict for silver substrate
meep_vac – MEEP data dict for vacuum
component – Which diagonal component to compare (“Ex”, “Ey”, or “Ez”)
- Returns:
observation x-coordinates (from silver run) enh_real: Re(E_silver) / Re(E_vacuum) — analogous to BEM Re enhancement enh_imag: Im(E_silver) / Im(E_vacuum) — analogous to BEM Im enhancement
- Return type:
x_nm
Note
The x-grids from the two runs may differ (e.g., different –x-min). We interpolate the vacuum data onto the silver x-grid for consistency.