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
Tammo Jan Dijkema
HPIB
Commits
dabceee7
Commit
dabceee7
authored
May 04, 2018
by
Tammo Jan Dijkema
Browse files
Remove old file
parent
f88a56bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
startup.py
deleted
100755 → 0
View file @
f88a56bb
#!/usr/bin/env python
import
hpib
import
subprocess
import
telescope
import
math
import
time
##import kapteyn
p
=
hpib
.
PrologixGpibUsb
()
sml
=
hpib
.
HpibDevice
(
28
,
p
)
smx
=
hpib
.
HpibDevice
(
14
,
p
)
esmc
=
hpib
.
HpibDevice
(
1
,
p
)
DT
=
telescope
.
telescope
(
math
.
radians
(
52.812019
),
math
.
radians
(
6.396169
),
25.0
,
connect
=
True
)
print
sml
.
query
(
"*IDN?"
)
print
esmc
.
query
(
"*IDN?"
)
print
smx
.
query
(
"*IDN?"
)
freq
=
1420.405751
def
stepoverrange
(
start
=
0
,
end
=
360
,
delay
=
1
):
for
rastep
in
range
(
start
,
end
):
ra
=
math
.
radians
(
rastep
)
#ra=0
argString
=
str
(
ra
)
+
" 0 2000 "
+
str
(
time
.
time
())
+
" "
+
str
(
DT
.
lat
())
+
" "
+
str
(
DT
.
long
())
+
" 25 "
vlsrStr
=
"vlsr "
+
argString
dopplerStr
=
"doppler "
+
argString
+
str
(
freq
)
speed
=
subprocess
.
Popen
(
vlsrStr
,
stdout
=
subprocess
.
PIPE
,
shell
=
True
).
stdout
.
read
()
dfreq
=
1000.0
+
freq
-
float
(
subprocess
.
Popen
(
dopplerStr
,
stdout
=
subprocess
.
PIPE
,
shell
=
True
).
stdout
.
read
())
sml
.
command
(
"freq "
+
str
(
dfreq
)
+
" MHz"
)
qfreq
=
sml
.
query
(
"freq?"
)
print
str
(
time
.
time
()),
dfreq
,
qfreq
time
.
sleep
(
delay
)
#mset=subprocess.Popen(msStr, stdout=subprocess.PIPE, shell=True).stdout.read()
def
doforever
(
delay
=
1
):
while
1
:
#ra=math.radians(rastep)
ra
=
0
argString
=
str
(
ra
)
+
" 0 2000 "
+
str
(
time
.
time
())
+
" "
+
str
(
DT
.
lat
())
+
" "
+
str
(
DT
.
long
())
+
" 25 "
vlsrStr
=
"vlsr "
+
argString
dopplerStr
=
"doppler "
+
argString
+
str
(
freq
)
speed
=
subprocess
.
Popen
(
vlsrStr
,
stdout
=
subprocess
.
PIPE
,
shell
=
True
).
stdout
.
read
()
dfreq
=
1000.0
+
freq
-
float
(
subprocess
.
Popen
(
dopplerStr
,
stdout
=
subprocess
.
PIPE
,
shell
=
True
).
stdout
.
read
())
sml
.
command
(
"freq "
+
str
(
dfreq
)
+
" MHz"
)
qfreq
=
sml
.
query
(
"freq?"
)
print
str
(
time
.
time
()),
dfreq
,
qfreq
time
.
sleep
(
delay
)
Write
Preview
Supports
Markdown
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