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
a31b4e7f
Commit
a31b4e7f
authored
4 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
Restore jupyter notebook to remove accidental additions
parent
d7c73441
No related branches found
No related tags found
1 merge request
!7
Resolve #2021 "03 16 branched from master elk stack"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jupyter-notebooks/Start All Devices.ipynb
+12
-15
12 additions, 15 deletions
jupyter-notebooks/Start All Devices.ipynb
with
12 additions
and
15 deletions
jupyter-notebooks/Start All Devices.ipynb
+
12
−
15
View file @
a31b4e7f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"cells": [
"cells": [
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
null
,
"execution_count":
5
,
"id": "social-massachusetts",
"id": "social-massachusetts",
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
...
@@ -22,13 +22,20 @@
...
@@ -22,13 +22,20 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
null
,
"execution_count":
10
,
"id": "defined-apache",
"id": "defined-apache",
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Device PCC(lts/pcc/1) is now in state FAULT\n",
"Device SDP(lts/sdp/1) is now in state ON\n"
]
}
],
"source": [
"source": [
"sdp = DeviceProxy(\"SDP/LTS/1\")\n",
"sdp.force_start()\n",
"for d in devices:\n",
"for d in devices:\n",
" print(\"Device %s is now in state %s\" % (d, force_start(d)))"
" print(\"Device %s is now in state %s\" % (d, force_start(d)))"
]
]
...
@@ -39,16 +46,6 @@
...
@@ -39,16 +46,6 @@
"id": "superior-wheel",
"id": "superior-wheel",
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"devices"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fifteen-transportation",
"metadata": {},
"outputs": [],
"source": []
"source": []
}
}
],
],
...
...
%% Cell type:code id:social-massachusetts tags:
%% Cell type:code id:social-massachusetts tags:
```
python
```
python
def
force_start
(
device
):
def
force_start
(
device
):
if
device
.
state
()
==
DevState
.
FAULT
:
if
device
.
state
()
==
DevState
.
FAULT
:
device
.
Off
()
device
.
Off
()
if
device
.
state
()
==
DevState
.
OFF
:
if
device
.
state
()
==
DevState
.
OFF
:
device
.
initialise
()
device
.
initialise
()
if
device
.
state
()
==
DevState
.
INIT
:
if
device
.
state
()
==
DevState
.
INIT
:
device
.
Standby
()
device
.
Standby
()
if
device
.
state
()
==
DevState
.
STANDBY
:
if
device
.
state
()
==
DevState
.
STANDBY
:
device
.
On
()
device
.
On
()
return
device
.
state
()
return
device
.
state
()
```
```
%% Cell type:code id:defined-apache tags:
%% Cell type:code id:defined-apache tags:
```
python
```
python
sdp
=
DeviceProxy
(
"
SDP/LTS/1
"
)
sdp
.
force_start
()
for
d
in
devices
:
for
d
in
devices
:
print
(
"
Device %s is now in state %s
"
%
(
d
,
force_start
(
d
)))
print
(
"
Device %s is now in state %s
"
%
(
d
,
force_start
(
d
)))
```
```
%%
Cell type:code id:superior-wheel tags:
%%
Output
```
python
Device PCC(lts/pcc/1) is now in state FAULT
devices
Device SDP(lts/sdp/1) is now in state ON
```
%% Cell type:code id:
fifteen-transportation
tags:
%% Cell type:code id:
superior-wheel
tags:
```
python
```
python
```
```
...
...
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