Commit a20684b8 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Adds test to check SFT_timestamps exists

If SFTs where not loaded, i.e. if injectSources was used, no timestamps
are generated. In such a case don't attempt to used them.
parent ea5474da
......@@ -547,14 +547,15 @@ class SemiCoherentSearch(BaseSearchClass, ComputeFstat):
record_segments=False):
""" Returns twoF or ln(BSGL) semi-coherently at a single point """
if self.tboundaries[0] < self.SFT_timestamps[0]:
logging.debug(
'Semi-coherent start time {} before first SFT timestamp {}'
.format(self.tboundaries[0], self.SFT_timestamps[0]))
if self.tboundaries[-1] > self.SFT_timestamps[-1]:
logging.debug(
'Semi-coherent end time {} after last SFT timestamp {}'
.format(self.tboundaries[-1], self.SFT_timestamps[-1]))
if hasattr(self, 'SFT_timestamps'):
if self.tboundaries[0] < self.SFT_timestamps[0]:
logging.debug(
'Semi-coherent start time {} before first SFT timestamp {}'
.format(self.tboundaries[0], self.SFT_timestamps[0]))
if self.tboundaries[-1] > self.SFT_timestamps[-1]:
logging.debug(
'Semi-coherent end time {} after last SFT timestamp {}'
.format(self.tboundaries[-1], self.SFT_timestamps[-1]))
self.PulsarDopplerParams.fkdot = np.array([F0, F1, F2, 0, 0, 0, 0])
self.PulsarDopplerParams.Alpha = Alpha
......
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