Order of different runs

Hello everyone,

I have a question about how heudiconv treats the order of different runs. Lets say that I have to resting state runs in the same session.

Does heudiconv assigns run-01/run-02 randomly? or it automatically assigns run-01 to the first RS acquired?

Thanks in advance!

Best,

Mai

It depends on how your heuristics.py is defined, but most use the item key for the run number, which is the index of the group is from. I believe it should be consistent, the files read from the filesystem are sorted before being used.

@mgxd can you confirm?

heudiconv groups the series in ascending order - you can see the order of a particular subject’s scan if you look at the dicominfo.tsv file generated in <output-directory>/.heudiconv/<subject>/info/

so if you have two T1 series during a scan session (1 at the beginning and 1 at the end) and you assign both to a key with the {item} formatter, item-1 will be the first scan and item-2 will be the last.

1 Like

Great! Thank you very much!!! This info was very useful!