Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyFstat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yuanhao
PyFstat
Commits
c5e25404
Commit
c5e25404
authored
7 years ago
by
Gregory Ashton
Browse files
Options
Downloads
Patches
Plain Diff
Minor formatting issues in GridSearch
parent
6d385885
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyfstat/grid_based_searches.py
+10
-5
10 additions, 5 deletions
pyfstat/grid_based_searches.py
with
10 additions
and
5 deletions
pyfstat/grid_based_searches.py
+
10
−
5
View file @
c5e25404
...
@@ -128,7 +128,9 @@ class GridSearch(BaseSearchClass):
...
@@ -128,7 +128,9 @@ class GridSearch(BaseSearchClass):
if
args
.
clean
:
if
args
.
clean
:
return
False
return
False
if
os
.
path
.
isfile
(
self
.
out_file
)
is
False
:
if
os
.
path
.
isfile
(
self
.
out_file
)
is
False
:
logging
.
info
(
'
No old data found in
"
{:s}
"
, continuing with grid search
'
.
format
(
self
.
out_file
))
logging
.
info
(
'
No old data found in
"
{:s}
"
, continuing with grid search
'
.
format
(
self
.
out_file
))
return
False
return
False
if
self
.
sftfilepattern
is
not
None
:
if
self
.
sftfilepattern
is
not
None
:
oldest_sft
=
min
([
os
.
path
.
getmtime
(
f
)
for
f
in
oldest_sft
=
min
([
os
.
path
.
getmtime
(
f
)
for
f
in
...
@@ -139,13 +141,16 @@ class GridSearch(BaseSearchClass):
...
@@ -139,13 +141,16 @@ class GridSearch(BaseSearchClass):
return
False
return
False
data
=
np
.
atleast_2d
(
np
.
genfromtxt
(
self
.
out_file
,
delimiter
=
'
'
))
data
=
np
.
atleast_2d
(
np
.
genfromtxt
(
self
.
out_file
,
delimiter
=
'
'
))
if
np
.
all
(
data
[:,
0
:
len
(
self
.
coord_arrays
)]
==
self
.
input_data
[:,
0
:
len
(
self
.
coord_arrays
)]):
if
np
.
all
(
data
[:,
0
:
len
(
self
.
coord_arrays
)]
==
self
.
input_data
[:,
0
:
len
(
self
.
coord_arrays
)]):
logging
.
info
(
logging
.
info
(
'
Old data found in
"
{:s}
"
with matching input, no search performed
'
.
format
(
self
.
out_file
))
'
Old data found in
"
{:s}
"
with matching input, no search
'
'
performed
'
.
format
(
self
.
out_file
))
return
data
return
data
else
:
else
:
logging
.
info
(
logging
.
info
(
'
Old data found in
"
{:s}
"
, input differs, continuing with grid search
'
.
format
(
self
.
out_file
))
'
Old data found in
"
{:s}
"
, input differs, continuing with
'
'
grid search
'
.
format
(
self
.
out_file
))
return
False
return
False
return
False
return
False
...
@@ -165,7 +170,7 @@ class GridSearch(BaseSearchClass):
...
@@ -165,7 +170,7 @@ class GridSearch(BaseSearchClass):
windowRange
=
getattr
(
self
.
search
,
'
windowRange
'
,
None
)
windowRange
=
getattr
(
self
.
search
,
'
windowRange
'
,
None
)
FstatMap
=
getattr
(
self
.
search
,
'
FstatMap
'
,
None
)
FstatMap
=
getattr
(
self
.
search
,
'
FstatMap
'
,
None
)
thisCand
=
list
(
vals
)
+
[
detstat
]
thisCand
=
list
(
vals
)
+
[
detstat
]
if
self
.
transientWindowType
:
if
hasattr
(
self
,
'
transientWindowType
'
)
:
if
self
.
outputTransientFstatMap
:
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
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
'
)
fo
=
lal
.
FileOpen
(
tCWfile
,
'
w
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment