Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
BF: Name conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
bpoldrack committed Aug 29, 2018
1 parent 0b5d39f commit 28ebabf
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions datalad_hirni/commands/dicom2spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,22 +245,22 @@ def __call__(path=None, spec=None, dataset=None, subject=None,
# ignore duplicates (prob. reruns of aborted runs)
# -> convert highest id only
import datalad_hirni.support.hirni_heuristic as heuristic
spec = sorted(spec_series_list,
key=lambda x: heuristic.get_specval(x, 'id'))
for i in range(len(spec)):
if spec[i]["type"] == "dicomseries" and \
heuristic.has_specval(spec[i], "converter") and \
heuristic.get_specval(spec[i], "bids_run") in \
spec_series_list = sorted(spec_series_list,
key=lambda x: heuristic.get_specval(x, 'id'))
for i in range(len(spec_series_list)):
if spec_series_list[i]["type"] == "dicomseries" and \
heuristic.has_specval(spec_series_list[i], "converter") and \
heuristic.get_specval(spec_series_list[i], "bids_run") in \
[heuristic.get_specval(s, "bids_run")
for s in spec[i + 1:]
for s in spec_series_list[i + 1:]
if heuristic.get_specval(s,
"description") == heuristic.get_specval(
spec[i], "description") and \
spec_series_list[i], "description") and \
heuristic.get_specval(s,
"id") > heuristic.get_specval(
spec[i], "id")]:
spec_series_list[i], "id")]:
lgr.debug("Set converter to None for SeriesNumber %s" % i)
spec[i]["converter"] = dict(approved=True, value=None)
spec_series_list[i]["converter"] = dict(approved=True, value=None)

lgr.debug("Storing specification (%s)", spec)
# store as a stream (one record per file) to be able to
Expand Down

0 comments on commit 28ebabf

Please sign in to comment.