Skip to content

Imprecise run re-numbering #1

Description

@laurenkahn

Replacing the run number (for ex, 02) sometimes results in replacing the subject ID since the entire path (including sub-REV002, for example) is searched

os.rename(targetfile_fullpath, targetfile_fullpath.replace(found_file[run_index + 5:run_index + 7], new_runnum))

I made a new replacement string:
new_runstr = 'run-' + new_runnum

And replaced the os.rename() line with this:
os.rename(targetfile_fullpath, targetfile_fullpath.replace(found_file[run_index + 1:run_index + 7], new_runstr))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions