Threadbourne commited on
Commit
9ac02cf
·
verified ·
1 Parent(s): 5d06efa

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +18 -2
src/streamlit_app.py CHANGED
@@ -78,9 +78,21 @@ synth_band = make_band(df_synth)
78
 
79
  import plotly.graph_objects as go
80
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  Z = np.vstack([
82
- human_band[0], # row 0
83
- synth_band[0] # row 1
84
  ])
85
 
86
  fig = go.Figure(go.Heatmap(
@@ -97,5 +109,9 @@ fig.update_layout(
97
  xaxis=dict(title="Normalized Interaction Time"),
98
  yaxis=dict(showticklabels=False),
99
  )
 
 
 
 
100
  st.plotly_chart(fig, use_container_width=True)
101
 
 
78
 
79
  import plotly.graph_objects as go
80
 
81
+ human_interp = np.interp(
82
+ t_common,
83
+ df_human["t_norm"].values,
84
+ human_band[0]
85
+ )
86
+
87
+ synth_interp = np.interp(
88
+ t_common,
89
+ df_synth["t_norm"].values,
90
+ synth_band[0]
91
+ )
92
+
93
  Z = np.vstack([
94
+ human_interp,
95
+ synth_interp
96
  ])
97
 
98
  fig = go.Figure(go.Heatmap(
 
109
  xaxis=dict(title="Normalized Interaction Time"),
110
  yaxis=dict(showticklabels=False),
111
  )
112
+
113
+ COMMON_LEN = 500
114
+ t_common = np.linspace(0, 1, COMMON_LEN)
115
+
116
  st.plotly_chart(fig, use_container_width=True)
117