yasfpy.benchmark.compare_mstm4 ============================== .. py:module:: yasfpy.benchmark.compare_mstm4 .. autoapi-nested-parse:: Comparison utilities for MSTM4 reference results. Contains helpers/data structures to compare YASF output to MSTM4 and summarize error metrics. Classes ------- .. autoapisummary:: yasfpy.benchmark.compare_mstm4.CompareResult Functions --------- .. autoapisummary:: yasfpy.benchmark.compare_mstm4.compare_single_sphere Module Contents --------------- .. py:class:: CompareResult Container for comparison outputs. This data structure groups the key arrays extracted from YASF and MSTM4 runs (efficiencies, phase function, and polarization diagnostics). .. py:attribute:: wavelength :type: numpy.ndarray .. py:attribute:: yasf_q_ext :type: numpy.ndarray .. py:attribute:: yasf_q_sca :type: numpy.ndarray .. py:attribute:: mstm_q_ext_unp :type: numpy.ndarray .. py:attribute:: mstm_q_sca_unp :type: numpy.ndarray .. py:attribute:: phase_theta :type: numpy.ndarray .. py:attribute:: yasf_phase_function :type: numpy.ndarray .. py:attribute:: mstm_phase_function :type: numpy.ndarray .. py:attribute:: yasf_phase_integral :type: numpy.ndarray .. py:attribute:: mstm_phase_integral :type: numpy.ndarray .. py:attribute:: yasf_dolp :type: numpy.ndarray .. py:attribute:: mstm_dolp :type: numpy.ndarray .. py:function:: compare_single_sphere(*, tmp_dir, wavelength, radius, sphere_refractive_index, medium_refractive_index = 1.0 + 0j, lmax = 10, solver_type = 'gmres', solver_tolerance = 1e-08, solver_max_iter = 2000, solver_restart = 2000, mstm_parallel = 4, mstm_binary = 'mstm') Run YASF and MSTM4 for a single sphere and compare efficiencies. This helper is designed for tests/benchmarks and intentionally avoids network refractive-index sources by creating local constant `w,n,k` CSV tables that `refidxdb.Handler` can load. .. rubric:: Notes YASF ``"UNP"`` corresponds to a single combined polarization state (not a TE/TM average). MSTM provides explicit unpolarized-incidence efficiencies. For an apples-to-apples comparison, use MSTM's ``q_*_unp`` outputs.