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
Gregory Ashton
PyFstat
Commits
4e5e9697
Commit
4e5e9697
authored
Aug 18, 2017
by
David Keitel
Browse files
make_sfts: only write transient params to cff if window!=none
parent
73fee787
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyfstat/make_sfts.py
View file @
4e5e9697
...
...
@@ -92,9 +92,9 @@ class Writer(BaseSearchClass):
self
.
make_cff
()
self
.
run_makefakedata
()
def
get_
single_config_lin
e
(
self
,
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
,
window
,
tstart
,
duration_days
):
template
=
(
def
get_
base_templat
e
(
self
,
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
):
return
(
"""[TS{}]
Alpha = {:1.18e}
Delta = {:1.18e}
...
...
@@ -105,13 +105,34 @@ phi0 = {:1.18e}
Freq = {:1.18e}
f1dot = {:1.18e}
f2dot = {:1.18e}
refTime = {:10.6f}
refTime = {:10.6f}"""
)
def
get_single_config_line_cw
(
self
,
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
):
template
=
(
self
.
get_base_template
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
)
+
"""
\n
"""
)
return
template
.
format
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
)
def
get_single_config_line_tcw
(
self
,
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
,
window
,
tstart
,
duration_days
):
template
=
(
self
.
get_base_template
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
)
+
"""
transientWindowType = {:s}
transientStartTime = {:10.3f}
transientTauDays = {:1.3f}
\n
"""
)
return
template
.
format
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
,
window
,
tstart
,
duration_days
)
def
get_single_config_line
(
self
,
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
,
window
,
tstart
,
duration_days
):
if
window
==
'none'
:
return
self
.
get_single_config_line_cw
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
)
else
:
return
self
.
get_single_config_line_tcw
(
i
,
Alpha
,
Delta
,
h0
,
cosi
,
psi
,
phi
,
F0
,
F1
,
F2
,
tref
,
window
,
tstart
,
duration_days
)
def
make_cff
(
self
):
"""
Generates a .cff file
...
...
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