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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
076dd69f
Commit
076dd69f
authored
8 months ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
typing
parent
48a9e41a
No related branches found
No related tags found
1 merge request
!996
L2SS-2017: Fix rounding of input samples delay
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/common/calibration.py
+6
-11
6 additions, 11 deletions
...ostationcontrol/tangostationcontrol/common/calibration.py
with
6 additions
and
11 deletions
tangostationcontrol/tangostationcontrol/common/calibration.py
+
6
−
11
View file @
076dd69f
...
@@ -218,7 +218,7 @@ class CalibrationManager:
...
@@ -218,7 +218,7 @@ class CalibrationManager:
)
)
def
delay_compensation
(
delays_seconds
:
numpy
.
ndarray
,
clock
:
int
):
def
delay_compensation
(
delays_seconds
:
numpy
.
ndarray
,
clock
:
int
)
->
numpy
.
ndarray
:
"""
Return the delay compensation required to line up
"""
Return the delay compensation required to line up
signals that are delayed by
"
delays
"
seconds. The returned values
signals that are delayed by
"
delays
"
seconds. The returned values
are the delay to apply, in samples (coarse) and remaining seconds
are the delay to apply, in samples (coarse) and remaining seconds
...
@@ -249,7 +249,7 @@ def delay_compensation(delays_seconds: numpy.ndarray, clock: int):
...
@@ -249,7 +249,7 @@ def delay_compensation(delays_seconds: numpy.ndarray, clock: int):
# as we shift all of them to obtain a non-negative delay.
# as we shift all of them to obtain a non-negative delay.
input_delays_samples
=
numpy
.
round
(
input_delays_samples
=
numpy
.
round
(
max
(
signal_delays_samples
)
-
signal_delays_samples
max
(
signal_delays_samples
)
-
signal_delays_samples
)
)
.
astype
(
numpy
.
int32
)
return
input_delays_samples
return
input_delays_samples
...
@@ -317,7 +317,7 @@ def calibrate_RCU_attenuator_dB(antenna_field: DeviceProxy):
...
@@ -317,7 +317,7 @@ def calibrate_RCU_attenuator_dB(antenna_field: DeviceProxy):
antenna_field
.
RCU_attenuator_dB_RW
=
rcu_attenuator_db
.
astype
(
numpy
.
int64
)
antenna_field
.
RCU_attenuator_dB_RW
=
rcu_attenuator_db
.
astype
(
numpy
.
int64
)
def
loss_compensation
(
losses_dB
:
numpy
.
ndarray
):
def
loss_compensation
(
losses_dB
:
numpy
.
ndarray
)
->
numpy
.
ndarray
:
"""
Return the attenuation required to line up
"""
Return the attenuation required to line up
signals that are dampened by
"
lossed_dB
"
decibel.
signals that are dampened by
"
lossed_dB
"
decibel.
...
@@ -331,14 +331,9 @@ def loss_compensation(losses_dB: numpy.ndarray):
...
@@ -331,14 +331,9 @@ def loss_compensation(losses_dB: numpy.ndarray):
in losses_dB. So we do _not_ fully dampen towards the weakest signal.
in losses_dB. So we do _not_ fully dampen towards the weakest signal.
"""
"""
# NB: signal_* are the amount of loss the signal obtained in our processing
# chain, while input_* are the amount of (dampening) attenuation to apply
# to compensate.
# compute the coarse correction, in samples
signal_attenuation_integer_dB
=
numpy
.
round
(
losses_dB
).
astype
(
numpy
.
uint32
)
# correct for the coarse loss by dampening the signals to line up.
# correct for the coarse loss by dampening the signals to line up.
input_attenuation_integer_dB
=
numpy
.
round
(
numpy
.
max
(
losses_dB
)
-
losses_dB
)
input_attenuation_integer_dB
=
numpy
.
round
(
numpy
.
max
(
losses_dB
)
-
losses_dB
).
astype
(
numpy
.
int32
)
return
input_attenuation_integer_dB
return
input_attenuation_integer_dB
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