Spaces:
Build error
Build error
Victoria Oberascher
commited on
Commit
·
a946f7d
1
Parent(s):
d1e5cf8
remove duplicated definition
Browse files- horizonmetrics.py +0 -23
horizonmetrics.py
CHANGED
@@ -164,29 +164,6 @@ def calculate_horizon_error_across_sequence(slope_error_list,
|
|
164 |
return sequence_results
|
165 |
|
166 |
|
167 |
-
def xy_points_to_slope_midpoint(xy_points):
|
168 |
-
"""
|
169 |
-
Given two points, return the slope and midpoint of the line
|
170 |
-
|
171 |
-
Args:
|
172 |
-
xy_points: list of two points, each point is a list of two elements
|
173 |
-
Points are in the form of [x, y], where x and y are normalized to [0, 1]
|
174 |
-
|
175 |
-
Returns:
|
176 |
-
slope: Slope of the line
|
177 |
-
midpoint : Midpoint is in the form of [x,y], and is also normalized to [0, 1]
|
178 |
-
"""
|
179 |
-
|
180 |
-
x1, y1, x2, y2 = xy_points[0][0], xy_points[0][1], xy_points[1][
|
181 |
-
0], xy_points[1][1]
|
182 |
-
slope = (y2 - y1) / (x2 - x1)
|
183 |
-
|
184 |
-
midpoint_x = 0.5
|
185 |
-
midpoint_y = slope * (0.5 - x1) + y1
|
186 |
-
midpoint = [midpoint_x, midpoint_y]
|
187 |
-
return slope, midpoint
|
188 |
-
|
189 |
-
|
190 |
def calculate_horizon_error(annotated_horizon, proposed_horizon):
|
191 |
"""
|
192 |
Calculate the error between the annotated horizon and the proposed horizon
|
|
|
164 |
return sequence_results
|
165 |
|
166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
def calculate_horizon_error(annotated_horizon, proposed_horizon):
|
168 |
"""
|
169 |
Calculate the error between the annotated horizon and the proposed horizon
|