Created
December 28, 2025 02:59
-
-
Save BrianMartell/97ec8bf83a1060de856ebfe292980b2e to your computer and use it in GitHub Desktop.
PUH-BrianMartell puh_exact_scale_ratio_dh_simulation.py-Updated New Py Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| # PUH v25: Exact Scale Ratio D_H Sim — Cover Count vs Scale (Power-Law Exact r_scale ~0.1315) | |
| scale = np.logspace(-1, 1, 500) # Scale r arb. 0.1 to 10 | |
| r_scale = 0.1315 # Exact derived | |
| D_h = np.log(240) / np.log(1/r_scale) # ~2.7 | |
| N_puh = scale**(-D_h) # Power-law count | |
| plt.figure(figsize=(10,6)) | |
| plt.loglog(scale, N_puh, label='PUH Exact D_H ~2.7 Nesting Count', color='cyan', lw=2) | |
| plt.axvline(r_scale, color='gold', ls='--', label='Exact Scale Ratio r_{scale} ~0.1315') | |
| plt.xlabel('Scale r (arb.)'); plt.ylabel('Cover Count N(r) (arb.)') | |
| plt.title('PUH v25: Exact Scale Ratio for D_H Sim') | |
| plt.legend(); plt.grid(alpha=0.3) | |
| plt.tight_layout() | |
| plt.savefig('puh_exact_scale_ratio_dh_simulation.png', dpi=300) | |
| plt.show() | |
| print(f"Exact D_H ~ {D_h:.3f} at r_scale ~ {r_scale:.4f} — nesting convergence.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment