-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG: Expand ~ in _check_fname() #9613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6cb7bea
5006a4a
996f16b
438ee16
2c0d14c
b4d589f
98f495d
540cc57
4567d42
97cbbe1
5669af2
80bd7fb
704c9f1
b1d4df3
44b3863
70dd640
1356a2d
1c49564
5209027
d45fcd6
c5f031f
9a1d5da
e389a27
2c989c5
2d56533
6e874f5
16e865a
921d1e1
8ddd827
b22313d
25a85a4
a80604e
bd76c1e
8a0c8b0
48c2504
41555e2
622da4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,9 +41,10 @@ | |
| from ..source_estimate import _make_stc, _get_src_type | ||
| from ..utils import (check_fname, logger, verbose, warn, _validate_type, | ||
| _check_compensation_grade, _check_option, | ||
| _check_depth, _check_src_normal) | ||
| _check_depth, _check_src_normal, _check_fname) | ||
| from ..data.html_templates import inverse_operator_template | ||
|
|
||
|
|
||
| INVERSE_METHODS = ('MNE', 'dSPM', 'sLORETA', 'eLORETA') | ||
|
|
||
|
|
||
|
|
@@ -132,7 +133,7 @@ def read_inverse_operator(fname, verbose=None): | |
| """ | ||
| check_fname(fname, 'inverse operator', ('-inv.fif', '-inv.fif.gz', | ||
| '_inv.fif', '_inv.fif.gz')) | ||
|
|
||
| fname = _check_fname(fname=fname, must_exist=True, overwrite='read') | ||
| # | ||
| # Open the file, create directory | ||
| # | ||
|
|
@@ -350,6 +351,8 @@ def write_inverse_operator(fname, inv, verbose=None): | |
| """ | ||
| check_fname(fname, 'inverse operator', ('-inv.fif', '-inv.fif.gz', | ||
| '_inv.fif', '_inv.fif.gz')) | ||
|
Comment on lines
352
to
353
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be better / simpler just to make Or we could go the other way and make
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I was thinking the same, however I don't want to touch this in this PR to avoid unwelcome surprises and to keep the diff smaller.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you open an issue about this? It would make a hopefully straightforward follow-up PR
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Issue filed under #9819 |
||
| fname = _check_fname(fname=fname, overwrite=True) | ||
|
|
||
| _validate_type(inv, InverseOperator, 'inv') | ||
|
|
||
| # | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.