Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
LOFAR2.0
tango
Commits
909640a2
Commit
909640a2
authored
2 years ago
by
Stefano Di Frischia
Committed by
Corné Lukken
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-572
: complete annotations
parent
f9db4011
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!396
Resolve L2SS-572 "Refactor delays"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/beam/delays.py
+4
-3
4 additions, 3 deletions
tangostationcontrol/tangostationcontrol/beam/delays.py
with
4 additions
and
3 deletions
tangostationcontrol/tangostationcontrol/beam/delays.py
+
4
−
3
View file @
909640a2
...
@@ -2,7 +2,7 @@ import casacore.measures
...
@@ -2,7 +2,7 @@ import casacore.measures
import
numpy
import
numpy
import
datetime
import
datetime
def
subtract
(
a
,
b
):
def
subtract
(
a
,
b
)
->
numpy
.
ndarray
:
return
numpy
.
array
([
x
-
y
for
x
,
y
in
zip
(
a
,
b
)])
return
numpy
.
array
([
x
-
y
for
x
,
y
in
zip
(
a
,
b
)])
...
@@ -54,7 +54,8 @@ class Delays:
...
@@ -54,7 +54,8 @@ class Delays:
# Return array [directions][angles]
# Return array [directions][angles]
return
direction_vectors
.
T
return
direction_vectors
.
T
def
is_valid_direction
(
self
,
direction
):
def
is_valid_direction
(
self
,
direction
)
->
bool
:
"""
Check validity of the direction measure
"""
try
:
try
:
_
=
self
.
measure
.
direction
(
*
direction
)
_
=
self
.
measure
.
direction
(
*
direction
)
except
(
RuntimeError
,
TypeError
)
as
e
:
except
(
RuntimeError
,
TypeError
)
as
e
:
...
@@ -62,7 +63,7 @@ class Delays:
...
@@ -62,7 +63,7 @@ class Delays:
return
True
return
True
def
delays
(
self
,
direction
,
antenna_absolute_itrf
:
list
([
float
])):
def
delays
(
self
,
direction
,
antenna_absolute_itrf
:
list
([
float
]))
->
numpy
.
ndarray
:
"""
Get the delays for a direction and *absolute* antenna positions.
"""
Get the delays for a direction and *absolute* antenna positions.
Returns delays[antenna].
"""
Returns delays[antenna].
"""
...
...
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