Skip to content
Snippets Groups Projects
Commit 806075f6 authored by Andi Gerken's avatar Andi Gerken
Browse files

Fixed minibug

parent a634650c
No related branches found
No related tags found
1 merge request!44Added robofish-io-fix-switches
......@@ -90,7 +90,6 @@ def handle_switches(poses, supress=None):
poses[t - 1] = np.nan
if supress is None or t not in supress:
distances = get_distances(poses[t], last_poses)
switches = {}
......@@ -101,7 +100,6 @@ def handle_switches(poses, supress=None):
if len(switches) > 0 or np.any(
np.isnan(poses[t]) != np.isnan(poses[t - 1])
):
switch_distances = np.array(
[
get_distances(poses[t, con_perm], last_poses, diagonal=True)
......@@ -124,7 +122,6 @@ def handle_switches(poses, supress=None):
if np.argmin(switch_distances_sum) != 0:
if distances_switched * 1.5 < distances_normal:
print(
f"Switch: {connections} distance sum\t{np.min(switch_distances_sum):.2f} vs\t{np.min(switch_distances_sum[0]):.2f}"
)
......@@ -147,7 +144,6 @@ def handle_file(file, args):
if args.columns_per_entity is None:
all_col_types_matching = []
for cols in range(1, len(pf.columns) // 2 + 1):
dt = np.array(pf.dtypes, dtype=str)
# print(dt)
......@@ -262,8 +258,6 @@ def handle_file(file, args):
if all_switches is not None:
iof.attrs["switches"] = all_switches
iof.attrs["switches"] = all_switches
# assert np.all(
# poses[np.logical_not(np.isnan(poses[:, 0])), 0] >= 0
# ), f"Error: x coordinate is not positive, {np.min(poses[:, 0])}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment