BEM_tools¶
Utilities for reading BEM data files. Includes reading p_eff from CSV and dyadic from Excel.
- mqed.utils.BEM_tools.read_bem_dyadic(xlsx_path: str, sheet: str) tuple[numpy.ndarray, numpy.ndarray][source]¶
Read BEM dyadic from Excel. Returns Rx_nm (N,) and G (N,3,3) complex. :param xlsx_path: Path to Excel file. :type xlsx_path: str :param sheet: Sheet name in Excel file. :type sheet: str
- Returns:
(Rx_nm (N,), G (N,3,3) complex) dyadic.
- Return type:
tuple
- mqed.utils.BEM_tools.read_peff(peff_csv: str, lambda_nm: float) complex[source]¶
Return p_eff at lambda_nm (C*m). If exact lambda not found, use nearest. :param peff_csv: Path to CSV file with columns: lambda_nm, p_eff_Cm_real, p_eff_Cm_imag :type peff_csv: str :param lambda_nm: Wavelength in nm to look up. :type lambda_nm: float
- Returns:
Effective dipole moment p_eff.
- Return type:
complex
- mqed.utils.BEM_tools.read_purcell_sheet(xlsx_path: str, sheet='G_self') tuple[float, float, float, float][source]¶
Read Purcell factors from a BEM Excel sheet. :param xlsx_path: Path to Excel file. :type xlsx_path: str :param sheet: Sheet name in Excel file. :type sheet: str
- Returns:
(lambda_nm, F_x, F_y, F_z)
- Return type:
tuple