Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Reinecke
ducc
Commits
1ae2b83c
Commit
1ae2b83c
authored
Sep 11, 2020
by
Philipp Arras
Browse files
Use only relevant weights and flags
parent
a9cf3437
Pipeline
#82023
passed with stages
in 12 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/demos/wgridder_bench.py
View file @
1ae2b83c
...
...
@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2019 Max-Planck-Society
# Copyright(C) 2019
-2020
Max-Planck-Society
from
time
import
time
...
...
@@ -60,12 +60,12 @@ def read_ms(name):
tvis
=
np
.
sum
(
tvis
[:,
:,
ind
],
axis
=
2
)
vis
[
start
:
stop
,
:]
=
tvis
if
fullwgt
:
twgt
=
t
.
getcol
(
"WEIGHT_SPECTRUM"
,
startrow
=
start
,
nrow
=
stop
-
start
)
twgt
=
t
.
getcol
(
"WEIGHT_SPECTRUM"
,
startrow
=
start
,
nrow
=
stop
-
start
)
[:,
:,
ind
]
wgt
[
start
:
stop
,
:]
=
1
/
np
.
sum
(
1
/
twgt
,
axis
=
2
)
else
:
twgt
=
t
.
getcol
(
"WEIGHT"
,
startrow
=
start
,
nrow
=
stop
-
start
)
twgt
=
t
.
getcol
(
"WEIGHT"
,
startrow
=
start
,
nrow
=
stop
-
start
)
[:,
:,
ind
]
wgt
[
start
:
stop
]
=
1
/
np
.
sum
(
1
/
twgt
,
axis
=
1
)
tflags
=
t
.
getcol
(
'FLAG'
,
startrow
=
start
,
nrow
=
stop
-
start
)
tflags
=
t
.
getcol
(
'FLAG'
,
startrow
=
start
,
nrow
=
stop
-
start
)
[:,
:,
ind
]
flags
[
start
:
stop
,
:]
=
np
.
any
(
tflags
.
astype
(
np
.
bool
),
axis
=
2
)
start
=
stop
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment