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
David Keitel
PyFstat
Commits
921cc823
Commit
921cc823
authored
Jan 30, 2017
by
Gregory Ashton
Browse files
Further improvements to handling o fdtglitch
Now forces use of dtglitch = None for no glitches
parent
f6b14869
Changes
2
Hide whitespace changes
Inline
Side-by-side
pyfstat/core.py
View file @
921cc823
...
...
@@ -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
]))
else
:
self
.
dtglitch
=
np
.
a
rray
(
dtglitch
)
self
.
dtglitch
=
np
.
a
tleast_1d
(
self
.
dtglitch
)
self
.
tglitch
=
self
.
tstart
+
self
.
dtglitch
self
.
tbounds
=
np
.
concatenate
((
[
self
.
tstart
],
self
.
tglitch
,
[
self
.
tend
]))
logging
.
info
(
'Using segment boundaries {}'
.
format
(
self
.
tbounds
))
self
.
check_inputs
()
...
...
tests.py
View file @
921cc823
...
...
@@ -163,7 +163,7 @@ class TestMCMCSearch(Test):
Alpha
=
5e-3
Delta
=
1.2
tref
=
minStartTime
dtglitch
=
durati
on
dtglitch
=
N
on
e
delta_F0
=
0
Writer
=
pyfstat
.
Writer
(
F0
=
F0
,
F1
=
F1
,
F2
=
F2
,
label
=
self
.
label
,
h0
=
h0
,
sqrtSX
=
sqrtSX
,
...
...
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