Skip to content

Commit

Permalink
Merge pull request #682 from neurorepro/studyuid
Browse files Browse the repository at this point in the history
Fix inconsistent behavior of existing session when using -d compared to --files option
  • Loading branch information
yarikoptic authored Jun 9, 2023
2 parents f4e4896 + a7d4af1 commit 7093ed4
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions heudiconv/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,9 @@ def infotoids(
)
lgr.info("Study session for %r", study_session_info)

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

0 comments on commit 7093ed4

Please sign in to comment.