Repository navigation
[MRG] Add support for adding dig points from montage. - #4444
Conversation
|
Ready for review. |
|
+1 for merge when CIs are happy and what's new is updated. |
christianbrodbeck
left a comment
There was a problem hiding this comment.
Apart from the comment looks good to me.
| if info['dig'] is None: | ||
| try: | ||
| info = read_info(self.file, verbose=False) | ||
| except ValueError: # try reading dig_montage |
There was a problem hiding this comment.
I don't like silencing errors that might be real.
Could the modification be in read_info(), which could create an info dict when given a montage file?
There was a problem hiding this comment.
How about just logging the error message before looking for DigMontage? I don't like the idea of changing the behavior of the public function.
There was a problem hiding this comment.
That will clutter the log with an error message in the other case where there is no error to be concerned about. I think returning an info dict with the montage would be a logical extension of read_info (only change a case that was not functional previously), but if you don't want to change read_info, can you read the header of the file to determine what kind of file it is and treat it accordingly?
Codecov Report
@@ Coverage Diff @@
## master #4444 +/- ##
==========================================
+ Coverage 82.82% 82.83% +<.01%
==========================================
Files 349 349
Lines 64424 64452 +28
Branches 9915 9919 +4
==========================================
+ Hits 53361 53388 +27
Misses 8324 8324
- Partials 2739 2740 +1 |
|
@christianbrodbeck merge when you're happy |
e978498 to
96a5287
Compare
|
Now it checks the file header. |
|
thx @jaeilepp |
|
Should I update the SPM dataset again and use the dig montage instead of the raw file? |
|
it would be cleaner indeed. thx
|
Allows reading the digitization points from a saved
DigMontage.