Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
resolve
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
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
ift
resolve
Commits
5346f981
Commit
5346f981
authored
4 years ago
by
Philipp Arras
Browse files
Options
Downloads
Patches
Plain Diff
Less overhead during data loading
parent
8c4d1d3e
No related branches found
No related tags found
No related merge requests found
Pipeline
#109337
passed
4 years ago
Stage: build_docker
Stage: testing
Stage: release
Stage: deploy
Changes
1
Pipelines
6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
resolve/data/observation.py
+1
-2
1 addition, 2 deletions
resolve/data/observation.py
with
1 addition
and
2 deletions
resolve/data/observation.py
+
1
−
2
View file @
5346f981
...
@@ -325,7 +325,7 @@ class Observation(BaseObservation):
...
@@ -325,7 +325,7 @@ class Observation(BaseObservation):
@staticmethod
@staticmethod
def
load
(
file_name
,
lo_hi_index
=
None
):
def
load
(
file_name
,
lo_hi_index
=
None
):
dct
=
dict
(
np
.
load
(
file_name
)
)
dct
=
np
.
load
(
file_name
)
antpos
=
[]
antpos
=
[]
for
ii
in
range
(
4
):
for
ii
in
range
(
4
):
val
=
dct
[
f
"
antpos
{
ii
}
"
]
val
=
dct
[
f
"
antpos
{
ii
}
"
]
...
@@ -335,7 +335,6 @@ class Observation(BaseObservation):
...
@@ -335,7 +335,6 @@ class Observation(BaseObservation):
pol
=
Polarization
.
from_list
(
dct
[
"
polarization
"
])
pol
=
Polarization
.
from_list
(
dct
[
"
polarization
"
])
direction
=
Direction
.
from_list
(
dct
[
"
direction
"
])
direction
=
Direction
.
from_list
(
dct
[
"
direction
"
])
slc
=
slice
(
None
)
if
lo_hi_index
is
None
else
slice
(
*
lo_hi_index
)
slc
=
slice
(
None
)
if
lo_hi_index
is
None
else
slice
(
*
lo_hi_index
)
# FIXME Put barrier here that makes sure that only one full Observation is loaded at a time
return
Observation
(
return
Observation
(
AntennaPositions
.
from_list
(
antpos
),
AntennaPositions
.
from_list
(
antpos
),
dct
[
"
vis
"
][...,
slc
],
dct
[
"
vis
"
][...,
slc
],
...
...
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