Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
radiolab
vlbi_monitor_client
Commits
f23401b0
Commit
f23401b0
authored
Feb 23, 2016
by
Pim Schellart
Browse files
Update README to give basic background and example.
parent
5eb2a95a
Pipeline
#969
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
f23401b0
...
...
@@ -144,32 +144,30 @@ Example
A basic example in Python using the provided
`vlbi`
module looks like:
```
import time
import datetime
import vlbi
url = "http://vlbi.astro.ru.nl:8000/rpc"
username = "foo"
password = "bar"
facility = "SMTO"
client = vlbi.Client(url, facility, username, password, backup=False)
now = datetime.datetime.utcnow()
s_now = now.isoformat('T') + 'Z'
later = now + datetime.timedelta(seconds=10)
s_later = later.isoformat('T') + 'Z'
metadata = {}
metadata["systemTemperature"] = {"time": s_now, "value": 352.234}
metadata["observingMode"] = {"time": s_now, "expires": s_later, "value": "VLBI"}
metadata["maser"] = {"time": s_now, "value": True}
metadata["maser.chamberTemperature"] = {"time": s_now, "value": 13.325}
record = {"observatory" : "SMTO", "time" : s_now, "metadata" : metadata}
client.updateRecord(record)
```
import time
import datetime
import vlbi
url = "http://vlbi.astro.ru.nl:8000/rpc"
username = "foo"
password = "bar"
facility = "SMTO"
client = vlbi.Client(url, facility, username, password, backup=False)
now = datetime.datetime.utcnow()
s_now = now.isoformat('T') + 'Z'
later = now + datetime.timedelta(seconds=10)
s_later = later.isoformat('T') + 'Z'
metadata = {}
metadata["systemTemperature"] = {"time": s_now, "value": 352.234}
metadata["observingMode"] = {"time": s_now, "expires": s_later, "value": "VLBI"}
metadata["maser"] = {"time": s_now, "value": True}
metadata["maser.chamberTemperature"] = {"time": s_now, "value": 13.325}
record = {"observatory" : "SMTO", "time" : s_now, "metadata" : metadata}
client.updateRecord(record)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment