Current task: —

E-016-herglotz-fine-structure.py

Experiments: E-016 · script updated 08-18-2026

E-016-herglotz-fine-structure.csv — 130.1 KB, updated 08-18-2026

← prev page 6 of 8 · 500/page · 3519 rows next →
# seriesayrho
2502 W_thzero 8.0 8.200000 2.5448666252e+00
2503 W_thzero 8.0 8.250000 2.5448679362e+00
2504 W_thzero 8.0 8.300000 2.5448692472e+00
2505 W_thzero 8.0 8.350000 2.5448705583e+00
2506 W_thzero 8.0 8.400000 2.5448718695e+00
2507 W_thzero 8.0 8.450000 2.5448731806e+00
2508 W_thzero 8.0 8.500000 2.5448744916e+00
2509 W_thzero 8.0 8.550000 2.5448758026e+00
2510 W_thzero 8.0 8.600000 2.5448771133e+00
2511 W_thzero 8.0 8.650000 2.5448784239e+00
2512 W_thzero 8.0 8.700000 2.5448797343e+00
2513 W_thzero 8.0 8.750000 2.5448810443e+00
2514 W_thzero 8.0 8.800000 2.5448823540e+00
2515 W_thzero 8.0 8.850000 2.5448836634e+00
2516 W_thzero 8.0 8.900000 2.5448849723e+00
2517 W_thzero 8.0 8.950000 2.5448862808e+00
2518 W_thzero 8.0 9.000000 2.5448875888e+00
2519 W_thzero 8.0 9.050000 2.5448888962e+00
2520 W_thzero 8.0 9.100000 2.5448902031e+00
2521 W_thzero 8.0 9.150000 2.5448915093e+00
2522 W_thzero 8.0 9.200000 2.5448928149e+00
2523 W_thzero 8.0 9.250000 2.5448941198e+00
2524 W_thzero 8.0 9.300000 2.5448954240e+00
2525 W_thzero 8.0 9.350000 2.5448967273e+00
2526 W_thzero 8.0 9.400000 2.5448980299e+00
2527 W_thzero 8.0 9.450000 2.5448993316e+00
2528 W_thzero 8.0 9.500000 2.5449006324e+00
2529 W_thzero 8.0 9.550000 2.5449019323e+00
2530 W_thzero 8.0 9.600000 2.5449032313e+00
2531 W_thzero 8.0 9.650000 2.5449045292e+00
2532 W_thzero 8.0 9.700000 2.5449058261e+00
2533 W_thzero 8.0 9.750000 2.5449071219e+00
2534 W_thzero 8.0 9.800000 2.5449084167e+00
2535 W_thzero 8.0 9.850000 2.5449097103e+00
2536 W_thzero 8.0 9.900000 2.5449110027e+00
2537 W_thzero 8.0 9.950000 2.5449122939e+00
2538 W_thzero 8.0 10.000000 2.5449135838e+00
2539 W_thzero 8.0 10.050000 2.5449148725e+00
2540 W_thzero 8.0 10.100000 2.5449161598e+00
2541 W_thzero 8.0 10.150000 2.5449174458e+00
2542 W_thzero 8.0 10.200000 2.5449187305e+00
2543 W_thzero 8.0 10.250000 2.5449200137e+00
2544 W_thzero 8.0 10.300000 2.5449212955e+00
2545 W_thzero 8.0 10.350000 2.5449225758e+00
2546 W_thzero 8.0 10.400000 2.5449238546e+00
2547 W_thzero 8.0 10.450000 2.5449251319e+00
2548 W_thzero 8.0 10.500000 2.5449264076e+00
2549 W_thzero 8.0 10.550000 2.5449276817e+00
2550 W_thzero 8.0 10.600000 2.5449289542e+00
2551 W_thzero 8.0 10.650000 2.5449302250e+00
2552 W_thzero 8.0 10.700000 2.5449314942e+00
2553 W_thzero 8.0 10.750000 2.5449327616e+00
2554 W_thzero 8.0 10.800000 2.5449340273e+00
2555 W_thzero 8.0 10.850000 2.5449352912e+00
2556 W_thzero 8.0 10.900000 2.5449365533e+00
2557 W_thzero 8.0 10.950000 2.5449378136e+00
2558 W_thzero 8.0 11.000000 2.5449390721e+00
2559 W_thzero 8.0 11.050000 2.5449403286e+00
2560 W_thzero 8.0 11.100000 2.5449415833e+00
2561 W_thzero 8.0 11.150000 2.5449428360e+00
2562 W_thzero 8.0 11.200000 2.5449440868e+00
2563 W_thzero 8.0 11.250000 2.5449453356e+00
2564 W_thzero 8.0 11.300000 2.5449465824e+00
2565 W_thzero 8.0 11.350000 2.5449478271e+00
2566 W_thzero 8.0 11.400000 2.5449490698e+00
2567 W_thzero 8.0 11.450000 2.5449503104e+00
2568 W_thzero 8.0 11.500000 2.5449515489e+00
2569 W_thzero 8.0 11.550000 2.5449527853e+00
2570 W_thzero 8.0 11.600000 2.5449540195e+00
2571 W_thzero 8.0 11.650000 2.5449552515e+00
2572 W_thzero 8.0 11.700000 2.5449564813e+00
2573 W_thzero 8.0 11.750000 2.5449577090e+00
2574 W_thzero 8.0 11.800000 2.5449589343e+00
2575 W_thzero 8.0 11.850000 2.5449601575e+00
2576 W_thzero 8.0 11.900000 2.5449613783e+00
2577 W_thzero 8.0 11.950000 2.5449625968e+00
2578 W_thzero 8.0 12.000000 2.5449638130e+00
2579 W_thzero 8.0 12.050000 2.5449650268e+00
2580 W_thzero 8.0 12.100000 2.5449662383e+00
2581 W_thzero 8.0 12.150000 2.5449674474e+00
2582 W_thzero 8.0 12.200000 2.5449686541e+00
2583 W_thzero 8.0 12.250000 2.5449698583e+00
2584 W_thzero 8.0 12.300000 2.5449710601e+00
2585 W_thzero 8.0 12.350000 2.5449722595e+00
2586 W_thzero 8.0 12.400000 2.5449734563e+00
2587 W_thzero 8.0 12.450000 2.5449746507e+00
2588 W_thzero 8.0 12.500000 2.5449758425e+00
2589 W_thzero 8.0 12.550000 2.5449770318e+00
2590 W_thzero 8.0 12.600000 2.5449782186e+00
2591 W_thzero 8.0 12.650000 2.5449794028e+00
2592 W_thzero 8.0 12.700000 2.5449805844e+00
2593 W_thzero 8.0 12.750000 2.5449817634e+00
2594 W_thzero 8.0 12.800000 2.5449829397e+00
2595 W_thzero 8.0 12.850000 2.5449841135e+00
2596 W_thzero 8.0 12.900000 2.5449852845e+00
2597 W_thzero 8.0 12.950000 2.5449864530e+00
2598 W_thzero 8.0 13.000000 2.5449876187e+00
2599 W_thzero 8.0 13.050000 2.5449887817e+00
2600 W_thzero 8.0 13.100000 2.5449899421e+00
2601 W_thzero 8.0 13.150000 2.5449910997e+00
2602 W_thzero 8.0 13.200000 2.5449922546e+00
2603 W_thzero 8.0 13.250000 2.5449934067e+00
2604 W_thzero 8.0 13.300000 2.5449945560e+00
2605 W_thzero 8.0 13.350000 2.5449957026e+00
2606 W_thzero 8.0 13.400000 2.5449968464e+00
2607 W_thzero 8.0 13.450000 2.5449979874e+00
2608 W_thzero 8.0 13.500000 2.5449991256e+00
2609 W_thzero 8.0 13.550000 2.5450002609e+00
2610 W_thzero 8.0 13.600000 2.5450013934e+00
2611 W_thzero 8.0 13.650000 2.5450025231e+00
2612 W_thzero 8.0 13.700000 2.5450036498e+00
2613 W_thzero 8.0 13.750000 2.5450047738e+00
2614 W_thzero 8.0 13.800000 2.5450058948e+00
2615 W_thzero 8.0 13.850000 2.5450070129e+00
2616 W_thzero 8.0 13.900000 2.5450081282e+00
2617 W_thzero 8.0 13.950000 2.5450092405e+00
2618 W_thzero 8.0 14.000000 2.5450103499e+00
2619 W_thzero 8.0 14.050000 2.5450114564e+00
2620 W_thzero 8.0 14.100000 2.5450125599e+00
2621 W_thzero 8.0 14.150000 2.5450136605e+00
2622 W_thzero 8.0 14.200000 2.5450147581e+00
2623 W_thzero 8.0 14.250000 2.5450158527e+00
2624 W_thzero 8.0 14.300000 2.5450169444e+00
2625 W_thzero 8.0 14.350000 2.5450180331e+00
2626 W_thzero 8.0 14.400000 2.5450191188e+00
2627 W_thzero 8.0 14.450000 2.5450202014e+00
2628 W_thzero 8.0 14.500000 2.5450212811e+00
2629 W_thzero 8.0 14.550000 2.5450223578e+00
2630 W_thzero 8.0 14.600000 2.5450234314e+00
2631 W_thzero 8.0 14.650000 2.5450245020e+00
2632 W_thzero 8.0 14.700000 2.5450255696e+00
2633 W_thzero 8.0 14.750000 2.5450266342e+00
2634 W_thzero 8.0 14.800000 2.5450276956e+00
2635 W_thzero 8.0 14.850000 2.5450287541e+00
2636 W_thzero 8.0 14.900000 2.5450298094e+00
2637 W_thzero 8.0 14.950000 2.5450308618e+00
2638 W_thzero 8.0 15.000000 2.5450319110e+00
2639 W_thzero 8.0 15.050000 2.5450329572e+00
2640 W_thzero 8.0 15.100000 2.5450340002e+00
2641 W_thzero 8.0 15.150000 2.5450350402e+00
2642 W_thzero 8.0 15.200000 2.5450360771e+00
2643 W_thzero 8.0 15.250000 2.5450371110e+00
2644 W_thzero 8.0 15.300000 2.5450381417e+00
2645 W_thzero 8.0 15.350000 2.5450391693e+00
2646 W_thzero 8.0 15.400000 2.5450401938e+00
2647 W_thzero 8.0 15.450000 2.5450412152e+00
2648 W_thzero 8.0 15.500000 2.5450422335e+00
2649 W_thzero 8.0 15.550000 2.5450432487e+00
2650 W_thzero 8.0 15.600000 2.5450442607e+00
2651 W_thzero 8.0 15.650000 2.5450452697e+00
2652 W_thzero 8.0 15.700000 2.5450462755e+00
2653 W_thzero 8.0 15.750000 2.5450472782e+00
2654 W_thzero 8.0 15.800000 2.5450482777e+00
2655 W_thzero 8.0 15.850000 2.5450492742e+00
2656 W_thzero 8.0 15.900000 2.5450502675e+00
2657 W_thzero 8.0 15.950000 2.5450512576e+00
2658 W_thzero 8.0 16.000000 2.5450522446e+00
2659 W_thzero 8.0 16.050000 2.5450532285e+00
2660 W_thzero 8.0 16.100000 2.5450542093e+00
2661 W_thzero 8.0 16.150000 2.5450551869e+00
2662 W_thzero 8.0 16.200000 2.5450561614e+00
2663 W_thzero 8.0 16.250000 2.5450571327e+00
2664 W_thzero 8.0 16.300000 2.5450581009e+00
2665 W_thzero 8.0 16.350000 2.5450590660e+00
2666 W_thzero 8.0 16.400000 2.5450600279e+00
2667 W_thzero 8.0 16.450000 2.5450609867e+00
2668 W_thzero 8.0 16.500000 2.5450619423e+00
2669 W_thzero 8.0 16.550000 2.5450628948e+00
2670 W_thzero 8.0 16.600000 2.5450638441e+00
2671 W_thzero 8.0 16.650000 2.5450647903e+00
2672 W_thzero 8.0 16.700000 2.5450657334e+00
2673 W_thzero 8.0 16.750000 2.5450666733e+00
2674 W_thzero 8.0 16.800000 2.5450676101e+00
2675 W_thzero 8.0 16.850000 2.5450685438e+00
2676 W_thzero 8.0 16.900000 2.5450694743e+00
2677 W_thzero 8.0 16.950000 2.5450704017e+00
2678 W_thzero 8.0 17.000000 2.5450713259e+00
2679 W_thzero 8.0 17.050000 2.5450722471e+00
2680 W_thzero 8.0 17.100000 2.5450731651e+00
2681 W_thzero 8.0 17.150000 2.5450740799e+00
2682 W_thzero 8.0 17.200000 2.5450749917e+00
2683 W_thzero 8.0 17.250000 2.5450759003e+00
2684 W_thzero 8.0 17.300000 2.5450768058e+00
2685 W_thzero 8.0 17.350000 2.5450777082e+00
2686 W_thzero 8.0 17.400000 2.5450786074e+00
2687 W_thzero 8.0 17.450000 2.5450795036e+00
2688 W_thzero 8.0 17.500000 2.5450803966e+00
2689 W_thzero 8.0 17.550000 2.5450812866e+00
2690 W_thzero 8.0 17.600000 2.5450821734e+00
2691 W_thzero 8.0 17.650000 2.5450830571e+00
2692 W_thzero 8.0 17.700000 2.5450839377e+00
2693 W_thzero 8.0 17.750000 2.5450848153e+00
2694 W_thzero 8.0 17.800000 2.5450856897e+00
2695 W_thzero 8.0 17.850000 2.5450865611e+00
2696 W_thzero 8.0 17.900000 2.5450874293e+00
2697 W_thzero 8.0 17.950000 2.5450882945e+00
2698 W_thzero 8.0 18.000000 2.5450891566e+00
2699 W_thzero 8.0 18.050000 2.5450900157e+00
2700 W_thzero 8.0 18.100000 2.5450908716e+00
2701 W_thzero 8.0 18.150000 2.5450917246e+00
2702 W_thzero 8.0 18.200000 2.5450925744e+00
2703 W_thzero 8.0 18.250000 2.5450934212e+00
2704 W_thzero 8.0 18.300000 2.5450942649e+00
2705 W_thzero 8.0 18.350000 2.5450951056e+00
2706 W_thzero 8.0 18.400000 2.5450959433e+00
2707 W_thzero 8.0 18.450000 2.5450967779e+00
2708 W_thzero 8.0 18.500000 2.5450976095e+00
2709 W_thzero 8.0 18.550000 2.5450984380e+00
2710 W_thzero 8.0 18.600000 2.5450992635e+00
2711 W_thzero 8.0 18.650000 2.5451000861e+00
2712 W_thzero 8.0 18.700000 2.5451009056e+00
2713 W_thzero 8.0 18.750000 2.5451017220e+00
2714 W_thzero 8.0 18.800000 2.5451025355e+00
2715 W_thzero 8.0 18.850000 2.5451033460e+00
2716 W_thzero 8.0 18.900000 2.5451041535e+00
2717 W_thzero 8.0 18.950000 2.5451049580e+00
2718 W_thzero 8.0 19.000000 2.5451057596e+00
2719 W_thzero 8.0 19.050000 2.5451065581e+00
2720 W_thzero 8.0 19.100000 2.5451073537e+00
2721 W_thzero 8.0 19.150000 2.5451081464e+00
2722 W_thzero 8.0 19.200000 2.5451089360e+00
2723 W_thzero 8.0 19.250000 2.5451097228e+00
2724 W_thzero 8.0 19.300000 2.5451105065e+00
2725 W_thzero 8.0 19.350000 2.5451112874e+00
2726 W_thzero 8.0 19.400000 2.5451120653e+00
2727 W_thzero 8.0 19.450000 2.5451128402e+00
2728 W_thzero 8.0 19.500000 2.5451136123e+00
2729 W_thzero 8.0 19.550000 2.5451143815e+00
2730 W_thzero 8.0 19.600000 2.5451151477e+00
2731 W_thzero 8.0 19.650000 2.5451159110e+00
2732 W_thzero 8.0 19.700000 2.5451166715e+00
2733 W_thzero 8.0 19.750000 2.5451174290e+00
2734 W_thzero 8.0 19.800000 2.5451181837e+00
2735 W_thzero 8.0 19.850000 2.5451189355e+00
2736 W_thzero 8.0 19.900000 2.5451196844e+00
2737 W_thzero 8.0 19.950000 2.5451204305e+00
2738 W_thzero 8.0 20.000000 2.5451211737e+00
2739 W_thpi 10.0 0.500000 3.3400934210e+00
2740 W_thpi 10.0 0.550000 3.3098184212e+00
2741 W_thpi 10.0 0.600000 3.2873971952e+00
2742 W_thpi 10.0 0.650000 3.2703549885e+00
2743 W_thpi 10.0 0.700000 3.2571082564e+00
2744 W_thpi 10.0 0.750000 3.2466112738e+00
2745 W_thpi 10.0 0.800000 3.2381533319e+00
2746 W_thpi 10.0 0.850000 3.2312386903e+00
2747 W_thpi 10.0 0.900000 3.2255133922e+00
2748 W_thpi 10.0 0.950000 3.2207193838e+00
2749 W_thpi 10.0 1.000000 3.2166649881e+00
2750 W_thpi 10.0 1.050000 3.2132054364e+00
2751 W_thpi 10.0 1.100000 3.2102297390e+00
2752 W_thpi 10.0 1.150000 3.2076516494e+00
2753 W_thpi 10.0 1.200000 3.2054033258e+00
2754 W_thpi 10.0 1.250000 3.2034308101e+00
2755 W_thpi 10.0 1.300000 3.2016907513e+00
2756 W_thpi 10.0 1.350000 3.2001479973e+00
2757 W_thpi 10.0 1.400000 3.1987738015e+00
2758 W_thpi 10.0 1.450000 3.1975444707e+00
2759 W_thpi 10.0 1.500000 3.1964403351e+00
2760 W_thpi 10.0 1.550000 3.1954449554e+00
2761 W_thpi 10.0 1.600000 3.1945445057e+00
2762 W_thpi 10.0 1.650000 3.1937272909e+00
2763 W_thpi 10.0 1.700000 3.1929833635e+00
2764 W_thpi 10.0 1.750000 3.1923042199e+00
2765 W_thpi 10.0 1.800000 3.1916825558e+00
2766 W_thpi 10.0 1.850000 3.1911120684e+00
2767 W_thpi 10.0 1.900000 3.1905872964e+00
2768 W_thpi 10.0 1.950000 3.1901034886e+00
2769 W_thpi 10.0 2.000000 3.1896564956e+00
2770 W_thpi 10.0 2.050000 3.1892426810e+00
2771 W_thpi 10.0 2.100000 3.1888588467e+00
2772 W_thpi 10.0 2.150000 3.1885021713e+00
2773 W_thpi 10.0 2.200000 3.1881701578e+00
2774 W_thpi 10.0 2.250000 3.1878605902e+00
2775 W_thpi 10.0 2.300000 3.1875714959e+00
2776 W_thpi 10.0 2.350000 3.1873011148e+00
2777 W_thpi 10.0 2.400000 3.1870478720e+00
2778 W_thpi 10.0 2.450000 3.1868103551e+00
2779 W_thpi 10.0 2.500000 3.1865872945e+00
2780 W_thpi 10.0 2.550000 3.1863775462e+00
2781 W_thpi 10.0 2.600000 3.1861800776e+00
2782 W_thpi 10.0 2.650000 3.1859939541e+00
2783 W_thpi 10.0 2.700000 3.1858183289e+00
2784 W_thpi 10.0 2.750000 3.1856524324e+00
2785 W_thpi 10.0 2.800000 3.1854955648e+00
2786 W_thpi 10.0 2.850000 3.1853470880e+00
2787 W_thpi 10.0 2.900000 3.1852064194e+00
2788 W_thpi 10.0 2.950000 3.1850730263e+00
2789 W_thpi 10.0 3.000000 3.1849464207e+00
2790 W_thpi 10.0 3.050000 3.1848261549e+00
2791 W_thpi 10.0 3.100000 3.1847118177e+00
2792 W_thpi 10.0 3.150000 3.1846030306e+00
2793 W_thpi 10.0 3.200000 3.1844994450e+00
2794 W_thpi 10.0 3.250000 3.1844007394e+00
2795 W_thpi 10.0 3.300000 3.1843066167e+00
2796 W_thpi 10.0 3.350000 3.1842168022e+00
2797 W_thpi 10.0 3.400000 3.1841310414e+00
2798 W_thpi 10.0 3.450000 3.1840490986e+00
2799 W_thpi 10.0 3.500000 3.1839707548e+00
2800 W_thpi 10.0 3.550000 3.1838958066e+00
2801 W_thpi 10.0 3.600000 3.1838240650e+00
2802 W_thpi 10.0 3.650000 3.1837553537e+00
2803 W_thpi 10.0 3.700000 3.1836895085e+00
2804 W_thpi 10.0 3.750000 3.1836263764e+00
2805 W_thpi 10.0 3.800000 3.1835658142e+00
2806 W_thpi 10.0 3.850000 3.1835076882e+00
2807 W_thpi 10.0 3.900000 3.1834518734e+00
2808 W_thpi 10.0 3.950000 3.1833982525e+00
2809 W_thpi 10.0 4.000000 3.1833467159e+00
2810 W_thpi 10.0 4.050000 3.1832971604e+00
2811 W_thpi 10.0 4.100000 3.1832494895e+00
2812 W_thpi 10.0 4.150000 3.1832036121e+00
2813 W_thpi 10.0 4.200000 3.1831594431e+00
2814 W_thpi 10.0 4.250000 3.1831169018e+00
2815 W_thpi 10.0 4.300000 3.1830759128e+00
2816 W_thpi 10.0 4.350000 3.1830364045e+00
2817 W_thpi 10.0 4.400000 3.1829983098e+00
2818 W_thpi 10.0 4.450000 3.1829615651e+00
2819 W_thpi 10.0 4.500000 3.1829261105e+00
2820 W_thpi 10.0 4.550000 3.1828918894e+00
2821 W_thpi 10.0 4.600000 3.1828588481e+00
2822 W_thpi 10.0 4.650000 3.1828269359e+00
2823 W_thpi 10.0 4.700000 3.1827961049e+00
2824 W_thpi 10.0 4.750000 3.1827663097e+00
2825 W_thpi 10.0 4.800000 3.1827375070e+00
2826 W_thpi 10.0 4.850000 3.1827096560e+00
2827 W_thpi 10.0 4.900000 3.1826827179e+00
2828 W_thpi 10.0 4.950000 3.1826566558e+00
2829 W_thpi 10.0 5.000000 3.1826314349e+00
2830 W_thpi 10.0 5.050000 3.1826070217e+00
2831 W_thpi 10.0 5.100000 3.1825833846e+00
2832 W_thpi 10.0 5.150000 3.1825604936e+00
2833 W_thpi 10.0 5.200000 3.1825383199e+00
2834 W_thpi 10.0 5.250000 3.1825168362e+00
2835 W_thpi 10.0 5.300000 3.1824960166e+00
2836 W_thpi 10.0 5.350000 3.1824758361e+00
2837 W_thpi 10.0 5.400000 3.1824562712e+00
2838 W_thpi 10.0 5.450000 3.1824372992e+00
2839 W_thpi 10.0 5.500000 3.1824188986e+00
2840 W_thpi 10.0 5.550000 3.1824010487e+00
2841 W_thpi 10.0 5.600000 3.1823837299e+00
2842 W_thpi 10.0 5.650000 3.1823669233e+00
2843 W_thpi 10.0 5.700000 3.1823506110e+00
2844 W_thpi 10.0 5.750000 3.1823347756e+00
2845 W_thpi 10.0 5.800000 3.1823194008e+00
2846 W_thpi 10.0 5.850000 3.1823044708e+00
2847 W_thpi 10.0 5.900000 3.1822899703e+00
2848 W_thpi 10.0 5.950000 3.1822758849e+00
2849 W_thpi 10.0 6.000000 3.1822622007e+00
2850 W_thpi 10.0 6.050000 3.1822489045e+00
2851 W_thpi 10.0 6.100000 3.1822359833e+00
2852 W_thpi 10.0 6.150000 3.1822234249e+00
2853 W_thpi 10.0 6.200000 3.1822112175e+00
2854 W_thpi 10.0 6.250000 3.1821993499e+00
2855 W_thpi 10.0 6.300000 3.1821878111e+00
2856 W_thpi 10.0 6.350000 3.1821765907e+00
2857 W_thpi 10.0 6.400000 3.1821656787e+00
2858 W_thpi 10.0 6.450000 3.1821550653e+00
2859 W_thpi 10.0 6.500000 3.1821447413e+00
2860 W_thpi 10.0 6.550000 3.1821346978e+00
2861 W_thpi 10.0 6.600000 3.1821249260e+00
2862 W_thpi 10.0 6.650000 3.1821154179e+00
2863 W_thpi 10.0 6.700000 3.1821061652e+00
2864 W_thpi 10.0 6.750000 3.1820971605e+00
2865 W_thpi 10.0 6.800000 3.1820883962e+00
2866 W_thpi 10.0 6.850000 3.1820798652e+00
2867 W_thpi 10.0 6.900000 3.1820715606e+00
2868 W_thpi 10.0 6.950000 3.1820634757e+00
2869 W_thpi 10.0 7.000000 3.1820556042e+00
2870 W_thpi 10.0 7.050000 3.1820479398e+00
2871 W_thpi 10.0 7.100000 3.1820404766e+00
2872 W_thpi 10.0 7.150000 3.1820332088e+00
2873 W_thpi 10.0 7.200000 3.1820261309e+00
2874 W_thpi 10.0 7.250000 3.1820192373e+00
2875 W_thpi 10.0 7.300000 3.1820125230e+00
2876 W_thpi 10.0 7.350000 3.1820059830e+00
2877 W_thpi 10.0 7.400000 3.1819996123e+00
2878 W_thpi 10.0 7.450000 3.1819934062e+00
2879 W_thpi 10.0 7.500000 3.1819873602e+00
2880 W_thpi 10.0 7.550000 3.1819814699e+00
2881 W_thpi 10.0 7.600000 3.1819757311e+00
2882 W_thpi 10.0 7.650000 3.1819701396e+00
2883 W_thpi 10.0 7.700000 3.1819646915e+00
2884 W_thpi 10.0 7.750000 3.1819593828e+00
2885 W_thpi 10.0 7.800000 3.1819542098e+00
2886 W_thpi 10.0 7.850000 3.1819491690e+00
2887 W_thpi 10.0 7.900000 3.1819442568e+00
2888 W_thpi 10.0 7.950000 3.1819394697e+00
2889 W_thpi 10.0 8.000000 3.1819348046e+00
2890 W_thpi 10.0 8.050000 3.1819302582e+00
2891 W_thpi 10.0 8.100000 3.1819258274e+00
2892 W_thpi 10.0 8.150000 3.1819215092e+00
2893 W_thpi 10.0 8.200000 3.1819173007e+00
2894 W_thpi 10.0 8.250000 3.1819131991e+00
2895 W_thpi 10.0 8.300000 3.1819092015e+00
2896 W_thpi 10.0 8.350000 3.1819053055e+00
2897 W_thpi 10.0 8.400000 3.1819015083e+00
2898 W_thpi 10.0 8.450000 3.1818978075e+00
2899 W_thpi 10.0 8.500000 3.1818942006e+00
2900 W_thpi 10.0 8.550000 3.1818906852e+00
2901 W_thpi 10.0 8.600000 3.1818872591e+00
2902 W_thpi 10.0 8.650000 3.1818839201e+00
2903 W_thpi 10.0 8.700000 3.1818806659e+00
2904 W_thpi 10.0 8.750000 3.1818774945e+00
2905 W_thpi 10.0 8.800000 3.1818744037e+00
2906 W_thpi 10.0 8.850000 3.1818713917e+00
2907 W_thpi 10.0 8.900000 3.1818684565e+00
2908 W_thpi 10.0 8.950000 3.1818655961e+00
2909 W_thpi 10.0 9.000000 3.1818628089e+00
2910 W_thpi 10.0 9.050000 3.1818600929e+00
2911 W_thpi 10.0 9.100000 3.1818574465e+00
2912 W_thpi 10.0 9.150000 3.1818548679e+00
2913 W_thpi 10.0 9.200000 3.1818523556e+00
2914 W_thpi 10.0 9.250000 3.1818499079e+00
2915 W_thpi 10.0 9.300000 3.1818475233e+00
2916 W_thpi 10.0 9.350000 3.1818452003e+00
2917 W_thpi 10.0 9.400000 3.1818429374e+00
2918 W_thpi 10.0 9.450000 3.1818407331e+00
2919 W_thpi 10.0 9.500000 3.1818385862e+00
2920 W_thpi 10.0 9.550000 3.1818364951e+00
2921 W_thpi 10.0 9.600000 3.1818344587e+00
2922 W_thpi 10.0 9.650000 3.1818324756e+00
2923 W_thpi 10.0 9.700000 3.1818305445e+00
2924 W_thpi 10.0 9.750000 3.1818286643e+00
2925 W_thpi 10.0 9.800000 3.1818268338e+00
2926 W_thpi 10.0 9.850000 3.1818250517e+00
2927 W_thpi 10.0 9.900000 3.1818233170e+00
2928 W_thpi 10.0 9.950000 3.1818216286e+00
2929 W_thpi 10.0 10.000000 3.1818199853e+00
2930 W_thpi 10.0 10.050000 3.1818183862e+00
2931 W_thpi 10.0 10.100000 3.1818168302e+00
2932 W_thpi 10.0 10.150000 3.1818153164e+00
2933 W_thpi 10.0 10.200000 3.1818138437e+00
2934 W_thpi 10.0 10.250000 3.1818124112e+00
2935 W_thpi 10.0 10.300000 3.1818110180e+00
2936 W_thpi 10.0 10.350000 3.1818096632e+00
2937 W_thpi 10.0 10.400000 3.1818083459e+00
2938 W_thpi 10.0 10.450000 3.1818070652e+00
2939 W_thpi 10.0 10.500000 3.1818058204e+00
2940 W_thpi 10.0 10.550000 3.1818046106e+00
2941 W_thpi 10.0 10.600000 3.1818034350e+00
2942 W_thpi 10.0 10.650000 3.1818022928e+00
2943 W_thpi 10.0 10.700000 3.1818011833e+00
2944 W_thpi 10.0 10.750000 3.1818001058e+00
2945 W_thpi 10.0 10.800000 3.1817990595e+00
2946 W_thpi 10.0 10.850000 3.1817980437e+00
2947 W_thpi 10.0 10.900000 3.1817970577e+00
2948 W_thpi 10.0 10.950000 3.1817961009e+00
2949 W_thpi 10.0 11.000000 3.1817951726e+00
2950 W_thpi 10.0 11.050000 3.1817942722e+00
2951 W_thpi 10.0 11.100000 3.1817933990e+00
2952 W_thpi 10.0 11.150000 3.1817925524e+00
2953 W_thpi 10.0 11.200000 3.1817917319e+00
2954 W_thpi 10.0 11.250000 3.1817909368e+00
2955 W_thpi 10.0 11.300000 3.1817901667e+00
2956 W_thpi 10.0 11.350000 3.1817894208e+00
2957 W_thpi 10.0 11.400000 3.1817886988e+00
2958 W_thpi 10.0 11.450000 3.1817880000e+00
2959 W_thpi 10.0 11.500000 3.1817873240e+00
2960 W_thpi 10.0 11.550000 3.1817866702e+00
2961 W_thpi 10.0 11.600000 3.1817860381e+00
2962 W_thpi 10.0 11.650000 3.1817854274e+00
2963 W_thpi 10.0 11.700000 3.1817848374e+00
2964 W_thpi 10.0 11.750000 3.1817842678e+00
2965 W_thpi 10.0 11.800000 3.1817837180e+00
2966 W_thpi 10.0 11.850000 3.1817831877e+00
2967 W_thpi 10.0 11.900000 3.1817826764e+00
2968 W_thpi 10.0 11.950000 3.1817821838e+00
2969 W_thpi 10.0 12.000000 3.1817817093e+00
2970 W_thpi 10.0 12.050000 3.1817812525e+00
2971 W_thpi 10.0 12.100000 3.1817808132e+00
2972 W_thpi 10.0 12.150000 3.1817803909e+00
2973 W_thpi 10.0 12.200000 3.1817799853e+00
2974 W_thpi 10.0 12.250000 3.1817795959e+00
2975 W_thpi 10.0 12.300000 3.1817792224e+00
2976 W_thpi 10.0 12.350000 3.1817788645e+00
2977 W_thpi 10.0 12.400000 3.1817785218e+00
2978 W_thpi 10.0 12.450000 3.1817781940e+00
2979 W_thpi 10.0 12.500000 3.1817778807e+00
2980 W_thpi 10.0 12.550000 3.1817775817e+00
2981 W_thpi 10.0 12.600000 3.1817772966e+00
2982 W_thpi 10.0 12.650000 3.1817770251e+00
2983 W_thpi 10.0 12.700000 3.1817767670e+00
2984 W_thpi 10.0 12.750000 3.1817765219e+00
2985 W_thpi 10.0 12.800000 3.1817762895e+00
2986 W_thpi 10.0 12.850000 3.1817760695e+00
2987 W_thpi 10.0 12.900000 3.1817758618e+00
2988 W_thpi 10.0 12.950000 3.1817756660e+00
2989 W_thpi 10.0 13.000000 3.1817754818e+00
2990 W_thpi 10.0 13.050000 3.1817753090e+00
2991 W_thpi 10.0 13.100000 3.1817751474e+00
2992 W_thpi 10.0 13.150000 3.1817749967e+00
2993 W_thpi 10.0 13.200000 3.1817748566e+00
2994 W_thpi 10.0 13.250000 3.1817747270e+00
2995 W_thpi 10.0 13.300000 3.1817746076e+00
2996 W_thpi 10.0 13.350000 3.1817744981e+00
2997 W_thpi 10.0 13.400000 3.1817743984e+00
2998 W_thpi 10.0 13.450000 3.1817743083e+00
2999 W_thpi 10.0 13.500000 3.1817742274e+00
3000 W_thpi 10.0 13.550000 3.1817741557e+00
3001 W_thpi 10.0 13.600000 3.1817740929e+00

