Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
enstools-feature
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
Christoph.Fischer
enstools-feature
Commits
5cb106c2
Commit
5cb106c2
authored
3 years ago
by
Christoph.Fischer
Browse files
Options
Downloads
Patches
Plain Diff
fixed graph output
parent
b3439fdd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
enstools/feature/identification/african_easterly_waves/plotting.py
+4
-0
4 additions, 0 deletions
...feature/identification/african_easterly_waves/plotting.py
enstools/feature/tracking/tracking.py
+21
-16
21 additions, 16 deletions
enstools/feature/tracking/tracking.py
with
25 additions
and
16 deletions
enstools/feature/identification/african_easterly_waves/plotting.py
0 → 100644
+
4
−
0
View file @
5cb106c2
def
plot_from_desc
(
graph_desc
):
return
None
\ No newline at end of file
This diff is collapsed.
Click to expand it.
enstools/feature/tracking/tracking.py
+
21
−
16
View file @
5cb106c2
...
...
@@ -89,9 +89,6 @@ class TrackingTechnique(ABC):
self
.
postprocess
(
object_desc
)
# only postprocess object desc, THEN to graph
# TODO next link pairs together to "path"
# track then has N-list of IDs
# TODO what if tracks are the identification? e.g. AEW identification in Hovmoller
pass
...
...
@@ -106,20 +103,28 @@ class TrackingTechnique(ABC):
self
.
graph
=
self
.
pb_reference
.
DatasetDescription
()
self
.
graph
.
CopyFrom
(
object_desc
)
for
c
in
connections
:
# TODO this over the weekend, prepare case studies in met3d -> Montag AF -> Di Pres.
obj_con
=
self
.
pb_reference
.
ObjectConnection
()
start
,
end
=
c
.
n1
,
c
.
n2
obj_con
.
n1
.
time
=
obj_set
.
timesteps
[
start
.
time_index
].
valid_time
obj_with_startid
=
\
[
objindex
for
objindex
,
obj
in
enumerate
(
obj_set
.
timesteps
[
start
.
time_index
].
objects
)
if
obj
.
id
==
start
.
object_id
][
0
]
obj_con
.
n1
.
object
.
CopyFrom
(
obj_set
.
timesteps
[
start
.
time_index
].
objects
[
obj_with_startid
])
obj_con
.
n2
.
time
=
obj_set
.
timesteps
[
end
.
time_index
].
valid_time
obj_with_endid
=
[
objindex
for
objindex
,
obj
in
enumerate
(
obj_set
.
timesteps
[
end
.
time_index
].
objects
)
if
for
set_idx
,
objdesc_set
in
enumerate
(
object_desc
.
sets
):
graph_set
=
self
.
graph
.
sets
[
set_idx
]
# empty the graph set
del
graph_set
.
timesteps
[:]
graph_set
.
ref_graph
.
Clear
()
# refg
for
c
in
objdesc_set
.
ref_graph
.
connections
:
obj_con
=
self
.
pb_reference
.
ObjectConnection
()
start
,
end
=
c
.
n1
,
c
.
n2
obj_con
.
n1
.
time
=
objdesc_set
.
timesteps
[
start
.
time_index
].
valid_time
obj_with_startid
=
\
[
objindex
for
objindex
,
obj
in
enumerate
(
objdesc_set
.
timesteps
[
start
.
time_index
].
objects
)
if
obj
.
id
==
start
.
object_id
][
0
]
obj_con
.
n1
.
object
.
CopyFrom
(
objdesc_set
.
timesteps
[
start
.
time_index
].
objects
[
obj_with_startid
])
obj_con
.
n2
.
time
=
objdesc_set
.
timesteps
[
end
.
time_index
].
valid_time
obj_with_endid
=
[
objindex
for
objindex
,
obj
in
enumerate
(
objdesc_set
.
timesteps
[
end
.
time_index
].
objects
)
if
obj
.
id
==
end
.
object_id
][
0
]
obj_con
.
n2
.
object
.
CopyFrom
(
obj_set
.
timesteps
[
end
.
time_index
].
objects
[
obj_with_endid
])
obj_con
.
n2
.
object
.
CopyFrom
(
obj
desc
_set
.
timesteps
[
end
.
time_index
].
objects
[
obj_with_endid
])
graph_set
.
object_graph
.
connections
.
append
(
obj_con
)
graph_set
.
object_graph
.
connections
.
append
(
obj_con
)
return
self
.
graph
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