Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
navipy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olivier Bertrand
navipy
Commits
576f3d35
Commit
576f3d35
authored
6 years ago
by
Olivier Bertrand
Browse files
Options
Downloads
Patches
Plain Diff
Move columns for posorient and vel in trajectories
parent
3b8a0ac3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
navipy/database/__init__.py
+1
-0
1 addition, 0 deletions
navipy/database/__init__.py
navipy/processing/test_opticflow.py
+2
-2
2 additions, 2 deletions
navipy/processing/test_opticflow.py
navipy/trajectories/__init__.py
+23
-2
23 additions, 2 deletions
navipy/trajectories/__init__.py
with
26 additions
and
4 deletions
navipy/database/__init__.py
+
1
−
0
View file @
576f3d35
...
...
@@ -195,6 +195,7 @@ class DataBase():
WHERE (rowid=?)
"""
.
format
(
tablename
),
(
rowid
,))
self
.
__viewing_dir
=
self
.
db_cursor
.
fetchone
()[
0
]
self
.
__viewing_dir
=
np
.
round
(
self
.
__viewing_dir
,
decimals
=
3
)
return
self
.
__viewing_dir
.
copy
()
@viewing_directions.setter
...
...
This diff is collapsed.
Click to expand it.
navipy/processing/test_opticflow.py
+
2
−
2
View file @
576f3d35
...
...
@@ -2,8 +2,8 @@ import unittest
from
navipy.processing
import
mcode
import
pandas
as
pd
import
numpy
as
np
from
navipy.
moving.agent
import
posorient_columns
from
navipy.
moving.agent
import
velocities_columns
from
navipy.
trajectories
import
posorient_columns
from
navipy.
trajectories
import
velocities_columns
from
navipy.scene
import
__spherical_indeces__
...
...
This diff is collapsed.
Click to expand it.
navipy/trajectories/__init__.py
+
23
−
2
View file @
576f3d35
...
...
@@ -20,9 +20,30 @@ from scipy.interpolate import CubicSpline
import
warnings
def
posorient_columns
(
convention
):
toreturn
=
[(
'
location
'
,
'
x
'
),
(
'
location
'
,
'
y
'
),
(
'
location
'
,
'
z
'
)]
if
convention
==
'
quaternion
'
:
for
a
in
range
(
4
):
toreturn
.
append
((
convention
,
'
q_{}
'
.
format
(
a
)))
else
:
for
a
in
range
(
3
):
toreturn
.
append
((
convention
,
'
alpha_{}
'
.
format
(
a
)))
return
toreturn
def
velocities_columns
(
convention
):
toreturn
=
[]
# Prepend d on dimention for derivative
for
it1
,
it2
in
posorient_columns
(
convention
):
toreturn
.
append
((
it1
,
'
d
'
+
it2
))
return
toreturn
def
_markers2position
(
x
,
kwargs
):
mark0
=
pd
.
Series
(
x
[:
3
],
index
=
[
'
x
'
,
'
y
'
,
'
z
'
])
mark1
=
pd
.
Series
(
x
[
3
:
6
],
index
=
[
'
x
'
,
'
y
'
,
'
z
'
])
mark0
=
pd
.
Series
(
x
[:
3
],
index
=
[
'
x
'
,
'
y
'
,
'
z
'
])
mark1
=
pd
.
Series
(
x
[
3
:
6
],
index
=
[
'
x
'
,
'
y
'
,
'
z
'
])
mark2
=
pd
.
Series
(
x
[
6
:],
index
=
[
'
x
'
,
'
y
'
,
'
z
'
])
triangle_mode
=
kwargs
[
'
triangle_mode
'
]
euler_axes
=
kwargs
[
'
euler_axes
'
]
...
...
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