Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
skais
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Raphael Sturgis
skais
Merge requests
!13
Draft: Develop
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Open
Draft: Develop
develop
into
main
Overview
0
Commits
34
Pipelines
0
Changes
2
Open
Draft: Develop
Raphael Sturgis
requested to merge
develop
into
main
Apr 7, 2022
Overview
0
Commits
34
Pipelines
0
Changes
2
Improvements:
Normalization using AIS_Points now raise exception if given a bad dictionary
New features:
Added choosing fields for generating images for adding channels
Added centering of image on last point
Added chosing bounding box of image
Added selecting range of values for features
Edited
Apr 8, 2022
by
Raphael Sturgis
0
0
Merge request reports
Viewing commit
f77ecf10
Prev
Next
Show latest version
2 files
+
37
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
f77ecf10
recreated bug
· f77ecf10
Raphael
authored
Apr 12, 2022
skais/tests/ais/test_ais_trajectory.py
+
36
−
0
View file @ f77ecf10
Edit in single-file editor
Open in Web IDE
Show full file
@@ -616,3 +616,39 @@ class TestAISTrajectoryImageGeneration(unittest.TestCase):
[
0.25
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0.25
,
0.5
]])
/
2
np
.
testing
.
assert_array_equal
(
result
,
expected
)
def
test_generate_array_from_positions_with_line_multi_channel_dict
(
self
):
trajectory
=
AISTrajectory
(
pd
.
DataFrame
(
{
"
latitude
"
:
[
0
,
10
,
0
,
20
],
"
longitude
"
:
[
0
,
10
,
20
,
20
],
"
ts_sec
"
:
[
i
for
i
in
range
(
4
)],
"
sog
"
:
[
10
,
10
,
20
,
40
],
"
cog
"
:
[
40
,
20
,
10
,
10
]
}
)
)
result
=
trajectory
.
generate_array_from_positions
(
height
=
9
,
width
=
18
,
link
=
True
,
bounding_box
=
'
fit
'
,
features
=
{
'
sog
'
:
(
0
,
40
),
'
cog
'
:
(
0
,
40
)},
node_size
=
2
)
expected
=
np
.
array
([[[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.5
,
0.25
]],
[[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.5
,
0.25
]],
[[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.5
,
0.25
]],
[[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.5
,
0.25
]],
[[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.25
,
1
],
[
0.25
,
0.5
],
[
0.25
,
0.5
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.5
,
0.25
]],
[[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.25
,
1
],
[
0.25
,
1
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.25
,
0.5
],
[
0.25
,
0.5
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.5
,
0.25
]],
[[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.25
,
1
],
[
0.25
,
1
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.25
,
0.5
],
[
0.25
,
0.5
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.5
,
0.25
]],
[[
0
,
0
],
[
0.25
,
1
],
[
0.25
,
1
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.25
,
0.5
],
[
0.25
,
0.5
],
[
0
,
0
],
[
0.5
,
0.25
]],
[[
0.25
,
1
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0
,
0
],
[
0.25
,
0.5
],
[
0.5
,
0.25
]]])
np
.
testing
.
assert_array_equal
(
result
,
expected
)
\ No newline at end of file
Loading