RFTSystems commited on
Commit
ff00ded
·
verified ·
1 Parent(s): 29db842

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -7
app.py CHANGED
@@ -5,7 +5,6 @@ from plotly.subplots import make_subplots
5
  from scipy.integrate import quad
6
 
7
  # --- MASTER RFT/RCQM PARAMETERS ---
8
- # Omega_f removed because H_RFT does not accept it
9
  MASTER_PARAMS = {
10
  'p1_e': -0.5976, 'p2_e': 4.8900,
11
  'p1_l': -3.1239, 'p2_l': 3.1852,
@@ -19,7 +18,6 @@ def H_RFT(z, p1_e, p2_e, p1_l, p2_l, nex_c, t_z, H0):
19
  curr_p2 = p2_e * s + p2_l * (1.0 - s)
20
 
21
  tau = 1.0 * (1 + curr_p1 * z + curr_p2 * np.log(1.0 + z))
22
-
23
  h_sum = sum(np.sin(z * n * 212.76) / n for n in range(4, 12))
24
 
25
  return np.maximum(H0 * (1.0 - (tau - 1.0)) * (1.0 + nex_c * h_sum), 1.0)
@@ -46,11 +44,13 @@ def rft_rcqm_unification_lab(p1_early_input, p2_early_input, nex_coupling_input)
46
 
47
  z_range = np.linspace(0, 15, 200)
48
  h_vals = [H_RFT(z, **params) for z in z_range]
49
-
50
  age_z13 = compute_age(13.67, params)
51
 
 
52
  fig = make_subplots(
53
- rows=1, cols=2,
 
 
54
  subplot_titles=('Unified Expansion (H_RFT)', 'JWST Maturity Solution')
55
  )
56
 
@@ -80,18 +80,23 @@ def rft_rcqm_unification_lab(p1_early_input, p2_early_input, nex_coupling_input)
80
  row=1, col=2
81
  )
82
 
 
83
  fig.update_layout(
84
  template='plotly_dark',
85
  showlegend=False,
86
- height=500,
87
  title_text=f'RFT Unified Frame Lab — Age at z=13.67: {age_z13:.2f} Myr'
88
  )
89
 
 
 
 
 
 
90
  fig.update_xaxes(title_text='Redshift z', row=1, col=1)
91
  fig.update_xaxes(title_text='Redshift z', row=1, col=2)
92
- fig.update_yaxes(title_text='H(z) [km/s/Mpc]', row=1, col=1, type='log')
93
- fig.update_yaxes(title_text='log10 SMD', row=1, col=2)
94
 
 
95
  horizon_ratio = 490.71
96
  status = "VERIFIED" if abs(age_z13 - 568.78) < 1.0 else "UNSTABLE"
97
 
 
5
  from scipy.integrate import quad
6
 
7
  # --- MASTER RFT/RCQM PARAMETERS ---
 
8
  MASTER_PARAMS = {
9
  'p1_e': -0.5976, 'p2_e': 4.8900,
10
  'p1_l': -3.1239, 'p2_l': 3.1852,
 
18
  curr_p2 = p2_e * s + p2_l * (1.0 - s)
19
 
20
  tau = 1.0 * (1 + curr_p1 * z + curr_p2 * np.log(1.0 + z))
 
21
  h_sum = sum(np.sin(z * n * 212.76) / n for n in range(4, 12))
22
 
23
  return np.maximum(H0 * (1.0 - (tau - 1.0)) * (1.0 + nex_c * h_sum), 1.0)
 
44
 
45
  z_range = np.linspace(0, 15, 200)
46
  h_vals = [H_RFT(z, **params) for z in z_range]
 
47
  age_z13 = compute_age(13.67, params)
48
 
49
+ # --- FIXED LAYOUT: wider, taller, non-overlapping ---
50
  fig = make_subplots(
51
+ rows=1,
52
+ cols=2,
53
+ column_widths=[0.65, 0.35], # left panel wider
54
  subplot_titles=('Unified Expansion (H_RFT)', 'JWST Maturity Solution')
55
  )
56
 
 
80
  row=1, col=2
81
  )
82
 
83
+ # --- CLEAN LAYOUT FIXES ---
84
  fig.update_layout(
85
  template='plotly_dark',
86
  showlegend=False,
87
+ height=800, # increased height to prevent overlap
88
  title_text=f'RFT Unified Frame Lab — Age at z=13.67: {age_z13:.2f} Myr'
89
  )
90
 
91
+ # Control log-scale range to avoid insane stretching
92
+ fig.update_yaxes(title_text='H(z) [km/s/Mpc]', row=1, col=1,
93
+ type='log', range=[0, 6]) # 10^0 → 10^6
94
+
95
+ fig.update_yaxes(title_text='log10 SMD', row=1, col=2)
96
  fig.update_xaxes(title_text='Redshift z', row=1, col=1)
97
  fig.update_xaxes(title_text='Redshift z', row=1, col=2)
 
 
98
 
99
+ # Metrics
100
  horizon_ratio = 490.71
101
  status = "VERIFIED" if abs(age_z13 - 568.78) < 1.0 else "UNSTABLE"
102