Skip to content

Commit 7093ed4

Browse files
authored
Merge pull request #682 from neurorepro/studyuid
Fix inconsistent behavior of existing session when using -d compared to --files option
2 parents f4e4896 + a7d4af1 commit 7093ed4

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

heudiconv/parser.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,9 @@ def infotoids(
278278
)
279279
lgr.info("Study session for %r", study_session_info)
280280

281-
if study_session_info in study_sessions:
282-
if grouping != "all":
283-
# MG - should this blow up to mimic -d invocation?
284-
lgr.warning(
285-
"Existing study session with the same values (%r)."
286-
" Skipping DICOMS %s",
287-
study_session_info,
288-
seqinfo.values(),
289-
)
290-
continue
281+
if grouping != "all":
282+
assert (study_session_info not in study_sessions), (
283+
f"Existing study session {study_session_info} "
284+
f"already in analyzed sessions {study_sessions.keys()}")
291285
study_sessions[study_session_info] = seqinfo
292286
return study_sessions

0 commit comments

Comments
 (0)