Commit 4e5e9697 authored by David Keitel's avatar David Keitel
Browse files

make_sfts: only write transient params to cff if window!=none

parent 73fee787
...@@ -92,9 +92,9 @@ class Writer(BaseSearchClass): ...@@ -92,9 +92,9 @@ class Writer(BaseSearchClass):
self.make_cff() self.make_cff()
self.run_makefakedata() self.run_makefakedata()
def get_single_config_line(self, i, Alpha, Delta, h0, cosi, psi, phi, F0, def get_base_template(self, i, Alpha, Delta, h0, cosi, psi, phi, F0,
F1, F2, tref, window, tstart, duration_days): F1, F2, tref):
template = ( return (
"""[TS{}] """[TS{}]
Alpha = {:1.18e} Alpha = {:1.18e}
Delta = {:1.18e} Delta = {:1.18e}
...@@ -105,13 +105,34 @@ phi0 = {:1.18e} ...@@ -105,13 +105,34 @@ phi0 = {:1.18e}
Freq = {:1.18e} Freq = {:1.18e}
f1dot = {:1.18e} f1dot = {:1.18e}
f2dot = {: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} transientWindowType = {:s}
transientStartTime = {:10.3f} transientStartTime = {:10.3f}
transientTauDays = {:1.3f}\n""") transientTauDays = {:1.3f}\n""")
return template.format(i, Alpha, Delta, h0, cosi, psi, phi, F0, F1, return template.format(i, Alpha, Delta, h0, cosi, psi, phi, F0, F1,
F2, tref, window, tstart, duration_days) 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): def make_cff(self):
""" """
Generates a .cff file Generates a .cff file
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment