Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioroboticslab
robofish
io
Commits
806075f6
Commit
806075f6
authored
2 years ago
by
Andi Gerken
Browse files
Options
Downloads
Patches
Plain Diff
Fixed minibug
parent
a634650c
No related branches found
No related tags found
1 merge request
!44
Added robofish-io-fix-switches
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conversion_scripts/convert_from_csv.py
+0
-6
0 additions, 6 deletions
src/conversion_scripts/convert_from_csv.py
with
0 additions
and
6 deletions
src/conversion_scripts/convert_from_csv.py
+
0
−
6
View file @
806075f6
...
...
@@ -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
)
:
.
2
f
}
vs
\t
{
np
.
min
(
switch_distances_sum
[
0
])
:
.
2
f
}
"
)
...
...
@@ -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])}"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment