Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Gregory Ashton
PyFstat
Commits
0c41b602
Commit
0c41b602
authored
Dec 13, 2017
by
David Keitel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gridsearch: add maxL t0,tau to main results file if transientWindowType
parent
2834bb6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
pyfstat/grid_based_searches.py
pyfstat/grid_based_searches.py
+12
-6
No files found.
pyfstat/grid_based_searches.py
View file @
0c41b602
...
...
@@ -164,12 +164,18 @@ class GridSearch(BaseSearchClass):
detstat
=
self
.
search
.
get_det_stat
(
*
vals
)
windowRange
=
getattr
(
self
.
search
,
'windowRange'
,
None
)
FstatMap
=
getattr
(
self
.
search
,
'FstatMap'
,
None
)
data
.
append
(
list
(
vals
)
+
[
detstat
])
if
self
.
outputTransientFstatMap
and
self
.
transientWindowType
:
tCWfile
=
os
.
path
.
splitext
(
self
.
out_file
)[
0
]
+
'_tCW_%.16f_%.16f_%.16f_%.16g_%.16g.dat'
%
(
vals
[
2
],
vals
[
5
],
vals
[
6
],
vals
[
3
],
vals
[
4
])
# freq alpha delta f1dot f2dot
fo
=
lal
.
FileOpen
(
tCWfile
,
'w'
)
lalpulsar
.
write_transientFstatMap_to_fp
(
fo
,
FstatMap
,
windowRange
,
None
)
del
fo
# instead of lal.FileClose() which is not SWIG-exported
thisCand
=
list
(
vals
)
+
[
detstat
]
if
self
.
transientWindowType
:
if
self
.
outputTransientFstatMap
:
tCWfile
=
os
.
path
.
splitext
(
self
.
out_file
)[
0
]
+
'_tCW_%.16f_%.16f_%.16f_%.16g_%.16g.dat'
%
(
vals
[
2
],
vals
[
5
],
vals
[
6
],
vals
[
3
],
vals
[
4
])
# freq alpha delta f1dot f2dot
fo
=
lal
.
FileOpen
(
tCWfile
,
'w'
)
lalpulsar
.
write_transientFstatMap_to_fp
(
fo
,
FstatMap
,
windowRange
,
None
)
del
fo
# instead of lal.FileClose() which is not SWIG-exported
Fmn
=
FstatMap
.
F_mn
.
data
maxidx
=
np
.
unravel_index
(
Fmn
.
argmax
(),
Fmn
.
shape
)
thisCand
+=
[
windowRange
.
t0
+
maxidx
[
0
]
*
windowRange
.
dt0
,
windowRange
.
tau
+
maxidx
[
1
]
*
windowRange
.
dtau
]
data
.
append
(
thisCand
)
data
=
np
.
array
(
data
,
dtype
=
np
.
float
)
if
return_data
:
...
...
Write
Preview
Markdown
is supported
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