/
ndstest.py
39 lines (29 loc) · 944 Bytes
/
ndstest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import nds2
conn = nds2.connection('nds.ligo-la.caltech.edu')
print conn
channel = ['L1:ASC-AS_A_RF45_Q_PIT_OUT_DQ']
print "channel = {0}".format(channel)
print "Now testing the command 'conn.iterate(channel)' "
try:
iter = conn.iterate(channel)
except RuntimeError, err:
print "Failed"
print RuntimeError, err
print "Now testing the command 'conn.iterate(1, channel)' "
try:
iter = conn.iterate(1, channel)
except RuntimeError, err:
print "Failed"
print RuntimeError, err
print "Now testing the command 'conn.iterate(1125417950, 1125418050, channel)' "
try:
iter = conn.iterate(1125417950, 1125418050, channel)
except RuntimeError, err:
print "Failed"
print RuntimeError, err
print "Now testing the command 'conn.iterate(1125417950, 1125418050, 1, channel)' "
try:
iter = conn.iterate(1125417950, 1125418050, 1, channel)
except RuntimeError, err:
print "Failed"
print RuntimeError, err