Skip to content

Instantly share code, notes, and snippets.

@BrianMartell
Created December 5, 2025 20:35
Show Gist options
  • Select an option

  • Save BrianMartell/e0b11474815f035df3e319c0bea06e60 to your computer and use it in GitHub Desktop.

Select an option

Save BrianMartell/e0b11474815f035df3e319c0bea06e60 to your computer and use it in GitHub Desktop.
PUH-BrianMartell PUH_v6_Hubble_Tension_Sim.py- Updated New Py Code
import numpy as np
import matplotlib.pyplot as plt
H0_cmb = 67
delta_H = 0.09
H_fast = H0_cmb * (1 + delta_H/2)
H_slow = H0_cmb * (1 - delta_H/2)
print(f"Fast hemisphere: {H_fast:.1f} km/s/Mpc")
print(f"Slow hemisphere: {H_slow:.1f} km/s/Mpc")
# Mock sky map
theta = np.linspace(0, np.pi, 100)
H_map = H0_cmb * (1 + delta_H * np.cos(theta))
plt.figure(figsize=(8,5))
plt.plot(np.rad2deg(theta), H_map, 'b-')
plt.axhline(73, color='r', ls='--', label='Local')
plt.axhline(67, color='k', ls=':', label='CMB average')
plt.xlabel('Angle from fast pole (deg)')
plt.ylabel('H(z=0) (km/s/Mpc)')
plt.title('PUH v6: Dipolar Hubble Tension')
plt.legend()
plt.grid(True)
plt.savefig('puh_hubble_tension.png', dpi=300)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment