@@ -132,7 +132,7 @@ def get_heatmap_data(trajectory: List[Dict[str, float]],
132
132
tvt_min : int ,
133
133
tvt_max : int ,
134
134
bins : int
135
- ) -> Tuple [Any , Any , Any ]:
135
+ ) -> Tuple [Any , Any , Any , float , float ]:
136
136
x , y = [], []
137
137
138
138
for i in range (filter_window , len (x_log ) - 1 - filter_window ):
@@ -166,7 +166,7 @@ def get_heatmap_data(trajectory: List[Dict[str, float]],
166
166
for j in range (bins ):
167
167
histogram2d [i ][j ] = histogram2d [i ][j ] / max_val
168
168
169
- return histogram2d , xedges2 , yedges2
169
+ return histogram2d , xedges2 , yedges2 , x [ - 1 ], y [ - 1 ]
170
170
171
171
172
172
def get_horizon_scatters (xedges2 : Any ,
@@ -207,6 +207,20 @@ def get_horizon_scatters(xedges2: Any,
207
207
return data
208
208
209
209
210
+ def get_last_rop_point_scatter (last_x : float , last_y : float ) -> go .Scatter :
211
+ return go .Scatter (
212
+ x = [last_x , ],
213
+ y = [last_y , ],
214
+ mode = 'markers' ,
215
+ marker = {
216
+ 'color' : 'White' ,
217
+ 'size' : 20 ,
218
+ 'line' : {'width' : 2 , 'color' : 'Red' },
219
+ },
220
+ showlegend = False
221
+ )
222
+
223
+
210
224
def refine_log_points (log_points : List [Dict [str , Any ]]) -> List [Dict [str , Any ]]:
211
225
return [point for point in log_points if point ['data' ] is not None ]
212
226
@@ -252,7 +266,7 @@ def build_tvt_rop_heatmap(script_settings: Dict[str, Any]):
252
266
253
267
# start plotting
254
268
data = []
255
- histogram2d , xedges2 , yedges2 = get_heatmap_data (
269
+ histogram2d , xedges2 , yedges2 , last_x , last_y = get_heatmap_data (
256
270
trajectory = trajectory ,
257
271
filter_window = filter_window ,
258
272
x_log = refine_log_points (x_log .to_dict ()['points' ]),
@@ -270,6 +284,10 @@ def build_tvt_rop_heatmap(script_settings: Dict[str, Any]):
270
284
zero_horizon_uuid = interpretation_data ['meta' ]['properties' ]['zero_horizon_uuid' ]
271
285
)
272
286
data .extend (horizon_scatters )
287
+
288
+ last_rop_point_scatter = get_last_rop_point_scatter (last_x , last_y )
289
+ data .append (last_rop_point_scatter )
290
+
273
291
layout = go .Layout (
274
292
font = {'size' : 16 },
275
293
yaxis = {
0 commit comments