Skip to content
GitLab
Explore
Sign in
Register
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
c4cbba79
Commit
c4cbba79
authored
3 years ago
by
Jasper Annyas
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-357
:Corrected error in recv-sim Dockerfile and adjusted notebook
parent
9ff1ed54
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!134
Resolve L2SS-357 "Rename pcc to recv"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker-compose/recv-sim/Dockerfile
+1
-1
1 addition, 1 deletion
docker-compose/recv-sim/Dockerfile
jupyter-notebooks/RECV_notebook.ipynb
+66
-200
66 additions, 200 deletions
jupyter-notebooks/RECV_notebook.ipynb
with
67 additions
and
201 deletions
docker-compose/recv-sim/Dockerfile
+
1
−
1
View file @
c4cbba79
...
...
@@ -6,5 +6,5 @@ RUN apt-get update && apt-get install -y python3 python3-pip python3-yaml git &&
pip3
install
-r
requirements.txt
&&
\
git clone
--depth
1
--branch
master https://git.astron.nl/lofar2.0/pypcc
WORKDIR
/
recv
WORKDIR
/
pypcc
CMD
["python3","pypcc2.py","--simulator"]
This diff is collapsed.
Click to expand it.
jupyter-notebooks/RECV_notebook.ipynb
+
66
−
200
View file @
c4cbba79
...
...
@@ -17,29 +17,22 @@
"metadata": {},
"outputs": [],
"source": [
"d=DeviceProxy(\"LTS/
SDP
/1\")"
"d=DeviceProxy(\"LTS/
RECV
/1\")"
]
},
{
"cell_type": "code",
"execution_count":
5
,
"execution_count":
4
,
"id": "ranking-aluminum",
"metadata": {
"scrolled": false
},
"outputs": [
{
"ename": "ConnectionFailed",
"evalue": "DevFailed[\nDevError[\n desc = TRANSIENT CORBA system exception: TRANSIENT_NoUsableProfile\n origin = Connection::connect\n reason = API_CorbaException\nseverity = ERR]\n\nDevError[\n desc = Failed to connect to device lts/sdp/1\n origin = Connection::connect\n reason = API_CantConnectToDevice\nseverity = ERR]\n]",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mConnectionFailed\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/tmp/ipykernel_21/3603531217.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mstate\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mstate\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m\"OFF\"\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mstate\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m\"FAULT\"\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minitialise\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/green.py\u001b[0m in \u001b[0;36mgreener\u001b[0;34m(obj, *args, **kwargs)\u001b[0m\n\u001b[1;32m 193\u001b[0m \u001b[0mgreen_mode\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maccess\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'green_mode'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 194\u001b[0m \u001b[0mexecutor\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_object_executor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgreen_mode\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 195\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mexecutor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwait\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mwait\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 196\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 197\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mgreener\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/green.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, fn, args, kwargs, wait, timeout)\u001b[0m\n\u001b[1;32m 107\u001b[0m \u001b[0;31m# Sychronous (no delegation)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 108\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0masynchronous\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0min_executor_context\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 109\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 110\u001b[0m \u001b[0;31m# Asynchronous delegation\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 111\u001b[0m \u001b[0maccessor\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdelegate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py\u001b[0m in \u001b[0;36m__DeviceProxy__state\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 1558\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mdev_st\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mDevState\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mON\u001b[0m \u001b[0;34m:\u001b[0m \u001b[0;34m...\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1559\u001b[0m \"\"\"\n\u001b[0;32m-> 1560\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_state\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1561\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1562\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mConnectionFailed\u001b[0m: DevFailed[\nDevError[\n desc = TRANSIENT CORBA system exception: TRANSIENT_NoUsableProfile\n origin = Connection::connect\n reason = API_CorbaException\nseverity = ERR]\n\nDevError[\n desc = Failed to connect to device lts/sdp/1\n origin = Connection::connect\n reason = API_CantConnectToDevice\nseverity = ERR]\n]"
"name": "stdout",
"output_type": "stream",
"text": [
"Device is now in on state\n"
]
}
],
...
...
@@ -106,201 +99,74 @@
},
{
"cell_type": "code",
"execution_count":
9
,
"execution_count":
5
,
"id": "7accae6a",
"metadata": {},
"outputs": [],
"source": [
"attr_names = d.get_attribute_list()\n",
"\n",
"\n",
"for i in attr_names:\n",
" exec(\"value = print(i, d.{})\".format(i))\n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "b88868c5",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n",
" [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],\n",
" [1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n",
" [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n",
" [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n",
" [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n",
" [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n",
" [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n",
" [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n",
" [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n",
" [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],\n",
" [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],\n",
" dtype=float32)"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"wgswitches = d.FPGA_wg_enable_R\n",
"print(\"Old values:\\n\", wgswitches)\n",
"wgswitches[9][0] = True\n",
"wgswitches[10][0] = True\n",
"print(\"Values to be set:\\n\", wgswitches)\n",
"d.FPGA_wg_enable_RW =wgswitches\n",
"time.sleep(7)\n",
"print(\"Values read back after setting:\\n\",d.FPGA_wg_enable_R)"
"name": "stdout",
"output_type": "stream",
"text": [
"version_R *L2SS-357-Rename_PCC_to_RECV [c4d52d7125ece480acb1492a5fc0ba7fc60f9ea1]\n",
"Ant_mask_RW [[False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]\n",
" [False False False]]\n"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "8f3db8c7",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n",
" 119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n",
" 119.99817, 119.99817, 119.99817, 119.99817],\n",
" [119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n",
" 119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,\n",
" 119.99817, 119.99817, 119.99817, 119.99817],\n",
" [119.99817, 119.99817, 119.99817, 119.99817, 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ],\n",
" [ 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ],\n",
" [ 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ],\n",
" [ 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ],\n",
" [ 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ],\n",
" [ 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ],\n",
" [ 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ],\n",
" [ 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ],\n",
" [ 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ],\n",
" [ 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. , 0. , 0. ,\n",
" 0. , 0. , 0. , 0. ]], dtype=float32)"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"phases = d.FPGA_wg_phase_R\n",
"print(\"Old values:\\n\", phases)\n",
"phases[9][0] = 1.0334\n",
"phases[9][1] = 20.15\n",
"phases[10][0] = 130\n",
"print(\"Values to be set:\\n\", phases)\n",
"d.FPGA_wg_phase_RW = phases\n",
"time.sleep(7)\n",
"print(\"Values read back after setting:\\n\", d.FPGA_wg_phase_R)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "e45b4874",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n",
" 29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n",
" 29921878., 29921878., 29921878., 29921878.],\n",
" [29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n",
" 29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,\n",
" 29921878., 29921878., 29921878., 29921878.],\n",
" [29921878., 29921878., 29921878., 29921878., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.],\n",
" [ 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.],\n",
" [ 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.],\n",
" [ 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.],\n",
" [ 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.],\n",
" [ 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.],\n",
" [ 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.],\n",
" [ 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.],\n",
" [ 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.],\n",
" [ 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0.]], dtype=float32)"
"ename": "DevFailed",
"evalue": "DevFailed[\nDevError[\n desc = Read value for attribute CLK_Enable_PWR_R has not been updated\n origin = Device_3Impl::read_attributes_no_except\n reason = API_AttrValueNotSet\nseverity = ERR]\n\nDevError[\n desc = Failed to read_attribute on device lts/recv/1, attribute CLK_Enable_PWR_R\n origin = DeviceProxy::read_attribute()\n reason = API_AttributeFailed\nseverity = ERR]\n]",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mDevFailed\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/tmp/ipykernel_26/3093379163.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mattr_names\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0mexec\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"value = print(i, d.{})\"\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m<string>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py\u001b[0m in \u001b[0;36m__DeviceProxy__getattr\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m 319\u001b[0m \u001b[0mattr_info\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__get_attr_cache\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname_l\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 320\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mattr_info\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 321\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m__get_attribute_value\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mattr_info\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 322\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 323\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mname_l\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__get_pipe_cache\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py\u001b[0m in \u001b[0;36m__get_attribute_value\u001b[0;34m(self, attr_info, name)\u001b[0m\n\u001b[1;32m 281\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__get_attribute_value\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mattr_info\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 282\u001b[0m \u001b[0m_\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0menum_class\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mattr_info\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 283\u001b[0;31m \u001b[0mattr_value\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_attribute\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 284\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0menum_class\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 285\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0menum_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mattr_value\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/green.py\u001b[0m in \u001b[0;36mgreener\u001b[0;34m(obj, *args, **kwargs)\u001b[0m\n\u001b[1;32m 193\u001b[0m \u001b[0mgreen_mode\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0maccess\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'green_mode'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 194\u001b[0m \u001b[0mexecutor\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_object_executor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mgreen_mode\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 195\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mexecutor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwait\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mwait\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 196\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 197\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mgreener\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/green.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, fn, args, kwargs, wait, timeout)\u001b[0m\n\u001b[1;32m 107\u001b[0m \u001b[0;31m# Sychronous (no delegation)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 108\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0masynchronous\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0min_executor_context\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 109\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 110\u001b[0m \u001b[0;31m# Asynchronous delegation\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 111\u001b[0m \u001b[0maccessor\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdelegate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py\u001b[0m in \u001b[0;36m__DeviceProxy__read_attribute\u001b[0;34m(self, value, extract_as)\u001b[0m\n\u001b[1;32m 439\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 440\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__DeviceProxy__read_attribute\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mextract_as\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mExtractAs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mNumpy\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 441\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0m__check_read_attribute\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_read_attribute\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mextract_as\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 442\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 443\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py\u001b[0m in \u001b[0;36m__check_read_attribute\u001b[0;34m(dev_attr)\u001b[0m\n\u001b[1;32m 155\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__check_read_attribute\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdev_attr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 156\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mdev_attr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhas_failed\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 157\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mDevFailed\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mdev_attr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_err_stack\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 158\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdev_attr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 159\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mDevFailed\u001b[0m: DevFailed[\nDevError[\n desc = Read value for attribute CLK_Enable_PWR_R has not been updated\n origin = Device_3Impl::read_attributes_no_except\n reason = API_AttrValueNotSet\nseverity = ERR]\n\nDevError[\n desc = Failed to read_attribute on device lts/recv/1, attribute CLK_Enable_PWR_R\n origin = DeviceProxy::read_attribute()\n reason = API_AttributeFailed\nseverity = ERR]\n]"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"amplitudes = d.FPGA_wg_amplitude_R\n",
"print(\"Old values:\\n\", amplitudes)\n",
"amplitudes[9][0] = 1.0\n",
"amplitudes[9][1] = 1.99\n",
"amplitudes[10][0] = 0.5\n",
"print(\"Values to be set:\\n\", amplitudes)\n",
"d.FPGA_wg_amplitude_RW = amplitudes\n",
"time.sleep(7)\n",
"print(\"Values read back after setting:\\n\", d.FPGA_wg_amplitude_R)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9b1bbd3e",
"metadata": {},
"outputs": [],
"source": [
"frequencies = d.FPGA_wg_frequency_R\n",
"print(\"Old values:\\n\", frequencies)\n",
"frequencies[9][0] = 19000000\n",
"frequencies[9][1] = 20000000\n",
"frequencies[10][0] = 22000000\n",
"print(\"Values to be set:\\n\", frequencies)\n",
"d.FPGA_wg_frequency_RW = frequencies\n",
"print(\"Values read back after setting:\\n\", d.FPGA_wg_frequency_R)"
"attr_names = d.get_attribute_list()\n",
"\n",
"\n",
"for i in attr_names:\n",
" exec(\"value = print(i, d.{})\".format(i))\n"
]
}
],
...
...
%% Cell type:code id:waiting-chance tags:
```
python
import
time
```
%% Cell type:code id:moving-alexandria tags:
```
python
d
=
DeviceProxy
(
"
LTS/
SDP
/1
"
)
d
=
DeviceProxy
(
"
LTS/
RECV
/1
"
)
```
%% Cell type:code id:ranking-aluminum tags:
```
python
state
=
str
(
d
.
state
())
if
state
==
"
OFF
"
or
state
==
"
FAULT
"
:
d
.
initialise
()
time
.
sleep
(
1
)
state
=
str
(
d
.
state
())
if
state
==
"
STANDBY
"
:
d
.
on
()
state
=
str
(
d
.
state
())
if
state
==
"
ON
"
:
print
(
"
Device is now in on state
"
)
else
:
print
(
"
warning, expected device to be in on state, is:
"
,
state
)
```
%% Output
---------------------------------------------------------------------------
ConnectionFailed Traceback (most recent call last)
/tmp/ipykernel_21/3603531217.py in <module>
----> 1 state = str(d.state())
2
3
4 if state == "OFF" or state == "FAULT":
5 d.initialise()
/usr/local/lib/python3.7/dist-packages/tango/green.py in greener(obj, *args, **kwargs)
193 green_mode = access('green_mode', None)
194 executor = get_object_executor(obj, green_mode)
--> 195 return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
196
197 return greener
/usr/local/lib/python3.7/dist-packages/tango/green.py in run(self, fn, args, kwargs, wait, timeout)
107 # Sychronous (no delegation)
108 if not self.asynchronous or not self.in_executor_context():
--> 109 return fn(*args, **kwargs)
110 # Asynchronous delegation
111 accessor = self.delegate(fn, *args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __DeviceProxy__state(self, *args, **kwargs)
1558 if dev_st == DevState.ON : ...
1559 """
-> 1560 return self._state(*args, **kwargs)
1561
1562
ConnectionFailed: DevFailed[
DevError[
desc = TRANSIENT CORBA system exception: TRANSIENT_NoUsableProfile
origin = Connection::connect
reason = API_CorbaException
severity = ERR]
DevError[
desc = Failed to connect to device lts/sdp/1
origin = Connection::connect
reason = API_CantConnectToDevice
severity = ERR]
]
Device is now in on state
%% Cell type:code id:transsexual-battle tags:
```
python
values
=
[
[
d
.
FPGA_mask_RW
,
"
FPGA_mask_RW
"
],
[
d
.
FPGA_scrap_R
,
"
FPGA_scrap_R
"
],
[
d
.
FPGA_scrap_RW
,
"
FPGA_scrap_RW
"
],
[
d
.
FPGA_status_R
,
"
FPGA_status_R
"
],
[
d
.
FPGA_temp_R
,
"
FPGA_temp_R
"
],
[
d
.
FPGA_version_R
,
"
FPGA_version_R
"
],
[
d
.
FPGA_weights_R
,
"
FPGA_weights_R
"
],
[
d
.
FPGA_weights_RW
,
"
FPGA_weights_RW
"
],
[
d
.
TR_busy_R
,
"
TR_busy_R
"
],
[
d
.
TR_reload_RW
,
"
TR_reload_RW
"
],
# [d.TR_tod_R, "TR_tod_R"],
# [d.TR_uptime_R, "TR_uptime_R"]
]
for
i
in
values
:
print
(
"
🟦🟦🟦
"
,
i
[
1
],
"
:
"
,
i
[
0
])
```
%% Output
---------------------------------------------------------------------------
DevFailed Traceback (most recent call last)
/tmp/ipykernel_22/2885399456.py in <module>
1 values = [
----> 2 [d.FPGA_mask_RW, "FPGA_mask_RW"],
3 [d.FPGA_scrap_R, "FPGA_scrap_R"],
4 [d.FPGA_scrap_RW, "FPGA_scrap_RW"],
5 [d.FPGA_status_R, "FPGA_status_R"],
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __DeviceProxy__getattr(self, name)
319 attr_info = self.__get_attr_cache().get(name_l)
320 if attr_info:
--> 321 return __get_attribute_value(self, attr_info, name)
322
323 if name_l in self.__get_pipe_cache():
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __get_attribute_value(self, attr_info, name)
281 def __get_attribute_value(self, attr_info, name):
282 _, enum_class = attr_info
--> 283 attr_value = self.read_attribute(name).value
284 if enum_class:
285 return enum_class(attr_value)
/usr/local/lib/python3.7/dist-packages/tango/green.py in greener(obj, *args, **kwargs)
193 green_mode = access('green_mode', None)
194 executor = get_object_executor(obj, green_mode)
--> 195 return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
196
197 return greener
/usr/local/lib/python3.7/dist-packages/tango/green.py in run(self, fn, args, kwargs, wait, timeout)
107 # Sychronous (no delegation)
108 if not self.asynchronous or not self.in_executor_context():
--> 109 return fn(*args, **kwargs)
110 # Asynchronous delegation
111 accessor = self.delegate(fn, *args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __DeviceProxy__read_attribute(self, value, extract_as)
439
440 def __DeviceProxy__read_attribute(self, value, extract_as=ExtractAs.Numpy):
--> 441 return __check_read_attribute(self._read_attribute(value, extract_as))
442
443
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __check_read_attribute(dev_attr)
155 def __check_read_attribute(dev_attr):
156 if dev_attr.has_failed:
--> 157 raise DevFailed(*dev_attr.get_err_stack())
158 return dev_attr
159
DevFailed: DevFailed[
DevError[
desc = Read value for attribute FPGA_mask_RW has not been updated
origin = Device_3Impl::read_attributes_no_except
reason = API_AttrValueNotSet
severity = ERR]
DevError[
desc = Failed to read_attribute on device lts/sdp/1, attribute FPGA_mask_RW
origin = DeviceProxy::read_attribute()
reason = API_AttributeFailed
severity = ERR]
]
%% Cell type:code id:7accae6a tags:
```
python
attr_names
=
d
.
get_attribute_list
()
for
i
in
attr_names
:
exec
(
"
value = print(i, d.{})
"
.
format
(
i
))
```
%% Cell type:code id:b88868c5 tags:
```
python
wgswitches
=
d
.
FPGA_wg_enable_R
print
(
"
Old values:
\n
"
,
wgswitches
)
wgswitches
[
9
][
0
]
=
True
wgswitches
[
10
][
0
]
=
True
print
(
"
Values to be set:
\n
"
,
wgswitches
)
d
.
FPGA_wg_enable_RW
=
wgswitches
time
.
sleep
(
7
)
print
(
"
Values read back after setting:
\n
"
,
d
.
FPGA_wg_enable_R
)
```
%% Output
array([[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]],
dtype=float32)
%% Cell type:code id:8f3db8c7 tags:
```
python
phases
=
d
.
FPGA_wg_phase_R
print
(
"
Old values:
\n
"
,
phases
)
phases
[
9
][
0
]
=
1.0334
phases
[
9
][
1
]
=
20.15
phases
[
10
][
0
]
=
130
print
(
"
Values to be set:
\n
"
,
phases
)
d
.
FPGA_wg_phase_RW
=
phases
time
.
sleep
(
7
)
print
(
"
Values read back after setting:
\n
"
,
d
.
FPGA_wg_phase_R
)
```
%% Output
array([[119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,
119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,
119.99817, 119.99817, 119.99817, 119.99817],
[119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,
119.99817, 119.99817, 119.99817, 119.99817, 119.99817, 119.99817,
119.99817, 119.99817, 119.99817, 119.99817],
[119.99817, 119.99817, 119.99817, 119.99817, 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ],
[ 0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. ]], dtype=float32)
%% Cell type:code id:e45b4874 tags:
```
python
amplitudes
=
d
.
FPGA_wg_amplitude_R
print
(
"
Old values:
\n
"
,
amplitudes
)
amplitudes
[
9
][
0
]
=
1.0
amplitudes
[
9
][
1
]
=
1.99
amplitudes
[
10
][
0
]
=
0.5
print
(
"
Values to be set:
\n
"
,
amplitudes
)
d
.
FPGA_wg_amplitude_RW
=
amplitudes
time
.
sleep
(
7
)
print
(
"
Values read back after setting:
\n
"
,
d
.
FPGA_wg_amplitude_R
)
```
%% Output
version_R *L2SS-357-Rename_PCC_to_RECV [c4d52d7125ece480acb1492a5fc0ba7fc60f9ea1]
Ant_mask_RW [[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]
[False False False]]
array([[29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,
29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,
29921878., 29921878., 29921878., 29921878.],
[29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,
29921878., 29921878., 29921878., 29921878., 29921878., 29921878.,
29921878., 29921878., 29921878., 29921878.],
[29921878., 29921878., 29921878., 29921878., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0.,
0., 0., 0., 0.]], dtype=float32)
---------------------------------------------------------------------------
DevFailed Traceback (most recent call last)
/tmp/ipykernel_26/3093379163.py in <module>
3
4 for i in attr_names:
----> 5 exec("value = print(i, d.{})".format(i))
%% Cell type:code id:9b1bbd3e tags:
<string> in <module>
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __DeviceProxy__getattr(self, name)
319 attr_info = self.__get_attr_cache().get(name_l)
320 if attr_info:
--> 321 return __get_attribute_value(self, attr_info, name)
322
323 if name_l in self.__get_pipe_cache():
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __get_attribute_value(self, attr_info, name)
281 def __get_attribute_value(self, attr_info, name):
282 _, enum_class = attr_info
--> 283 attr_value = self.read_attribute(name).value
284 if enum_class:
285 return enum_class(attr_value)
/usr/local/lib/python3.7/dist-packages/tango/green.py in greener(obj, *args, **kwargs)
193 green_mode = access('green_mode', None)
194 executor = get_object_executor(obj, green_mode)
--> 195 return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
196
197 return greener
/usr/local/lib/python3.7/dist-packages/tango/green.py in run(self, fn, args, kwargs, wait, timeout)
107 # Sychronous (no delegation)
108 if not self.asynchronous or not self.in_executor_context():
--> 109 return fn(*args, **kwargs)
110 # Asynchronous delegation
111 accessor = self.delegate(fn, *args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __DeviceProxy__read_attribute(self, value, extract_as)
439
440 def __DeviceProxy__read_attribute(self, value, extract_as=ExtractAs.Numpy):
--> 441 return __check_read_attribute(self._read_attribute(value, extract_as))
442
443
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __check_read_attribute(dev_attr)
155 def __check_read_attribute(dev_attr):
156 if dev_attr.has_failed:
--> 157 raise DevFailed(*dev_attr.get_err_stack())
158 return dev_attr
159
DevFailed: DevFailed[
DevError[
desc = Read value for attribute CLK_Enable_PWR_R has not been updated
origin = Device_3Impl::read_attributes_no_except
reason = API_AttrValueNotSet
severity = ERR]
```
python
frequencies
=
d
.
FPGA_wg_frequency_R
print
(
"
Old values:
\n
"
,
frequencies
)
frequencies
[
9
][
0
]
=
19000000
frequencies
[
9
][
1
]
=
20000000
frequencies
[
10
][
0
]
=
22000000
print
(
"
Values to be set:
\n
"
,
frequencies
)
d
.
FPGA_wg_frequency_RW
=
frequencies
print
(
"
Values read back after setting:
\n
"
,
d
.
FPGA_wg_frequency_R
)
```
DevError[
desc = Failed to read_attribute on device lts/recv/1, attribute CLK_Enable_PWR_R
origin = DeviceProxy::read_attribute()
reason = API_AttributeFailed
severity = ERR]
]
...
...
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