order (-4, -2)   pinned lib C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py
D:\Metacept\Neurophos\Python_Test_Scripts\Free_Space_Optics\Lumenairy\validation\repro_traced_carrier_121\_d121_common.py:78: UserWarning: D:\Metacept\Neurophos\Python_Test_Scripts\Free_Space_Optics\Reverse_Symmetric_ASM\tx4designstudy121\20260707 dll Tx02-MSOP16.zmx: Zemax surface 9 is a DGRATING.  Its GEOMETRY is imported as the flat/conic surface it is, and its grating data (period 113.7656 um, design order -4, azimuth 0.0 deg) is attached at prescription['diffractives'] -- but NO diffraction is applied by apply_real_lens / apply_real_lens_traced, which propagate the surface as flat.  Run the orders explicitly: put {'doe': rx['diffractives'][k]} in propagate_traced_carrier_chain's groups list (its gap_before 51.5393 mm / gap_after 0.0000 mm are then bookkept for you -- give the group that FOLLOWS the last DOE entry gap_before=0, since gap_after already carries that leg), one order per congruence via propagate_traced_carrier_chain_multi.
  rx = la.load_zemax_zmx(ZMX)
D:\Metacept\Neurophos\Python_Test_Scripts\Free_Space_Optics\Lumenairy\validation\repro_traced_carrier_121\_d121_common.py:78: UserWarning: D:\Metacept\Neurophos\Python_Test_Scripts\Free_Space_Optics\Reverse_Symmetric_ASM\tx4designstudy121\20260707 dll Tx02-MSOP16.zmx: Zemax surface 11 is a DGRATING.  Its GEOMETRY is imported as the flat/conic surface it is, and its grating data (period 113.7656 um, design order -2, azimuth 270.0 deg) is attached at prescription['diffractives'] -- but NO diffraction is applied by apply_real_lens / apply_real_lens_traced, which propagate the surface as flat.  Run the orders explicitly: put {'doe': rx['diffractives'][k]} in propagate_traced_carrier_chain's groups list (its gap_before 0.0000 mm / gap_after 7.0000 mm are then bookkept for you -- give the group that FOLLOWS the last DOE entry gap_before=0, since gap_after already carries that leg), one order per congruence via propagate_traced_carrier_chain_multi.
  rx = la.load_zemax_zmx(ZMX)
D:\Metacept\Neurophos\Python_Test_Scripts\Free_Space_Optics\Lumenairy\validation\repro_traced_carrier_121\approx_reference_fit_121.py:60: RuntimeWarning: apply_real_lens_traced: the exit beam converges at NA_exit=0.0515, so the exit wavefront needs dx <= lambda/(2*NA_exit) = 12.71 um but the grid has dx = 51.23 um.  The beyond-Nyquist annulus of the exit phase ALIASES: far-halo energy lands at wrong radii, so r^2-weighted spot metrics (r2m / second moments) read low while EE50/EE80 stay plausible.  Use a finer grid (dx <= 12.71 um) for halo-faithful results, or pass on_undersample="silent" to suppress.
  return real(E_in, prescription=prescription, wavelength=wavelength,
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5067: RuntimeWarning: apply_real_lens_traced Newton inversion: 17575/65536 pixels (26.8%) did not converge to tol=5.123e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  return _invert_newton(Xw, Yw, sub_progress=sub_progress)
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5153: RuntimeWarning: apply_real_lens_traced Newton inversion: 17575/65536 pixels (26.8%) did not converge to tol=5.123e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  opl_f, xe_g, ye_g = _invert_newton(Xg, Yg, _want_entrance=True)
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5067: RuntimeWarning: apply_real_lens_traced Newton inversion: 15136/65536 pixels (23.1%) did not converge to tol=5.123e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  return _invert_newton(Xw, Yw, sub_progress=sub_progress)
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5153: RuntimeWarning: apply_real_lens_traced Newton inversion: 15136/65536 pixels (23.1%) did not converge to tol=5.123e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  opl_f, xe_g, ye_g = _invert_newton(Xg, Yg, _want_entrance=True)
D:\Metacept\Neurophos\Python_Test_Scripts\Free_Space_Optics\Lumenairy\validation\repro_traced_carrier_121\approx_reference_fit_121.py:60: RuntimeWarning: apply_real_lens_traced: the exit beam converges at NA_exit=0.0867, so the exit wavefront needs dx <= lambda/(2*NA_exit) = 7.55 um but the grid has dx = 51.23 um.  The beyond-Nyquist annulus of the exit phase ALIASES: far-halo energy lands at wrong radii, so r^2-weighted spot metrics (r2m / second moments) read low while EE50/EE80 stay plausible.  Use a finer grid (dx <= 7.55 um) for halo-faithful results, or pass on_undersample="silent" to suppress.
  return real(E_in, prescription=prescription, wavelength=wavelength,
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5067: RuntimeWarning: apply_real_lens_traced Newton inversion: 3527/65536 pixels (5.4%) did not converge to tol=5.123e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  return _invert_newton(Xw, Yw, sub_progress=sub_progress)
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5153: RuntimeWarning: apply_real_lens_traced Newton inversion: 3527/65536 pixels (5.4%) did not converge to tol=5.123e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  opl_f, xe_g, ye_g = _invert_newton(Xg, Yg, _want_entrance=True)
D:\Metacept\Neurophos\Python_Test_Scripts\Free_Space_Optics\Lumenairy\validation\repro_traced_carrier_121\approx_reference_fit_121.py:60: RuntimeWarning: apply_real_lens_traced: the exit beam converges at NA_exit=0.1672, so the exit wavefront needs dx <= lambda/(2*NA_exit) = 3.92 um but the grid has dx = 44.91 um.  The beyond-Nyquist annulus of the exit phase ALIASES: far-halo energy lands at wrong radii, so r^2-weighted spot metrics (r2m / second moments) read low while EE50/EE80 stay plausible.  Use a finer grid (dx <= 3.92 um) for halo-faithful results, or pass on_undersample="silent" to suppress.
  return real(E_in, prescription=prescription, wavelength=wavelength,
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5067: RuntimeWarning: apply_real_lens_traced Newton inversion: 1907/65536 pixels (2.9%) did not converge to tol=4.491e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  return _invert_newton(Xw, Yw, sub_progress=sub_progress)
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5153: RuntimeWarning: apply_real_lens_traced Newton inversion: 1907/65536 pixels (2.9%) did not converge to tol=4.491e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  opl_f, xe_g, ye_g = _invert_newton(Xg, Yg, _want_entrance=True)
D:\Metacept\Neurophos\Python_Test_Scripts\Free_Space_Optics\Lumenairy\validation\repro_traced_carrier_121\approx_reference_fit_121.py:60: RuntimeWarning: apply_real_lens_traced: the exit beam converges at NA_exit=0.3606, so the exit wavefront needs dx <= lambda/(2*NA_exit) = 1.82 um but the grid has dx = 38.43 um.  The beyond-Nyquist annulus of the exit phase ALIASES: far-halo energy lands at wrong radii, so r^2-weighted spot metrics (r2m / second moments) read low while EE50/EE80 stay plausible.  Use a finer grid (dx <= 1.82 um) for halo-faithful results, or pass on_undersample="silent" to suppress.
  return real(E_in, prescription=prescription, wavelength=wavelength,
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5067: RuntimeWarning: apply_real_lens_traced Newton inversion: 24634/65536 pixels (37.6%) did not converge to tol=3.843e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  return _invert_newton(Xw, Yw, sub_progress=sub_progress)
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5153: RuntimeWarning: apply_real_lens_traced Newton inversion: 24634/65536 pixels (37.6%) did not converge to tol=3.843e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  opl_f, xe_g, ye_g = _invert_newton(Xg, Yg, _want_entrance=True)
D:\Metacept\Neurophos\Python_Test_Scripts\Free_Space_Optics\Lumenairy\validation\repro_traced_carrier_121\approx_reference_fit_121.py:60: RuntimeWarning: apply_real_lens_traced: the exit beam converges at NA_exit=0.3016, so the exit wavefront needs dx <= lambda/(2*NA_exit) = 2.17 um but the grid has dx = 33.21 um.  The beyond-Nyquist annulus of the exit phase ALIASES: far-halo energy lands at wrong radii, so r^2-weighted spot metrics (r2m / second moments) read low while EE50/EE80 stay plausible.  Use a finer grid (dx <= 2.17 um) for halo-faithful results, or pass on_undersample="silent" to suppress.
  return real(E_in, prescription=prescription, wavelength=wavelength,
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5067: RuntimeWarning: apply_real_lens_traced Newton inversion: 53895/65536 pixels (82.2%) did not converge to tol=3.321e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  return _invert_newton(Xw, Yw, sub_progress=sub_progress)
C:\Users\Tesla\AppData\Local\Temp\claude\C--Users-Tesla\372a2d1f-acbe-4b57-a148-eeae3fe1d729\scratchpad\pin_d2e60ca\lumenairy\elements\_lens_traced.py:5153: RuntimeWarning: apply_real_lens_traced Newton inversion: 53895/65536 pixels (82.2%) did not converge to tol=3.321e-07 m within 12 iterations.  Affected pixels keep their last Newton value, which may carry residual error.  Increase newton_max_iters if this matters for your tolerance budget.
  opl_f, xe_g, ye_g = _invert_newton(Xg, Yg, _want_entrance=True)
captured 6 element calls: ['Lens S14-S15', 'Lens S16-S17', 'Lens S18-S20', 'Lens S21-S22', 'Lens S23-S24', 'Lens S25-S27']
==============================================================================
PART 1 -- _paraxial_group_r_out: is the exit carrier radius a REFERENCE or a leak?
==============================================================================
group          dx (um)    R_out par    R_out fit  frac err    dslope p99@.5w p99@1w p99@1.5w  pw rms    P>0.5   a rms   a-def
                               (mm)         (mm)            (cyc/px) cyc/px cyc/px cyc/px  cyc/px     frac    (wv)    (wv)
------------------------------------------------------------------------------------------------------------------------------
Lens S14-S15    51.234  703664.7904  703664.7711  2.74e-08 2.179e-11  0.000  0.000  0.000   0.000  0.0e+00   0.000   0.000
Lens S16-S17    51.234  703671.9187  703671.9131  7.92e-09 6.291e-12  0.000  0.000  0.000   0.000  0.0e+00   0.000   0.000
Lens S18-S20    51.235    -263.1942    -276.9551  5.23e-02 1.037e-01  0.005  0.018  0.078   0.016  0.0e+00   3.193   1.291
Lens S21-S22    44.912     -60.1480     -59.7979  5.82e-03 3.717e-02  0.004  0.012  0.028   0.008  0.0e+00   0.993   0.242
Lens S23-S24    38.432     -24.4625     -23.8503  2.50e-02 2.518e-01  0.035  0.132  0.320   0.062  1.3e-04   7.847   2.543
Lens S25-S27    33.211      -7.7124      -8.1743  5.99e-02 5.418e-01  0.122  0.374  0.796   0.157  1.9e-02   7.976   2.777

  dslope = the EXTRA envelope phase slope the paraxial reference
  leaves at the beam edge, in cycles per co-moving pixel.  The
  representation limit is 0.5 cyc/px; below it the residual is
  band-limited and the reference is absorbed exactly.
  p99@Xw / pw rms are the 99th-percentile and the
  AMPLITUDE-WEIGHTED rms slope of the WHOLE residual (aberration
  included) on the co-moving grid, in cycles per pixel; 'P>0.5' is
  the amplitude-weighted fraction of the beam whose residual slope
  EXCEEDS the 0.5 cyc/px representation limit.
  'a rms' is the whole residual the envelope carries (physics +
  reference); 'a-def' has piston/tilt/defocus removed, i.e.
  it is the genuine aberration no reference choice can remove.
  NOTE: the LAST group's exit is NOT stored on this coarse grid on
  the shipped final_leg='exact' route -- it is retraced at
  dx_fine ~ 1.51 um, so scale its two slope columns by
  dx_fine/dx = 1.51/33.21 = 0.0454 for the production path.

==============================================================================
PART 2 -- the tensor-Chebyshev fit of the entrance->exit ray map
==============================================================================
  group 0 Lens S14-S15  n_launch 99 (pitch 206.31 um), eval on 7845 traced points inside 1 w
      order x_out err (um) y_out err (um) OPL err (waves)
          4     1.5584e-11     4.6313e-12     2.6727e-08
          6     8.1450e-12     3.1962e-12     2.6743e-08
          8     6.7796e-12     1.8739e-12     2.6744e-08
         10     5.9980e-12     2.9915e-12     2.6762e-08
         12     6.3184e-12     1.3980e-12     2.6771e-08
         14     6.3654e-12     1.3400e-12     2.6804e-08
  group 1 Lens S16-S17  n_launch 99 (pitch 206.35 um), eval on 7841 traced points inside 1 w
      order x_out err (um) y_out err (um) OPL err (waves)
          4     8.0591e-12     2.4342e-12     2.6470e-08
          6     6.2908e-12     4.8473e-12     2.6487e-08
          8     3.0385e-12     2.2762e-12     2.6498e-08
         10     4.5498e-12     3.0231e-12     2.6499e-08
         12     4.7569e-12     2.8896e-12     2.6492e-08
         14     2.4427e-12     3.6037e-12     2.6500e-08
  group 2 Lens S18-S20  n_launch 99 (pitch 206.39 um), eval on 7836 traced points inside 1 w
      order x_out err (um) y_out err (um) OPL err (waves)
          4     9.9744e-01     9.8632e-01     5.3325e-02
          6     3.5883e-02     3.5442e-02     3.0502e-03
          8     1.5701e-03     1.5518e-03     1.7298e-04
         10     7.9509e-05     7.8457e-05     1.0846e-05
         12     3.8167e-06     3.7539e-06     6.3808e-07
         14     1.8412e-07     1.8054e-07     4.5026e-08
  group 3 Lens S21-S22  n_launch 93 (pitch 183.06 um), eval on 7844 traced points inside 1 w
      order x_out err (um) y_out err (um) OPL err (waves)
          4     2.4763e-02     2.4144e-02     8.9005e-03
          6     1.1036e-04     1.0716e-04     5.4594e-05
          8     6.3492e-07     6.1861e-07     3.7283e-07
         10     4.4610e-09     4.3502e-09     2.9128e-09
         12     3.1958e-11     3.0587e-11     3.2734e-11
         14     7.2230e-12     3.4733e-12     2.4156e-11
  group 4 Lens S23-S24  n_launch 87 (pitch 154.40 um), eval on 7841 traced points inside 1 w
      order x_out err (um) y_out err (um) OPL err (waves)
          4     1.3818e-01     1.3412e-01     4.5902e-02
          6     3.1963e-03     3.0854e-03     1.5292e-03
          8     9.0674e-05     8.7571e-05     5.3380e-05
         10     3.0695e-06     2.9520e-06     2.0891e-06
         12     1.0101e-07     9.6466e-08     7.6479e-08
         14     3.3956e-09     3.2253e-09     2.7686e-09
  group 5 Lens S25-S27  n_launch 75 (pitch 135.04 um), eval on 7841 traced points inside 1 w
      order x_out err (um) y_out err (um) OPL err (waves)
          4     9.8415e-02     9.2339e-02     1.8755e-02
          6     1.3988e-03     1.4776e-03     7.6925e-04
          8     5.7618e-05     6.3764e-05     1.8952e-05
         10     7.5032e-07     1.2062e-06     2.4066e-06
         12     4.5988e-08     2.4015e-08     1.0231e-07
         14     4.4280e-09     2.8723e-09     5.2915e-09
