docs/audits/AUDIT_ADVERSARIAL_EXHAUSTIVE_2026_09_11/repro/RL-CORE\p17_perf.py:55: UserWarning: apply_real_lens: 1 prescription aperture(s) exceed the simulation grid (N=64, dx=10.000 um, semi=0.320 mm). Largest is system aperture_diameter with semi_diameter=2.000 mm (+1.680 mm beyond the grid); the field will be truncated at the grid edge during propagation, silently dropping energy the real lens would have transmitted. Consider increasing N or dx so N*dx/2 >= max(semi_diameter). Affected surfaces: system aperture_diameter=2.00mm.
  apply_real_lens(Etiny.copy(), prescription=rx, wavelength=lam, dx=1e-5)
=== wall clock (best of 3), 3-surface element ===
  N=512    whole-grid    144.99 ms
  N=512    auto-band     199.18 ms
  N=512    band=256      186.03 ms
  N=1024   whole-grid   1149.39 ms
  N=1024   auto-band    1173.93 ms
  N=1024   band=256     1210.79 ms
  N=2048   whole-grid   4010.12 ms
  N=2048   auto-band    4282.55 ms
  N=2048   band=256     4386.92 ms

=== tracemalloc peak (whole-grid vs banded), grids of 8*N*N bytes ===
  N=1024   whole-grid  peak    135.29 MB =  16.13 float64 grids  ( 8.06 complex128)
  N=1024   band=256    peak     56.67 MB =   6.76 float64 grids  ( 3.38 complex128)
  N=2048   whole-grid  peak    541.11 MB =  16.13 float64 grids  ( 8.06 complex128)
  N=2048   band=256    peak    213.99 MB =   6.38 float64 grids  ( 3.19 complex128)

=== validator + setup overhead: empty-ish call at tiny N ===
  200 calls at N=64: 676.5 ms total (3.382 ms/call)

=== cProfile at N=2048 (whole-grid) ===
         480 function calls in 5.688 seconds

   Ordered by: cumulative time
   List reduced from 113 to 16 due to restriction <16>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.010    0.010    5.610    5.610 D:\Metacept/Neurophos/Python_Test_Scripts/Free_Space_Optics/Lumenairy\lumenairy\elements\_lens_real.py:3773(apply_real_lens)
        1    2.244    2.244    5.600    5.600 D:\Metacept/Neurophos/Python_Test_Scripts/Free_Space_Optics/Lumenairy\lumenairy\elements\_lens_real.py:4524(_apply_real_lens_impl)
        2    0.000    0.000    1.840    0.920 D:\Metacept/Neurophos/Python_Test_Scripts/Free_Space_Optics/Lumenairy\lumenairy\elements\_lens_real.py:1868(_propagate_through_glass)
        2    0.372    0.186    1.840    0.920 D:\Metacept/Neurophos/Python_Test_Scripts/Free_Space_Optics/Lumenairy\lumenairy\propagators\asm.py:583(angular_spectrum_propagate)
        3    1.247    0.416    1.384    0.461 D:\Metacept/Neurophos/Python_Test_Scripts/Free_Space_Optics/Lumenairy\lumenairy\elements\lenses.py:180(surface_sag_general)
        2    0.823    0.412    0.824    0.412 D:\Metacept/Neurophos/Python_Test_Scripts/Free_Space_Optics/Lumenairy\lumenairy\propagators\fft_infra.py:2091(_ifft2)
        2    0.346    0.173    0.346    0.173 D:\Metacept/Neurophos/Python_Test_Scripts/Free_Space_Optics/Lumenairy\lumenairy\propagators\fft_infra.py:1994(_fft2)
        4    0.298    0.074    0.298    0.074 C:\Users\AndrewT\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\numpy\_core\numeric.py:1230(roll)
        4    0.208    0.052    0.208    0.052 {method 'copy' of 'numpy.ndarray' objects}
        2    0.000    0.000    0.199    0.099 C:\Users\AndrewT\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\numpy\fft\_helper.py:19(fftshift)
        3    0.136    0.045    0.136    0.045 C:\Users\AndrewT\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\numpy\_core\numeric.py:97(zeros_like)
        2    0.000    0.000    0.099    0.050 C:\Users\AndrewT\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\numpy\fft\_helper.py:77(ifftshift)
        1    0.000    0.000    0.069    0.069 C:\Users\AndrewT\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\numpy\lib\_function_base_impl.py:5050(meshgrid)
        3    0.000    0.000    0.069    0.023 C:\Users\AndrewT\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\numpy\lib\_function_base_impl.py:5196(<genexpr>)
        3    0.000    0.000    0.002    0.001 C:\Users\AndrewT\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\numpy\_core\fromnumeric.py:2436(any)
        3    0.000    0.000    0.002    0.001 C:\Users\AndrewT\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\numpy\_core\fromnumeric.py:86(_wrapreduction_any_all)




=== is the ASM H cache HIT across surfaces with equal gaps? ===
  equal gaps (cache hit)      4135.96 ms
  unequal gaps (2 kernels)    3685.75 ms
