Commit 921cc823 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Further improvements to handling o fdtglitch

Now forces use of dtglitch = None for no glitches
parent f6b14869
......@@ -681,7 +681,7 @@ class Writer(BaseSearchClass):
start and end times (in gps seconds) of the total observation span
dtglitch: float
time (in gps seconds) of the glitch after tstart. To create data
without a glitch, set dtglitch=tend-tstart or leave as None
without a glitch, set dtglitch=None
delta_phi, delta_F0, delta_F1: float
instanteneous glitch magnitudes in rad, Hz, and Hz/s respectively
tref: float or None
......@@ -706,17 +706,14 @@ class Writer(BaseSearchClass):
self.minStartTime = self.tstart
if self.maxStartTime is None:
self.maxStartTime = self.tend
if self.dtglitch is None or self.dtglitch == self.duration:
if self.dtglitch is None:
self.tbounds = [self.tstart, self.tend]
elif np.size(self.dtglitch) == 1:
self.dtglitch = np.array([dtglitch])
self.tbounds = np.concatenate((
[self.tstart], self.tstart+self.dtglitch, [self.tend]))
self.dtglitch = np.array(dtglitch)
self.dtglitch = np.atleast_1d(self.dtglitch)
self.tglitch = self.tstart + self.dtglitch
self.tbounds = np.concatenate((
[self.tstart], self.tglitch, [self.tend]))'Using segment boundaries {}'.format(self.tbounds))
......@@ -163,7 +163,7 @@ class TestMCMCSearch(Test):
Alpha = 5e-3
Delta = 1.2
tref = minStartTime
dtglitch = duration
dtglitch = None
delta_F0 = 0
Writer = pyfstat.Writer(F0=F0, F1=F1, F2=F2, label=self.label,
h0=h0, sqrtSX=sqrtSX,
Supports Markdown
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