optics_raytrace
Trace ray bundles through dielectric optical models to compute refraction, Fresnel/TIR energy split, efficiency, leakage, absorption, exit-angle distribution, and hotspots.
Instructions
Ray-trace a bundle through a dielectric optical model with rayoptics
(asynchronous-free; needs no FreeCAD geometry). Requires the rayoptics wheel
(the optics extra); when it does not resolve this returns {ok:false, reason,
install} rather than raising. The geometric refraction comes from rayoptics;
the Fresnel/TIR energy split + the exit histogram come from the exact
analysis/optics core, so the trace is gated against that oracle
(oracle_max_dev_deg = max rayoptics−Snell exit-angle deviation, ~0).
n_refractive is the medium index n2 (default PMMA 1.49062). source_config
is {kind:'collimated'(angle_deg)|'cone'(half_angle_deg)|'lambertian'
(max_angle_deg)} (default collimated at normal incidence). model may carry
{n1 (incident index, default air 1.0), absorption (0..1 bulk loss),
target_half_angle_deg (the acceptance cone counted as efficiency)}.
Returns the degradation dict, or {ok, backend:'rayoptics', rayoptics_version, n_rays, n1, n2, critical_angle_deg, efficiency, leakage_fraction, absorbed_fraction, tir_fraction, energy_balance, oracle_max_dev_deg, exit_distribution:[{angle_deg,intensity}], hotspot_locations}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| n_rays | No | ||
| n_refractive | No | ||
| source_config | No |