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
25aab707
Commit
25aab707
authored
Feb 09, 2018
by
Gregory Ashton
Browse files
Fix FrequencySlidingWindow
- Add transient window type - Rename arrays -> coord_arrays to solve caching check bug
parent
ffc6b212
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyfstat/grid_based_searches.py
View file @
25aab707
...
...
@@ -797,14 +797,14 @@ class FrequencySlidingWindow(GridSearch):
For all other parameters, see `pyfstat.ComputeFStat` for details
"""
self
.
transientWindowType
=
None
self
.
transientWindowType
=
'rect'
self
.
nsegs
=
1
self
.
t0Band
=
None
self
.
tauBand
=
None
if
os
.
path
.
isdir
(
outdir
)
is
False
:
os
.
mkdir
(
outdir
)
self
.
set_out_file
()
self
.
nsegs
=
1
self
.
F1s
=
[
F1
]
self
.
F2s
=
[
F2
]
self
.
Alphas
=
[
Alpha
]
...
...
@@ -825,24 +825,24 @@ class FrequencySlidingWindow(GridSearch):
self
.
search
.
get_fullycoherent_twoF
)
def
get_input_data_array
(
self
):
arrays
=
[]
coord_
arrays
=
[]
tstarts
=
[
self
.
minStartTime
]
while
tstarts
[
-
1
]
+
self
.
window_size
<
self
.
maxStartTime
:
tstarts
.
append
(
tstarts
[
-
1
]
+
self
.
window_delta
)
arrays
=
[
tstarts
]
coord_
arrays
=
[
tstarts
]
for
tup
in
(
self
.
F0s
,
self
.
F1s
,
self
.
F2s
,
self
.
Alphas
,
self
.
Deltas
):
arrays
.
append
(
self
.
get_array_from_tuple
(
tup
))
coord_
arrays
.
append
(
self
.
get_array_from_tuple
(
tup
))
input_data
=
[]
for
vals
in
itertools
.
product
(
*
arrays
):
for
vals
in
itertools
.
product
(
*
coord_
arrays
):
input_data
.
append
(
vals
)
input_data
=
np
.
array
(
input_data
)
input_data
=
np
.
insert
(
input_data
,
1
,
input_data
[:,
0
]
+
self
.
window_size
,
axis
=
1
)
self
.
arrays
=
arrays
self
.
coord_
arrays
=
coord_
arrays
self
.
input_data
=
np
.
array
(
input_data
)
def
plot_sliding_window
(
self
,
F0
=
None
,
ax
=
None
,
savefig
=
True
,
...
...
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