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
928af3d1
Commit
928af3d1
authored
4 years ago
by
Thomas Juerges
Browse files
Options
Downloads
Patches
Plain Diff
Correct handling of incoming arrays
parent
9c403090
No related branches found
No related tags found
1 merge request
!2
Refactor for Paulus' pypcc2 version with arrays
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
RCUSCC/RCUSCC/RCUSCC.py
+16
-15
16 additions, 15 deletions
RCUSCC/RCUSCC/RCUSCC.py
with
16 additions
and
15 deletions
RCUSCC/RCUSCC/RCUSCC.py
+
16
−
15
View file @
928af3d1
...
@@ -378,7 +378,7 @@ class RCUSCC(Device):
...
@@ -378,7 +378,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_mask_R
(
self
):
def
read_RCU_mask_R
(
self
):
"""
Return the RCU_mask_R attribute.
"""
"""
Return the RCU_mask_R attribute.
"""
self
.
_RCU_mask_R
=
numpy
.
array
(
[
self
.
attribute_mapping
[
"
RCU_mask_R
"
].
get_value
()
]
)
self
.
_RCU_mask_R
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_mask_R
"
].
get_value
())
return
self
.
_RCU_mask_R
return
self
.
_RCU_mask_R
@only_when_on
@only_when_on
...
@@ -398,7 +398,7 @@ class RCUSCC(Device):
...
@@ -398,7 +398,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_Ant_mask_R
(
self
):
def
read_Ant_mask_R
(
self
):
"""
Return the Ant_mask_R attribute.
"""
"""
Return the Ant_mask_R attribute.
"""
value
=
numpy
.
array
(
[
self
.
attribute_mapping
[
"
Ant_mask_R
"
].
get_value
()
]
)
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
Ant_mask_R
"
].
get_value
())
self
.
_Ant_mask_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
self
.
_Ant_mask_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_Ant_mask_R
return
self
.
_Ant_mask_R
...
@@ -420,7 +420,7 @@ class RCUSCC(Device):
...
@@ -420,7 +420,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_attenuator_R
(
self
):
def
read_RCU_attenuator_R
(
self
):
"""
Return the RCU_attenuator_R attribute.
"""
"""
Return the RCU_attenuator_R attribute.
"""
value
=
numpy
.
array
(
[
self
.
attribute_mapping
[
"
RCU_attenuator_R
"
].
get_value
()
]
)
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_attenuator_R
"
].
get_value
())
self
.
_RCU_attenuator_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
self
.
_RCU_attenuator_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_RCU_attenuator_R
return
self
.
_RCU_attenuator_R
...
@@ -442,7 +442,7 @@ class RCUSCC(Device):
...
@@ -442,7 +442,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_band_R
(
self
):
def
read_RCU_band_R
(
self
):
"""
Return the RCU_band_R attribute.
"""
"""
Return the RCU_band_R attribute.
"""
value
=
numpy
.
array
(
[
self
.
attribute_mapping
[
"
RCU_band_R
"
].
get_value
()
]
)
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_band_R
"
].
get_value
())
self
.
_RCU_band_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
self
.
_RCU_band_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_RCU_band_R
return
self
.
_RCU_band_R
...
@@ -464,21 +464,21 @@ class RCUSCC(Device):
...
@@ -464,21 +464,21 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_temperature_R
(
self
):
def
read_RCU_temperature_R
(
self
):
"""
Return the RCU_temperature_R attribute.
"""
"""
Return the RCU_temperature_R attribute.
"""
self
.
_RCU_temperature_R
=
self
.
attribute_mapping
[
"
RCU_temperature_R
"
].
get_value
()
self
.
_RCU_temperature_R
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_temperature_R
"
].
get_value
()
)
return
self
.
_RCU_temperature_R
return
self
.
_RCU_temperature_R
@only_when_on
@only_when_on
@fault_on_error
@fault_on_error
def
read_RCU_Pwr_dig_R
(
self
):
def
read_RCU_Pwr_dig_R
(
self
):
"""
Return the RCU_Pwr_dig_R attribute.
"""
"""
Return the RCU_Pwr_dig_R attribute.
"""
self
.
_RCU_Pwr_dig_R
=
self
.
attribute_mapping
[
"
RCU_Pwr_dig_R
"
].
get_value
()
self
.
_RCU_Pwr_dig_R
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_Pwr_dig_R
"
].
get_value
()
)
return
self
.
_RCU_Pwr_dig_R
return
self
.
_RCU_Pwr_dig_R
@only_when_on
@only_when_on
@fault_on_error
@fault_on_error
def
read_RCU_LED0_R
(
self
):
def
read_RCU_LED0_R
(
self
):
"""
Return the RCU_LED0_R attribute.
"""
"""
Return the RCU_LED0_R attribute.
"""
self
.
_RCU_LED0_R
=
self
.
attribute_mapping
[
"
RCU_LED0_R
"
].
get_value
()
self
.
_RCU_LED0_R
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_LED0_R
"
].
get_value
()
)
return
self
.
_RCU_LED0_R
return
self
.
_RCU_LED0_R
@only_when_on
@only_when_on
...
@@ -498,7 +498,7 @@ class RCUSCC(Device):
...
@@ -498,7 +498,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_ADC_lock_R
(
self
):
def
read_RCU_ADC_lock_R
(
self
):
"""
Return the RCU_ADC_lock_R attribute.
"""
"""
Return the RCU_ADC_lock_R attribute.
"""
value
=
numpy
.
array
(
[
self
.
attribute_mapping
[
"
RCU_ADC_lock_R
"
].
get_value
()
]
)
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_ADC_lock_R
"
].
get_value
())
self
.
_RCU_ADC_lock_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
self
.
_RCU_ADC_lock_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_RCU_ADC_lock_R
return
self
.
_RCU_ADC_lock_R
...
@@ -506,7 +506,7 @@ class RCUSCC(Device):
...
@@ -506,7 +506,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_ADC_SYNC_R
(
self
):
def
read_RCU_ADC_SYNC_R
(
self
):
"""
Return the RCU_ADC_SYNC_R attribute.
"""
"""
Return the RCU_ADC_SYNC_R attribute.
"""
value
=
numpy
.
array
(
[
self
.
attribute_mapping
[
"
RCU_ADC_SYNC_R
"
].
get_value
()
]
)
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_ADC_SYNC_R
"
].
get_value
())
self
.
_RCU_ADC_SYNC_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
self
.
_RCU_ADC_SYNC_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_RCU_ADC_SYNC_R
return
self
.
_RCU_ADC_SYNC_R
...
@@ -514,7 +514,7 @@ class RCUSCC(Device):
...
@@ -514,7 +514,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_ADC_JESD_R
(
self
):
def
read_RCU_ADC_JESD_R
(
self
):
"""
Return the RCU_ADC_JESD_R attribute.
"""
"""
Return the RCU_ADC_JESD_R attribute.
"""
value
=
numpy
.
array
(
[
self
.
attribute_mapping
[
"
RCU_ADC_JESD_R
"
].
get_value
()
]
)
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_ADC_JESD_R
"
].
get_value
())
self
.
_RCU_ADC_JESD_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
self
.
_RCU_ADC_JESD_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_RCU_ADC_JESD_R
return
self
.
_RCU_ADC_JESD_R
...
@@ -522,7 +522,7 @@ class RCUSCC(Device):
...
@@ -522,7 +522,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_ADC_CML_R
(
self
):
def
read_RCU_ADC_CML_R
(
self
):
"""
Return the RCU_ADC_CML_R attribute.
"""
"""
Return the RCU_ADC_CML_R attribute.
"""
value
=
numpy
.
array
(
[
self
.
attribute_mapping
[
"
RCU_ADC_CML_R
"
].
get_value
()
]
)
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_ADC_CML_R
"
].
get_value
())
self
.
_RCU_ADC_CML_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
self
.
_RCU_ADC_CML_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_RCU_ADC_CML_R
return
self
.
_RCU_ADC_CML_R
...
@@ -530,7 +530,7 @@ class RCUSCC(Device):
...
@@ -530,7 +530,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_OUT1_R
(
self
):
def
read_RCU_OUT1_R
(
self
):
"""
Return the RCU_OUT1_R attribute.
"""
"""
Return the RCU_OUT1_R attribute.
"""
value
=
self
.
attribute_mapping
[
"
RCU_OUT1_R
"
].
get_value
()
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_OUT1_R
"
].
get_value
()
)
self
.
_RCU_OUT1_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
self
.
_RCU_OUT1_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_RCU_OUT1_R
return
self
.
_RCU_OUT1_R
...
@@ -538,7 +538,7 @@ class RCUSCC(Device):
...
@@ -538,7 +538,7 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_OUT2_R
(
self
):
def
read_RCU_OUT2_R
(
self
):
"""
Return the RCU_OUT2_R attribute.
"""
"""
Return the RCU_OUT2_R attribute.
"""
value
=
self
.
attribute_mapping
[
"
RCU_OUT2_R
"
].
get_value
()
value
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_OUT2_R
"
].
get_value
()
)
self
.
_RCU_OUT2_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
self
.
_RCU_OUT2_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_RCU_OUT2_R
return
self
.
_RCU_OUT2_R
...
@@ -546,14 +546,15 @@ class RCUSCC(Device):
...
@@ -546,14 +546,15 @@ class RCUSCC(Device):
@fault_on_error
@fault_on_error
def
read_RCU_ID_R
(
self
):
def
read_RCU_ID_R
(
self
):
"""
Return the RCU_ID_R attribute.
"""
"""
Return the RCU_ID_R attribute.
"""
self
.
_RCU_ID_R
=
self
.
attribute_mapping
[
"
RCU_ID_R
"
].
get_value
()
self
.
_RCU_ID_R
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_ID_R
"
].
get_value
()
)
return
self
.
_RCU_ID_R
return
self
.
_RCU_ID_R
@only_when_on
@only_when_on
@fault_on_error
@fault_on_error
def
read_RCU_version_R
(
self
):
def
read_RCU_version_R
(
self
):
"""
Return the RCU_version_R attribute.
"""
"""
Return the RCU_version_R attribute.
"""
self
.
_RCU_version_R
=
self
.
attribute_mapping
[
"
RCU_version_R
"
].
get_value
()
value
=
self
.
_RCU_version_R
=
numpy
.
array
(
self
.
attribute_mapping
[
"
RCU_version_R
"
].
get_value
())
self
.
_RCU_version_R
=
numpy
.
split
(
value
,
indices_or_sections
=
32
)
return
self
.
_RCU_version_R
return
self
.
_RCU_version_R
@only_when_on
@only_when_on
...
...
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