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
Gregory Ashton
PyFstat
Commits
9c84967a
Commit
9c84967a
authored
Dec 20, 2017
by
Gregory Ashton
Browse files
Adds the basic header with simple information
parent
38c217a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyfstat/grid_based_searches.py
View file @
9c84967a
...
...
@@ -186,10 +186,21 @@ class GridSearch(BaseSearchClass):
if
return_data
:
return
data
else
:
logging
.
info
(
'Saving data to {}'
.
format
(
self
.
out_file
))
np
.
savetxt
(
self
.
out_file
,
data
,
delimiter
=
' '
)
self
.
save_array_to_disk
(
data
)
self
.
data
=
data
def
get_header
(
self
):
header
=
';'
.
join
([
'date:{}'
.
format
(
str
(
datetime
.
datetime
.
now
())),
'user:{}'
.
format
(
getpass
.
getuser
()),
'hostname:{}'
.
format
(
socket
.
gethostname
())])
header
+=
'
\n
'
+
' '
.
join
(
self
.
keys
)
return
header
def
save_array_to_disk
(
self
,
data
):
logging
.
info
(
'Saving data to {}'
.
format
(
self
.
out_file
))
header
=
self
.
get_header
()
np
.
savetxt
(
self
.
out_file
,
data
,
delimiter
=
' '
,
header
=
header
)
def
convert_F0_to_mismatch
(
self
,
F0
,
F0hat
,
Tseg
):
DeltaF0
=
F0
[
1
]
-
F0
[
0
]
m_spacing
=
(
np
.
pi
*
Tseg
*
DeltaF0
)
**
2
/
12.
...
...
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