E-016-herglotz-fine-structure.json — 3.0 KB, updated 08-18-2026

JSON sidecar (click to expand)
{
  "experiment": "E-016",
  "task": "Q-S3c: Herglotz fine structure of W at theta=pi vs F",
  "description": "Poisson-smoothed zero density -(1/pi) Im W'/W(iy) at theta=pi (and theta=0 control) vs rho_F; analytic Galerkin z-derivative; zero-Poisson reconstruction cross-check",
  "script": "research/numerics/scripts/E-016-herglotz-fine-structure.py",
  "parameters": {
    "a_sweep": [
      4.0,
      6.0,
      8.0,
      10.0
    ],
    "h": 0.01,
    "lambda": -1.0,
    "y_grid": [
      0.5,
      20.0,
      391
    ],
    "z_max_zeros": 300.0
  },
  "checks": {
    "V1_plateau_density": true,
    "V2_rhoF_finitediff": true,
    "V3_poisson_reconstruction": false,
    "V4_vmirror_symmetry": true
  },
  "key_values": {
    "xi_flint_crosscheck_rel": 8.821833278620677e-17,
    "rhoF_finitediff_max_rel": 1.3322584092623682e-08,
    "metrics": {
      "4.0": {
        "n_zeros": 381,
        "z1": 1.1260734006983593,
        "plateau": 1.2713747663068067,
        "density_a_over_pi": 1.2732395447351628,
        "plateau_rel_dev": 0.0014645935527740487,
        "v3_rel": 0.32451368257591473,
        "kappa_shift": -0.21982980149584136,
        "d_pi": 1.2200734562385358,
        "d_zero": 1.2165204320831793
      },
      "6.0": {
        "n_zeros": 572,
        "z1": 0.7499016225074712,
        "plateau": 1.9083309455490012,
        "density_a_over_pi": 1.909859317102744,
        "plateau_rel_dev": 0.00080025347419903,
        "v3_rel": 0.2938167612479611,
        "kappa_shift": -0.39086861455767985,
        "d_pi": 1.855357135046592,
        "d_zero": 1.8529753375094085
      },
      "8.0": {
        "n_zeros": 763,
        "z1": 0.5621012628096893,
        "plateau": 2.5451204974114527,
        "density_a_over_pi": 2.5464790894703255,
        "plateau_rel_dev": 0.0005335178539225225,
        "v3_rel": 0.2792472337188209,
        "kappa_shift": -0.5618837715660804,
        "d_pi": 2.4914430957151077,
        "d_zero": 2.489482228965594
      },
      "10.0": {
        "n_zeros": 954,
        "z1": 0.44959700551214055,
        "plateau": 3.1817851862991344,
        "density_a_over_pi": 3.183098861837907,
        "plateau_rel_dev": 0.00041270334218086014,
        "v3_rel": 0.27086948306792724,
        "kappa_shift": -0.7328752211905654,
        "d_pi": 3.127620084707738,
        "d_zero": 3.126136732274815
      }
    },
    "vmirror_sym_err": 3.797860165317667e-14
  },
  "caveats": [
    "Galerkin discretization h=0.01 (E-010 h-convergence: z1 rel drift 4e-4 between h=0.01 and 0.005 at a=4)",
    "Poisson smoothing at height y averages over scale ~y: lattice oscillations at spacing pi/a are suppressed ~e^{-2ay}; the sensitive region is y <~ few (low zeros resolve individually)",
    "theta=pi vs theta=0 comparison is the sharp test of the H4 read-off (D-023): if theta=pi is correct, d_pi should lie systematically below d_zero as a grows"
  ],
  "elapsed_seconds": 32.7,
  "timestamp_utc": "2026-08-18T10:57:35.113504+00:00",
  "row_count": 3520
}

Source code

Python script (click to expand)
"""E-016 — Q-S3c: Herglotz (Poisson) fine structure of W at theta=pi vs F.

Theory (D-023 §4, item 3): for entire W with ALL REAL zeros z_j,
  -Im(W'/W)(iy) = -Im(kappa) + sum_j y/(y^2 + z_j^2)
is (pi times) the Poisson-smoothed zero density at height y. Individual
zeros within |z_j| <~ y leave distinguishable fingerprints, so this
diagnostic detects sub-lattice-scale zero redistribution BEFORE the
density collapses (Cor 1.6 requires the a->inf zeros to become the
gamma_j / xi'-zeros of F = z^2 xi(1/2-iz)/xi'(1/2-iz)).

For F on the imaginary axis (z = iy, s = 1/2+y real):
  rho_F(y) := -(1/pi) Im F'/F(iy)
           = (1/pi)[ 2/y + xi'/xi(1/2+y) - xi''/xi'(1/2+y) ].
Equivalently rho_F(y) = (1/pi) d/dy log|F(iy)|  (finite-diff check V2).

Diagnostics per a in {4,6,8,10} (h=0.01, lambda=-1, theta=pi; theta=0
control):
  D1. rho_W(y; a, pi) on y in [0.5, 20] via the ANALYTIC z-derivative of
      the Galerkin Fourier representation (no finite differences):
        V(z)  = hat(z) sum c_j e^{i z x_j}
        V'(z) = hat'(z) sum c_j e^{i z x_j} + hat(z) sum (i x_j) c_j e^{i z x_j}
        W(z)  = (z-i) Vp + e^{i theta} (z+i) Vm   (and z-derivative).
  D2. rho_F(y) analytic; cross-checked vs finite differences of
      log|F(iy)| (V2).
  D3. Zero-Poisson reconstruction: zeros of W(.,pi) located on the real
      axis (|W|-minima polished); rho from the Poisson sum must match D1
      up to the additive constant -Im(kappa)/pi (mean-matched over the
      window) — validates the derivative machinery (V3).
  D4. Metrics vs a: plateau value vs a/pi (density law); L2 distance
      d(a,theta) = ||rho_W - rho_F|| on [1,20] (theta=pi vs theta=0 —
      does theta=pi actually sharpen the approach?); oscillation
      envelope of rho_W at small y.

Checks:
  V1. plateau: |mean rho_W(y in [10,20]) - a/pi| / (a/pi) < 0.05.
  V2. rho_F analytic vs finite-diff of log|F|: max rel dev < 1e-6.
  V3. Poisson reconstruction from located zeros matches D1 (mean-matched
      L2 / rms < 0.02).
  V4. mirror symmetry v-(x) = v+(-x) rel err < 1e-6 (machinery regression).

Outputs: research/numerics/data/E-016-herglotz-fine-structure.csv (+ .json)
"""
import json
import sys
import time
from datetime import datetime, timezone
from pathlib import Path

import mpmath as mp
import numpy as np
import scipy.linalg
import scipy.optimize
from numpy.polynomial.legendre import leggauss

REPO = Path(__file__).resolve().parents[3]
DATA = REPO / "research" / "numerics" / "data"
CSV = DATA / "E-016-herglotz-fine-structure.csv"
JSON = DATA / "E-016-herglotz-fine-structure.json"

T_MAXG = 20.0            # sieve to e^20 covers 2a <= 20 (a <= 10)
T_LERCH = 0.05
GL_N = 8
A_SWEEP = [4.0, 6.0, 8.0, 10.0]
H_MAIN = 0.01
LAM_SHIFT = -1.0
Y_GRID = np.linspace(0.5, 20.0, 391)
Y_PLATEAU = (10.0, 20.0)
Z_MAX_ZERO = 300.0
N_GRID = 40000


# ---------------------------------------------------------- g (as E-014)
def mangoldt_sieve_fast(n_max: int) -> np.ndarray:
    is_comp = np.zeros(n_max + 1, dtype=bool)
    for p in range(2, int(n_max ** 0.5) + 1):
        if not is_comp[p]:
            is_comp[p * p::p] = True
    lam_log = np.zeros(n_max + 1)
    primes = np.flatnonzero(~is_comp[2:]) + 2
    lp = np.log(primes)
    pk = primes.copy()
    while pk.size and pk[0] <= n_max:
        lam_log[pk] = lp
        pk = pk * primes[: pk.size]
        keep = pk <= n_max
        pk = pk[keep]
        lp = lp[keep]
    return lam_log


print("sieving von Mangoldt to e^20 ...", flush=True)
t_sv = time.time()
N_MAXG = int(np.exp(T_MAXG)) + 2
LAM_LOG = mangoldt_sieve_fast(N_MAXG)
NS = np.arange(2, N_MAXG + 1, dtype=np.float64)
LAM = LAM_LOG[2:] / np.sqrt(NS)
LOG_NS = np.log(NS)
C1 = np.cumsum(LAM)
C0 = np.cumsum(LAM * LOG_NS)
del LAM, LOG_NS, NS
print(f"  sieve done: {time.time()-t_sv:.0f}s", flush=True)

mp.mp.dps = 30
DIG_COEFF = float(-(mp.digamma(mp.mpf(1) / 4) - mp.log(mp.pi)) / 2)
PHI1 = float(mp.lerchphi(1, 2, mp.mpf(1) / 4))
KK = np.arange(0, 400)
DENOM = (KK + 0.25) ** 2


def prime_sum_vec(t):
    m = np.floor(np.exp(t) + 1e-9).astype(np.int64) - 1
    out = np.zeros_like(t)
    pos = m > 0
    idx = m[pos] - 1
    out[pos] = C1[idx] * t[pos] - C0[idx]
    return out


def lerch_comb(t):
    out = np.empty_like(t)
    fast = t > T_LERCH
    if fast.any():
        z = np.exp(-2.0 * t[fast])
        phi = (np.power.outer(z, KK) / DENOM).sum(axis=1)
        out[fast] = -0.25 * (PHI1 - np.exp(-t[fast] / 2) * phi)
    if (~fast).any():
        for i in np.flatnonzero(~fast):
            ti = mp.mpf(float(t[i]))
            out[i] = float(-0.25 * (mp.lerchphi(1, 2, mp.mpf(1) / 4)
                                    - mp.exp(-ti / 2)
                                    * mp.lerchphi(mp.exp(-2 * ti), 2,
                                                  mp.mpf(1) / 4)))
    return out


def g_float(t):
    t = np.asarray(t, dtype=float)
    g = -4.0 * (np.exp(t / 2) + np.exp(-t / 2) - 2.0)
    g += prime_sum_vec(t)
    g += DIG_COEFF * t
    g += lerch_comb(t)
    g[t == 0.0] = 0.0
    return g


A_CONST = 0.5 * (np.log(2 * np.pi) + np.euler_gamma - 1.0)


def sigma_vec(t):
    t = np.asarray(t, dtype=float)
    with np.errstate(divide="ignore", invalid="ignore"):
        return np.where(t > 0, 0.5 * t * np.log(t) + A_CONST * t, 0.0)


def F_sing(t):
    if t <= 0:
        return 0.0
    return (A_CONST * t**3 / 6.0 + t**3 * np.log(t) / 12.0
            - 5.0 * t**3 / 72.0)


def S_sing(k, h):
    return (F_sing((k + 1) * h) - 2.0 * F_sing(k * h)
            + F_sing(abs(k - 1) * h))


XN, XW = leggauss(GL_N)


def S_full(k, h):
    def quad_plain(lo, hi, peak):
        tot = 0.0
        for a, b in ((lo, peak), (peak, hi)):
            if b - a <= 0:
                continue
            mid, half = 0.5 * (a + b), 0.5 * (b - a)
            xs = mid + half * XN
            rho = g_float(xs) - sigma_vec(xs)
            tot += half * float(np.dot(XW, (h - np.abs(xs - peak)) * rho))
        return tot

    def quad(lo, hi, peak):
        n_lo = int(np.ceil(np.exp(lo)))
        n_hi = int(np.floor(np.exp(hi)))
        if n_hi - n_lo > 64:
            return quad_plain(lo, hi, peak)
        pts = sorted({lo, peak, hi} |
                     {float(np.log(n))
                      for n in range(max(n_lo, 2), n_hi + 1)
                      if lo < np.log(n) < hi})
        tot = 0.0
        for p0, p1 in zip(pts, pts[1:]):
            if p1 - p0 <= 0:
                continue
            mid, half = 0.5 * (p0 + p1), 0.5 * (p1 - p0)
            xs = mid + half * XN
            rho = g_float(xs) - sigma_vec(xs)
            tot += half * float(np.dot(XW, (h - np.abs(xs - peak)) * rho))
        return tot

    if k == 0:
        return S_sing(0, h) + 2.0 * quad(0.0, h, 0.0)
    return S_sing(k, h) + quad((k - 1) * h, (k + 1) * h, k * h)


def stiffness_first_col(n_elem, h):
    n_q = n_elem - 1
    s = np.array([S_full(k, h) for k in range(n_elem)])
    q = np.empty(n_q)
    q[0] = (2.0 * s[0] - 2.0 * s[1]) / h**2
    for k in range(1, n_q):
        q[k] = (2.0 * s[k] - s[k + 1] - s[k - 1]) / h**2
    return q


_BUILD = {}


def build(a, h):
    if (a, h) in _BUILD:
        return _BUILD[(a, h)]
    n_elem = int(round(2 * a / h))
    n = n_elem - 1
    q = stiffness_first_col(n_elem, h)
    Q = scipy.linalg.toeplitz(q)
    M = scipy.linalg.toeplitz(np.r_[2 * h / 3, h / 6,
                                    np.zeros(max(n - 2, 0))])
    ii = np.arange(1, n_elem)
    x = -a + ii * h
    xg, wg = leggauss(8)
    b = {}
    for sgn in (+1.0, -1.0):
        mid1 = x - h / 2
        xs1 = mid1[:, None] + (h / 2) * xg[None, :]
        phi1 = (xs1 - (x - h)[:, None]) / h
        mid2 = x + h / 2
        xs2 = mid2[:, None] + (h / 2) * xg[None, :]
        phi2 = ((x + h)[:, None] - xs2) / h
        b[sgn] = ((h / 2) * (np.exp(sgn * xs1) * phi1) @ wg
                  + (h / 2) * (np.exp(sgn * xs2) * phi2) @ wg)
    _BUILD[(a, h)] = (x, h, Q, M, b)
    return _BUILD[(a, h)]


def solve_v(Q, M, b_s, lam, n):
    T = Q - lam * M
    e = np.ones(n)
    B = np.zeros((n + 1, n + 1))
    B[:n, :n] = T
    B[:n, n] = e
    B[n, :n] = e
    sol = scipy.linalg.solve(B, np.r_[b_s, 0.0], assume_a="sym")
    return sol[:n], T


# ------------------------------------------- V(z), V'(z), W(z), W'(z)
def hat_FT(z, h):
    return h * np.sinc(z * h / (2 * np.pi)) ** 2


def hat_FT_d(z, h):
    """d/dz [h sinc(zh/2pi)^2], sinc(x)=sin(pi x)/(pi x)."""
    u = z * h / 2.0
    s = np.sinc(z * h / (2 * np.pi))          # sin(u)/u
    with np.errstate(divide="ignore", invalid="ignore"):
        ds = np.where(np.abs(u) > 1e-8,
                      (u * np.cos(u) - np.sin(u)) / u**2,
                      -u / 3.0)
    return h**2 * s * ds                      # d/dz[h s^2] = h^2 s ds/du


def V_and_dV(z, c, x, h):
    E = np.exp(1j * np.outer(z, x))
    S1 = E @ c
    S2 = (1j * x * E) @ c
    return hat_FT(z, h) * S1, hat_FT_d(z, h) * S1 + hat_FT(z, h) * S2


def W_and_dW(z, Vp, dVp, Vm, dVm, theta):
    eit = np.exp(1j * theta)
    W = (z - 1j) * Vp + eit * (z + 1j) * Vm
    dW = Vp + (z - 1j) * dVp + eit * (Vm + (z + 1j) * dVm)
    return W, dW


# --------------------------------------------------------------- F side
def xi_real(s):
    s = mp.mpf(s)
    if s == 1:                       # xi(1) = 1/2 (removable: zeta pole
        return mp.mpf(0.5)           # cancels the (s-1) factor)
    return 0.5 * s * (s - 1) * mp.pi ** (-s / 2) * mp.gamma(s / 2) * mp.zeta(s)


mp.mp.dps = 40


def rho_F_analytic(y):
    """rho_F(y) = (1/pi)[2/y + xi'/xi(1/2+y) - xi''/xi'(1/2+y)]."""
    s = mp.mpf(0.5) + mp.mpf(y)
    f = lambda t: xi_real(t)
    x0 = xi_real(s)
    x1 = mp.diff(f, s)
    x2 = mp.diff(f, s, 2)
    return float((2.0 / mp.mpf(y) + x1 / x0 - x2 / x1) / mp.pi)


def logabs_F_imag(y):
    s = mp.mpf(0.5) + mp.mpf(y)
    xiv = xi_real(s)
    dx = mp.diff(xi_real, s)
    return mp.log(abs(-mp.mpf(y) ** 2 * xiv / dx))


def main() -> int:
    if CSV.exists() and "--force" not in sys.argv:
        print(f"cached: {CSV} (use --force to recompute)")
        return 0
    t0 = time.time()

    # ---- F side
    print("F side: rho_F analytic + finite-diff cross-check ...", flush=True)
    # flint cross-check of xi_real (mpmath zeta is broken beyond ~16-19
    # digits in this env; E-014 verified 1e-8 at s=2.5,10.5 — extend to
    # the y-range endpoints used here)
    import flint
    flint.ctx.prec = 200
    def xi_flint(s):
        aa = flint.arb(str(s))
        return float(0.5 * aa * (aa - 1) * (aa / 2).gamma()
                     * flint.arb.pi() ** (-aa / 2) * aa.zeta())
    xi_err = float(max(abs(xi_real(s) - xi_flint(s)) / abs(xi_flint(s))
                       for s in (1.5, 10.5, 20.5)))  # s=1: arb zeta pole
                                                     # (xi(1)=1/2 exact)
    print(f"  xi vs flint max rel err: {xi_err:.2e}", flush=True)
    rhoF = np.array([rho_F_analytic(y) for y in Y_GRID])
    dlogF = np.array([
        float((logabs_F_imag(mp.mpf(y) + mp.mpf(1e-4))
               - logabs_F_imag(mp.mpf(y) - mp.mpf(1e-4))) / mp.mpf(2e-4))
        for y in Y_GRID]) / np.pi
    rel = np.abs(rhoF - dlogF) / np.maximum(np.abs(rhoF), 1e-12)
    v2_err = float(rel.max())
    print(f"  V2 finite-diff max rel dev: {v2_err:.2e}", flush=True)

    rows = []
    for y, r in zip(Y_GRID, rhoF):
        rows.append(f"F,{y:.6f},{r:.10e}")

    sym_err = 0.0
    metrics = {}
    for a in A_SWEEP:
        print(f"a={a}: solve v±, Herglotz densities ...", flush=True)
        x, hh, Q, M, b = build(a, H_MAIN)
        n = len(x)
        cp, T = solve_v(Q, M, b[+1.0], LAM_SHIFT, n)
        cm, _ = solve_v(Q, M, b[-1.0], LAM_SHIFT, n)
        np_ = float(cp @ T @ cp)
        nm = float(cm @ T @ cm)
        cm = cm * np.sqrt(np_ / nm)
        sym_err = max(sym_err,
                      float(np.max(np.abs(cm - cp[::-1]))
                            / max(1.0, float(np.max(np.abs(cp))))))

        ziy = 1j * Y_GRID
        Vp, dVp = V_and_dV(ziy, cp, x, hh)
        Vm, dVm = V_and_dV(ziy, cm, x, hh)

        out = {}
        for th, tag in ((np.pi, "pi"), (0.0, "zero")):
            W, dW = W_and_dW(ziy, Vp, dVp, Vm, dVm, th)
            rhoW = -np.imag(dW / W) / np.pi
            out[tag] = rhoW
            for y, r in zip(Y_GRID, rhoW):
                rows.append(f"W_th{tag},{a},{y:.6f},{r:.10e}")

        # ---- zeros of W(., pi) on the real axis (for V3)
        # c = sqrt(np_/nm) = 1 exactly (mirror symmetry), so for real z,
        # Vm = conj(Vp) and W(z) = 2i*g(z) with the REAL gauge
        # g(z) = z Im Vp - Re Vp. Zeros = sign changes of g -> brentq.
        assert abs(np_ / nm - 1.0) < 1e-12, "norm asymmetry breaks gauge"
        zg = np.linspace(1e-3, Z_MAX_ZERO, N_GRID)
        Vpr, _ = V_and_dV(zg, cp, x, hh)
        g = zg * Vpr.imag - Vpr.real

        def g_direct(zz):
            V = hat_FT(np.array([zz]), hh)[0] * complex(
                np.exp(1j * zz * x) @ cp)
            return zz * V.imag - V.real

        idx = np.flatnonzero(np.sign(g[:-1]) * np.sign(g[1:]) < 0)
        zeros = []
        for i in idx:
            try:
                zeros.append(scipy.optimize.brentq(g_direct, zg[i],
                                                   zg[i + 1], xtol=1e-13,
                                                   rtol=1e-13))
            except ValueError:
                pass
        zeros = np.array(zeros)

        # V3: Poisson reconstruction (+- symmetric located zeros to
        # Z_MAX_ZERO + Euler-Maclaurin lattice tail beyond, spacing pi/a,
        # phase matched to last located zero; mean-matched vs analytic).
        d_lat = np.pi / a
        z_last = zeros[-1] + d_lat / 2.0
        recon = np.empty_like(Y_GRID)
        for k, y in enumerate(Y_GRID):
            tail = (y / d_lat) * (np.pi / 2.0 - np.arctan(z_last / y))
            recon[k] = (2.0 * (np.sum(y / (y**2 + zeros**2)) + tail)) / np.pi
        rhoW = out["pi"]
        shift = float(np.mean(rhoW - recon))
        rms = float(np.sqrt(np.mean(rhoW**2)))
        v3_rel = float(np.sqrt(np.mean((rhoW - recon - shift)**2)) / rms)

        # D4 metrics
        pm = (Y_GRID >= Y_PLATEAU[0]) & (Y_GRID <= Y_PLATEAU[1])
        plateau = float(np.mean(rhoW[pm]))
        dens = a / np.pi
        sel = Y_GRID >= 1.0
        d_pi = float(np.sqrt(np.mean((out["pi"][sel] - rhoF[sel])**2)))
        d_zero = float(np.sqrt(np.mean((out["zero"][sel] - rhoF[sel])**2)))
        metrics[a] = {
            "n_zeros": len(zeros), "z1": float(zeros[0]) if len(zeros) else None,
            "plateau": plateau, "density_a_over_pi": dens,
            "plateau_rel_dev": abs(plateau - dens) / dens,
            "v3_rel": v3_rel, "kappa_shift": shift,
            "d_pi": d_pi, "d_zero": d_zero,
        }
        print(f"  zeros={len(zeros)} z1={metrics[a]['z1']:.4f} "
              f"plateau={plateau:.4f} (a/pi={dens:.4f}) "
              f"V3 rel={v3_rel:.2e} d_pi={d_pi:.4f} d_zero={d_zero:.4f}",
              flush=True)

    checks = {
        "V1_plateau_density": bool(all(
            metrics[a]["plateau_rel_dev"] < 0.05 for a in A_SWEEP)),
        "V2_rhoF_finitediff": bool(v2_err < 1e-6),
        "V3_poisson_reconstruction": bool(all(
            metrics[a]["v3_rel"] < 0.02 for a in A_SWEEP)),
        "V4_vmirror_symmetry": bool(sym_err < 1e-6),
    }

    with CSV.open("w", encoding="utf-8", newline="") as f:
        f.write("series,a,y,rho\n")
        for r in rows:
            parts = r.split(",")
            if parts[0] == "F":
                f.write(f"F,-,{parts[1]},{parts[2]}\n")
            else:
                f.write(f"{parts[0]},{parts[1]},{parts[2]},{parts[3]}\n")

    meta = {
        "experiment": "E-016",
        "task": "Q-S3c: Herglotz fine structure of W at theta=pi vs F",
        "description": "Poisson-smoothed zero density -(1/pi) Im W'/W(iy) "
                       "at theta=pi (and theta=0 control) vs rho_F; "
                       "analytic Galerkin z-derivative; zero-Poisson "
                       "reconstruction cross-check",
        "script": "research/numerics/scripts/E-016-herglotz-fine-structure.py",
        "parameters": {"a_sweep": A_SWEEP, "h": H_MAIN, "lambda": LAM_SHIFT,
                       "y_grid": [0.5, 20.0, 391], "z_max_zeros": Z_MAX_ZERO},
        "checks": checks,
        "key_values": {
            "xi_flint_crosscheck_rel": xi_err,
            "rhoF_finitediff_max_rel": v2_err,
            "metrics": {str(a): metrics[a] for a in A_SWEEP},
            "vmirror_sym_err": sym_err,
        },
        "caveats": [
            "Galerkin discretization h=0.01 (E-010 h-convergence: z1 rel "
            "drift 4e-4 between h=0.01 and 0.005 at a=4)",
            "Poisson smoothing at height y averages over scale ~y: lattice "
            "oscillations at spacing pi/a are suppressed ~e^{-2ay}; the "
            "sensitive region is y <~ few (low zeros resolve individually)",
            "theta=pi vs theta=0 comparison is the sharp test of the H4 "
            "read-off (D-023): if theta=pi is correct, d_pi should lie "
            "systematically below d_zero as a grows",
        ],
        "elapsed_seconds": round(time.time() - t0, 1),
        "timestamp_utc": datetime.now(timezone.utc).isoformat(),
        "row_count": None,
    }
    meta["row_count"] = sum(1 for _ in CSV.open())
    JSON.write_text(json.dumps(meta, indent=2), encoding="utf-8")
    ok = all(checks.values())
    print(f"wrote {CSV.name}, {JSON.name} — "
          f"{'ALL CHECKS PASS' if ok else 'CHECK FAILURE: ' + str(checks)}")
    return 0 if ok else 1


if __name__ == "__main__":
    raise SystemExit(main())