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
filterbank
Commits
1703d50b
Commit
1703d50b
authored
Jan 19, 2018
by
Tammo Jan Dijkema
Browse files
Hard code path, move time to last moment
parent
27dc2ae2
Changes
1
Hide whitespace changes
Inline
Side-by-side
tofil.py
View file @
1703d50b
...
...
@@ -35,25 +35,25 @@ def create_filterbank(outfile, source, infile=None, date=None, headeronly=False,
source
=
"PSR "
+
source
if
not
date
:
if
infile
:
date
=
Time
(
os
.
path
.
getctime
(
infile
),
format
=
'unix'
)
else
:
date
=
Time
.
now
()
else
:
date
=
Time
(
date
,
format
=
'isot'
)
az_start
=
0.
za_start
=
0.
src_raj
=
0.
src_dej
=
0.
if
telescope_found
:
dt
=
telescope
()
az_start
=
(
180
*
u
.
deg
+
dt
.
getAzEl
(
waitForUpdate
=
True
)[
0
]).
to
(
u
.
deg
).
value
dt
=
telescope
(
consoleHost
=
'console'
)
az_start
=
(
180
*
u
.
deg
+
dt
.
getAzEl
(
waitForUpdate
=
True
)[
0
]).
to
(
u
.
deg
).
value
%
360
za_start
=
(
90
*
u
.
deg
-
dt
.
getAzEl
()[
1
]).
to
(
u
.
deg
).
value
src_raj
=
dt
.
getRaDec
().
ra
.
to_string
(
unit
=
u
.
hour
,
sep
=
''
)
src_dej
=
dt
.
getRaDec
().
dec
.
to_string
(
unit
=
u
.
degree
,
sep
=
''
)
if
not
date
:
if
infile
:
date
=
Time
(
os
.
path
.
getctime
(
infile
),
format
=
'unix'
)
else
:
date
=
Time
.
now
()
else
:
date
=
Time
(
date
,
format
=
'isot'
)
print
(
"Input file: {}"
.
format
(
infile
))
print
(
"Output file: {}"
.
format
(
outfile
))
print
(
"Source name: {}"
.
format
(
source
))
...
...
@@ -97,7 +97,7 @@ def create_filterbank(outfile, source, infile=None, date=None, headeronly=False,
if
not
infile
:
out
.
close
()
cmd
=
"
.
/pulsar_filterbank "
+
str
(
time
)
+
" "
+
outfile
cmd
=
"
~dijkema/pulsar
/pulsar_filterbank "
+
str
(
time
)
+
" "
+
outfile
print
(
"Running "
+
cmd
)
os
.
system
(
cmd
)
return
...
...
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