[Code 39] INCONSISTENT_PARAMETERS

Hello Neurostars experts,

I am trying to convert a dataset using heudiconv with the script
implement_heudiconv.txt (2.0 KB)
to convert my dataset from DICOM to BIDS. However, I am getting the following Warning when testing for the BIDS validity, that seems concerning, given that the file size seems way smaller that what it is supposed to be: only 5 TRs instead of 147…??? What could be happening here?
I use Docker on a MacOs Monterey V. 12.6.2

sub-F019_task-phantom_run-006_bold.nii.gz2991.503 KB | application/x-gzip
Location:
Nifti/sub-F019/func/sub-F019_task-phantom_run-006_bold.nii.gz

Reason:
The most common set of dimensions is: 112,112,38,147 (voxels), This file has the dimensions: 112,112,46,5 (voxels).

Code within the heuristic.py file:

def create_key(template, outtype=('nii.gz',), annotation_classes=None):
    if template is None or not template:
        raise ValueError('Template must be a valid format string')
    return template, outtype, annotation_classes


def infotodict(seqinfo):
    """Heuristic evaluator for determining which runs belong where

    allowed template fields - follow python string module:

    item: index within category
    subject: participant id
    seqitem: run number during scanning
    subindex: sub index within group
    """

    # paths done in BIDS format
    t1w = create_key('sub-{subject}/anat/sub-{subject}_run-{item:03d}_T1w')
    phantom = create_key('sub-{subject}/func/sub-{subject}_task-phantom_run-{item:03d}_bold')
    loc = create_key('sub-{subject}/func/sub-{subject}_task-localizer_run-{item:03d}_bold')
    prf = create_key('sub-{subject}/func/sub-{subject}_task-prf_run-{item:03d}_bold')
    rest = create_key('sub-{subject}/func/sub-{subject}_task-rest_run-{item:03d}_bold')
    info = {t1w: [], phantom: [], loc: [], prf: [], rest: []}

    # last_run = len(seqinfo)

    for s in seqinfo:
        """
        The namedtuple `s` contains the following fields:

        * total_files_till_now
        * example_dcm_file
        * series_id
        * dcm_dir_name
        * unspecified2
        * unspecified3
        * dim1
        * dim2
        * dim3
        * dim4
        * TR
        * TE
        * protocol_name
        * is_motion_corrected
        * is_derived
        * patient_id
        * study_description
        * referring_physician_name
        * series_description
        * image_type
        """

        if 'T1' in s.series_description:
            info[t1w].append(s.series_id)
        if 'Exp' in s.series_description:
            info[phantom].append(s.series_id)
        if ('LOC' in s.series_description) and ('Localizer' in s.study_description):
            info[loc].append(s.series_id)
        if ('LOC' in s.series_description) and ('Prf' in s.study_description):
            info[prf].append(s.series_id)
        if 'Rest' in s.series_description:
            info[rest].append(s.series_id)
    return info

dicominfo.tsv file:

total_files_till_now	example_dcm_file	series_id	dcm_dir_name	series_files	unspecified	dim1	dim2	dim3	dim4	TR	TE	protocol_name	is_motion_corrected	is_derived	patient_id	study_description	referring_physician_name	series_description	sequence_name	image_type	accession_number	patient_age	patient_sex	date	series_uid	time
55786	Tong_349954.01.01.13-06-23.WIP_Survey_32ch_HeadCoil.01-classic1.DCM	7101-WIP Survey_32ch_HeadCoil	DICOM-Classic	9		256	256	9	1	0.0101482	4.934	WIP Survey_32ch_HeadCoil	FALSE	FALSE	Tong_349954			Survey_32ch_HeadCoil		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7101.1679601576.1.296485376	None
55846	Tong_349954.02.01.13-08-33.WIP_B0_unshimmed.01-classic1.DCM	7201-WIP B0 unshimmed	DICOM-Classic	60		64	64	60	1	0.004	1.577	WIP B0 unshimmed	FALSE	FALSE	Tong_349954			B0 unshimmed		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7201.1679601576.1.296485376	None
55906	Tong_349954.03.01.13-13-03.WIP_B0_shimmed.01-classic1.DCM	7301-WIP B0 shimmed	DICOM-Classic	60		64	64	60	1	0.004	1.577	WIP B0 shimmed	FALSE	FALSE	Tong_349954			B0 shimmed		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7301.1679601575.1.296485376	None
56206	Tong_349954.04.01.13-13-52.WIP_RL_MPRAGE0.6mm_PEdirRL_SENSE.01-classic1.DCM	7401-WIP RL_MPRAGE0.6mm_PEdirRL SENSE	DICOM-Classic	300		448	448	300	1	0.0056053	2.558	WIP RL_MPRAGE0.6mm_PEdirRL SENSE	FALSE	FALSE	Tong_349954			WIP RL_MPRAGE0.6mm_PEdirRL SENSE		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7401.1679601565.1.296485376	None
56248	Tong_349954.05.01.13-18-00.WIP_ssEPI_FFE_testIM.01-classic1.DCM	7501-WIP ssEPI_FFE_testIM	DICOM-Classic	42		112	112	42	1	1.999998047	25.001	WIP ssEPI_FFE_testIM	FALSE	FALSE	Tong_349954			ssEPI_FFE_testIM		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7501.1679601574.1.296485376	None
56294	Tong_349954.06.01.13-18-52.WIP_func_noEPI.01-classic1.DCM	7601-WIP func_noEPI	DICOM-Classic	46		112	112	46	1	2.000001831	25	WIP func_noEPI	FALSE	FALSE	Tong_349954			func_noEPI		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7601.1679601564.1.296485376	None
61994	Tong_349954.07.01.13-22-04.WIP_ssEPI_LOC_150.01-classic1.DCM	7701-WIP ssEPI_LOC_150	DICOM-Classic	5700		112	112	5700	1	2.000000854	25	WIP ssEPI_LOC_150	FALSE	FALSE	Tong_349954	Localizer		ssEPI_LOC_150		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7701.1679601036.1.296485376	None
62224	Tong_349954.08.01.13-29-06.WIP_ssEPI_LOC_TU.01-classic1.DCM	7801-WIP ssEPI_LOC_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_LOC_TU	FALSE	FALSE	Tong_349954			ssEPI_LOC_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7801.1679601029.1.296485376	None
67810	Tong_349954.09.01.13-29-56.WIP_ssEPI_Exp_147.01-classic1.DCM	7901-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7901.1679600525.1.296485376	None
68040	Tong_349954.10.01.13-38-15.WIP_ssEPI_Exp_TU.01-classic1.DCM	8001-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954			ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8001.1679600519.1.296485376	None
73626	Tong_349954.11.01.13-39-05.WIP_ssEPI_Exp_147.01-classic1.DCM	8101-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8101.1679600004.1.296485632	None
73856	Tong_349954.12.01.13-46-24.WIP_ssEPI_Exp_TU.01-classic1.DCM	8201-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954			ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8201.1679599998.1.296485632	None
79556	Tong_349954.13.01.13-47-14.WIP_ssEPI_LOC_150.01-classic1.DCM	8301-WIP ssEPI_LOC_150	DICOM-Classic	5700		112	112	5700	1	2.000000854	25	WIP ssEPI_LOC_150	FALSE	FALSE	Tong_349954	Prf_CW		ssEPI_LOC_150		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8301.1679599438.1.296485632	None
79786	Tong_349954.14.01.13-55-27.WIP_ssEPI_LOC_TU.01-classic1.DCM	8401-WIP ssEPI_LOC_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_LOC_TU	FALSE	FALSE	Tong_349954			ssEPI_LOC_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8401.1679599431.1.296485632	None
85486	Tong_349954.15.01.13-56-16.WIP_ssEPI_LOC_150.01-classic1.DCM	8501-WIP ssEPI_LOC_150	DICOM-Classic	5700		112	112	5700	1	2.000000854	25	WIP ssEPI_LOC_150	FALSE	FALSE	Tong_349954	Prf_CCW		ssEPI_LOC_150		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8501.1679598877.1.296485632	None
85716	Tong_349954.16.01.14-04-49.WIP_ssEPI_LOC_TU.01-classic1.DCM	8601-WIP ssEPI_LOC_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_LOC_TU	FALSE	FALSE	Tong_349954			ssEPI_LOC_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8601.1679598869.1.296485632	None
85890	Tong_349954.17.01.14-06-27.WIP_T1_LGN_SENSE.01-classic1.DCM	8701-WIP T1_LGN SENSE	DICOM-Classic	174		256	256	174	1	0.0040366	1.814	WIP T1_LGN SENSE	FALSE	FALSE	Tong_349954			WIP T1_LGN SENSE		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8701.1679598867.1.296485632	None
91590	Tong_349954.18.01.14-10-28.WIP_ssEPI_LOC_150.01-classic1.DCM	8801-WIP ssEPI_LOC_150	DICOM-Classic	5700		112	112	5700	1	2.000000854	25	WIP ssEPI_LOC_150	FALSE	FALSE	Tong_349954	Prf_CCW		ssEPI_LOC_150		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8801.1679598313.1.296485632	None
91820	Tong_349954.19.01.14-17-55.WIP_ssEPI_LOC_TU.01-classic1.DCM	8901-WIP ssEPI_LOC_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_LOC_TU	FALSE	FALSE	Tong_349954			ssEPI_LOC_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8901.1679598306.1.296485632	None
97406	Tong_349954.20.01.14-18-46.WIP_ssEPI_Exp_147.01-classic1.DCM	9001-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9001.1679597769.1.296485632	None
97636	Tong_349954.21.01.14-28-51.WIP_ssEPI_Exp_TU.01-classic1.DCM	9101-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954			ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9101.1679597762.1.296485632	None
103222	Tong_349954.22.01.14-29-41.WIP_ssEPI_Exp_147.01-classic1.DCM	9201-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9201.1679597228.1.296485632	None
103452	Tong_349954.23.01.14-37-30.WIP_ssEPI_Exp_TU.01-classic1.DCM	9301-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954			ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9301.1679597221.1.296485632	None
109038	Tong_349954.24.01.14-38-20.WIP_ssEPI_Exp_147.01-classic1.DCM	9401-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9401.1679596684.1.296485632	None
109268	Tong_349954.25.01.14-45-03.WIP_ssEPI_Exp_TU.01-classic1.DCM	9501-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954			ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9501.1679596677.1.296485632	None
114854	Tong_349954.26.01.14-45-54.WIP_ssEPI_Exp_147.01-classic1.DCM	9601-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9601.1679596125.1.296485632	None
115084	Tong_349954.27.01.14-52-48.WIP_ssEPI_Exp_TU.01-classic1.DCM	9701-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954			ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9701.1679596118.1.296485632	None
117364	Tong_349954.28.01.14-53-39.WIP_ssEPI_Rest.01-classic1.DCM	9801-WIP ssEPI_Rest	DICOM-Classic	2280		112	112	2280	1	2.000000854	25	WIP ssEPI_Rest	FALSE	FALSE	Tong_349954			ssEPI_Rest		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9801.1679596024.1.296485632	None
117594	Tong_349954.29.01.14-57-40.WIP_ssEPI_Rest_TU.01-classic1.DCM	9901-WIP ssEPI_Rest_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Rest_TU	FALSE	FALSE	Tong_349954			ssEPI_Rest_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9901.1679596021.1.296485632	None

I also noticed that the number of niftii files, and therefore runs is twice higher for the experiment functional runs (goes from run-001 to run-014 instead of run-001 to run-007.
Is there anything I did wrong in the process?

Any help would be highly appreciated.

Thanks!
Best,
-Loïc

It looks like you have ssEPI_<name>_<nvols> and ssEPI_<name>_TU pairs. I would guess that the _TU are reverse-phase-encoded EPIs for use with TOPUP, in which case those should be renamed to fmap/*_epi.nii.gz files. Do you know if you were collecting TOPUP-style fieldmaps?

1 Like

Hi,

Thanks a lot for your response.
Yes I was running topup scans at the end of each functional run.

How may I deal with those pairs?

Defining fmap/…epi.nii.gz for topup runs with the heuristic.py file would solve my issue do you think?
Or is there anything else I should do?
Thanks!
Best,
-Loïc

I think that should work (note: I am passingly familiar with heudiconv, not an expert). You will probably also want to mark your EPIs as being intended to correct the corresponding BOLD files. See Magnetic Resonance Imaging - Brain Imaging Data Structure v1.8.0 for this.

I would recommend using the B0FieldSource/B0FieldIdentifier approach, as that is more explicit and flexible than IntendedFor. Note that if you expect to use the BOLD series as one of the inputs for estimating the field in TOPUP, then the BOLD files and corresponding EPI files should have matching B0FieldSource values.

1 Like

Hi there,

Thanks for all your advices. Newbie here.

I am still struggling to get my data validated. Here are the warnings/errors I get:
#### **Error 1: [Code 1] NOT_INCLUDED**
This is due to my fieldmap files. The filename is of the type: sub-F019_acq-b0shimmed_run-001_fieldmap1.json or sub-F019_acq-b0shimmed_run-001_fieldmap1.nii.gz

For some reason, for the shimmed and unshimmed initial scans that we run, I have 2 files generated for each, and it triggers heudiconv to name them as …fieldmap1 and fieldmap2 . Then, I think this prevents heudiconv to consider those scans as fieldmaps. When I rename them without 1 and 2 at the end of the filename, it generates more errors of the type:

#### **Error 1: [Code 17] UNITS_MUST_DEFINE**
You have to define 'Units' for this file.

and

Error 4: [Code 91] _FIELDMAP_WITHOUT_MAGNITUDE_FILE
Click here for more information about this issue

_fieldmap.nii[.gz] file does not have accompanying _magnitude.nii[.gz] file

It makes myself wonder if those data actually are fieldmaps.

(their initial name when I download the data from the scanner is Tong_349767.02.01.13-47-32.WIP_B0_unshimmed.01_e1…, Tong_349767.02.01.13-47-32.WIP_B0_unshimmed.01_e2, etc).

#### **Error 2: [Code 18] PHASE_ENCODING_DIRECTION_MUST_DEFINE**

You have to define ‘PhaseEncodingDirection’ for this file.15 files
This error is for the files of the type: /sub-F019/fmap/sub-F019_acq-phtopup_dir-col_run-001_epi.nii.gz . This is the paired top up scan that we ran at the end of each experimental run. How can I find this measure in my data?

I assume this is different from “InPlanePhaseEncodingDirectionDICOM”: “COL” that is already in the associated sidecar .json file right?

#### **Error 3: [Code 19] TOTAL_READOUT_TIME_MUST_DEFINE**

You have to define 'TotalReadoutTime' for this file.

Same here, it concerns the files of the type sub-F019_acq-phtopup_dir-col_run-001_epi.nii.gz. What is this readout time and where should I be able to find it?

I know this is a lot of questions, and I apologize but I currently don’t have anybody to help me in the lab…

One last issue I am having is that heudiconv ignores completely the processing of my localizer and prf mapping runs. They end up not being converted into BIDS, and are absent from the bids folder.

I am not sure where my error is in my heuristic.py file, so here is the code:

import os


def create_key(template, outtype=('nii.gz',), annotation_classes=None):
    if template is None or not template:
        raise ValueError('Template must be a valid format string')
    return template, outtype, annotation_classes


def infotodict(seqinfo):
    """Heuristic evaluator for determining which runs belong where

    allowed template fields - follow python string module:

    item: index within category
    subject: participant id
    seqitem: run number during scanning
    subindex: sub index within group
    """
    # paths done in BIDS format
    t1w = create_key('sub-{subject}/anat/sub-{subject}_run-{item:03d}_T1w')
    mprage = create_key('sub-{subject}/anat/sub-{subject}_acq-mprage_T1w')
    phantom = create_key('sub-{subject}/func/sub-{subject}_task-phantom_run-{item:03d}_bold')
    loc = create_key('sub-{subject}/func/sub-{subject}_task-localizer_run-{item:03d}_bold')
    prf = create_key('sub-{subject}/func/sub-{subject}_task-prf_run-{item:03d}_bold')
    rest = create_key('sub-{subject}/func/sub-{subject}_task-rest_run-{item:03d}_bold')
    # field distortion correction
    # 1: fieldmaps
    b0shimmed = create_key('sub-{subject}/fmap/sub-{subject}_acq-b0shimmed_run-{item:03d}_fieldmap')
    b0unshimmed = create_key('sub-{subject}/fmap/sub-{subject}_acq-b0unshimmed_run-{item:03d}_fieldmap')
    # 2: topup epi
    phtopup = create_key('sub-{subject}/fmap/sub-{subject}_acq-phtopup_dir-col_run-{item:03d}_epi')
    loctopup = create_key('sub-{subject}/fmap/sub-{subject}_acq-loctopup_dir-col_run-{item:03d}_epi')
    prftopup = create_key('sub-{subject}/fmap/sub-{subject}_acq-prftopup_dir-col_run-{item:03d}_epi')
    resttopup = create_key('sub-{subject}/fmap/sub-{subject}_acq-resttopup_dir-col_run-{item:03d}_epi')
    info = {t1w: [], mprage: [], phantom: [], loc: [], prf: [], rest: [], b0shimmed: [], b0unshimmed: [], phtopup: [], loctopup: [], prftopup: [], resttopup: []}

    for s in seqinfo:

        """
        The namedtuple `s` contains the following fields:

        * total_files_till_now
        * example_dcm_file
        * series_id
        * dcm_dir_name
        * unspecified2
        * unspecified3
        * dim1
        * dim2
        * dim3
        * dim4
        * TR
        * TE
        * protocol_name
        * is_motion_corrected
        * is_derived
        * patient_id
        * study_description
        * referring_physician_name
        * series_description
        * image_type
        """
        if 'T1' in s.series_description:
            info[t1w].append(s.series_id)
        if 'MPRAGE' in s.series_description:
            info[mprage].append(s.series_id)
        if 'Exp_147' in s.series_description:
            info[phantom].append(s.series_id)
        if ('LOC_150' in s.series_description) and ('Localizer' in s.study_description):
            info[loc].append(s.series_id)
        if ('LOC_150' in s.series_description) and ('Prf' in s.study_description):
            info[prf].append(s.series_id)
        if ('Rest' in s.series_description) and ('TU' not in s.study_description):
            info[rest].append(s.series_id)
        if 'shimmed' in s.series_description:
            info[b0shimmed].append(s.series_id)
        if 'unshimmed' in s.series_description:
            info[b0unshimmed].append(s.series_id)
        if 'Exp_TU' in s.series_description:
            info[phtopup].append(s.series_id)
        if ('LOC_TU' in s.series_description) and ('Localizer' in s.study_description):
            info[loctopup].append(s.series_id)
        if ('LOC_TU' in s.series_description) and ('Prf' in s.study_description):
            info[prftopup].append(s.series_id)
        if 'Rest_TU' in s.series_description:
            info[resttopup].append(s.series_id)
    return info

And here is what is in dicominfo.tsv file I edited:

total_files_till_now	example_dcm_file	series_id	dcm_dir_name	series_files	unspecified	dim1	dim2	dim3	dim4	TR	TE	protocol_name	is_motion_corrected	is_derived	patient_id	study_description	referring_physician_name	series_description	sequence_name	image_type	accession_number	patient_age	patient_sex	date	series_uid	time
55786	Tong_349954.01.01.13-06-23.WIP_Survey_32ch_HeadCoil.01-classic1.DCM	7101-WIP Survey_32ch_HeadCoil	DICOM-Classic	9		256	256	9	1	0.0101482	4.934	WIP Survey_32ch_HeadCoil	FALSE	FALSE	Tong_349954			Survey_32ch_HeadCoil		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7101.1679601576.1.296485376	None
55846	Tong_349954.02.01.13-08-33.WIP_B0_unshimmed.01-classic1.DCM	7201-WIP B0 unshimmed	DICOM-Classic	60		64	64	60	1	0.004	1.577	WIP B0 unshimmed	FALSE	FALSE	Tong_349954			B0 unshimmed		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7201.1679601576.1.296485376	None
55906	Tong_349954.03.01.13-13-03.WIP_B0_shimmed.01-classic1.DCM	7301-WIP B0 shimmed	DICOM-Classic	60		64	64	60	1	0.004	1.577	WIP B0 shimmed	FALSE	FALSE	Tong_349954			B0 shimmed		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7301.1679601575.1.296485376	None
56206	Tong_349954.04.01.13-13-52.WIP_RL_MPRAGE0.6mm_PEdirRL_SENSE.01-classic1.DCM	7401-WIP RL_MPRAGE0.6mm_PEdirRL SENSE	DICOM-Classic	300		448	448	300	1	0.0056053	2.558	WIP RL_MPRAGE0.6mm_PEdirRL SENSE	FALSE	FALSE	Tong_349954			WIP RL_MPRAGE0.6mm_PEdirRL SENSE		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7401.1679601565.1.296485376	None
56248	Tong_349954.05.01.13-18-00.WIP_ssEPI_FFE_testIM.01-classic1.DCM	7501-WIP ssEPI_FFE_testIM	DICOM-Classic	42		112	112	42	1	1.999998047	25.001	WIP ssEPI_FFE_testIM	FALSE	FALSE	Tong_349954			ssEPI_FFE_testIM		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7501.1679601574.1.296485376	None
56294	Tong_349954.06.01.13-18-52.WIP_func_noEPI.01-classic1.DCM	7601-WIP func_noEPI	DICOM-Classic	46		112	112	46	1	2.000001831	25	WIP func_noEPI	FALSE	FALSE	Tong_349954			func_noEPI		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7601.1679601564.1.296485376	None
61994	Tong_349954.07.01.13-22-04.WIP_ssEPI_LOC_150.01-classic1.DCM	7701-WIP ssEPI_LOC_150	DICOM-Classic	5700		112	112	5700	1	2.000000854	25	WIP ssEPI_LOC_150	FALSE	FALSE	Tong_349954	Localizer		ssEPI_LOC_150		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7701.1679601036.1.296485376	None
62224	Tong_349954.08.01.13-29-06.WIP_ssEPI_LOC_TU.01-classic1.DCM	7801-WIP ssEPI_LOC_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_LOC_TU	FALSE	FALSE	Tong_349954	Localizer		ssEPI_LOC_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7801.1679601029.1.296485376	None
67810	Tong_349954.09.01.13-29-56.WIP_ssEPI_Exp_147.01-classic1.DCM	7901-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.7901.1679600525.1.296485376	None
68040	Tong_349954.10.01.13-38-15.WIP_ssEPI_Exp_TU.01-classic1.DCM	8001-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8001.1679600519.1.296485376	None
73626	Tong_349954.11.01.13-39-05.WIP_ssEPI_Exp_147.01-classic1.DCM	8101-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8101.1679600004.1.296485632	None
73856	Tong_349954.12.01.13-46-24.WIP_ssEPI_Exp_TU.01-classic1.DCM	8201-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8201.1679599998.1.296485632	None
79556	Tong_349954.13.01.13-47-14.WIP_ssEPI_LOC_150.01-classic1.DCM	8301-WIP ssEPI_LOC_150	DICOM-Classic	5700		112	112	5700	1	2.000000854	25	WIP ssEPI_LOC_150	FALSE	FALSE	Tong_349954	Prf_CW		ssEPI_LOC_150		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8301.1679599438.1.296485632	None
79786	Tong_349954.14.01.13-55-27.WIP_ssEPI_LOC_TU.01-classic1.DCM	8401-WIP ssEPI_LOC_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_LOC_TU	FALSE	FALSE	Tong_349954	Prf_CW		ssEPI_LOC_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8401.1679599431.1.296485632	None
85486	Tong_349954.15.01.13-56-16.WIP_ssEPI_LOC_150.01-classic1.DCM	8501-WIP ssEPI_LOC_150	DICOM-Classic	5700		112	112	5700	1	2.000000854	25	WIP ssEPI_LOC_150	FALSE	FALSE	Tong_349954	Prf_CCW		ssEPI_LOC_150		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8501.1679598877.1.296485632	None
85716	Tong_349954.16.01.14-04-49.WIP_ssEPI_LOC_TU.01-classic1.DCM	8601-WIP ssEPI_LOC_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_LOC_TU	FALSE	FALSE	Tong_349954	Prf_CCW		ssEPI_LOC_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8601.1679598869.1.296485632	None
85890	Tong_349954.17.01.14-06-27.WIP_T1_LGN_SENSE.01-classic1.DCM	8701-WIP T1_LGN SENSE	DICOM-Classic	174		256	256	174	1	0.0040366	1.814	WIP T1_LGN SENSE	FALSE	FALSE	Tong_349954			WIP T1_LGN SENSE		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8701.1679598867.1.296485632	None
91590	Tong_349954.18.01.14-10-28.WIP_ssEPI_LOC_150.01-classic1.DCM	8801-WIP ssEPI_LOC_150	DICOM-Classic	5700		112	112	5700	1	2.000000854	25	WIP ssEPI_LOC_150	FALSE	FALSE	Tong_349954	Prf_CCW		ssEPI_LOC_150		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8801.1679598313.1.296485632	None
91820	Tong_349954.19.01.14-17-55.WIP_ssEPI_LOC_TU.01-classic1.DCM	8901-WIP ssEPI_LOC_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_LOC_TU	FALSE	FALSE	Tong_349954	Prf_CCW		ssEPI_LOC_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.8901.1679598306.1.296485632	None
97406	Tong_349954.20.01.14-18-46.WIP_ssEPI_Exp_147.01-classic1.DCM	9001-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9001.1679597769.1.296485632	None
97636	Tong_349954.21.01.14-28-51.WIP_ssEPI_Exp_TU.01-classic1.DCM	9101-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9101.1679597762.1.296485632	None
103222	Tong_349954.22.01.14-29-41.WIP_ssEPI_Exp_147.01-classic1.DCM	9201-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9201.1679597228.1.296485632	None
103452	Tong_349954.23.01.14-37-30.WIP_ssEPI_Exp_TU.01-classic1.DCM	9301-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9301.1679597221.1.296485632	None
109038	Tong_349954.24.01.14-38-20.WIP_ssEPI_Exp_147.01-classic1.DCM	9401-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9401.1679596684.1.296485632	None
109268	Tong_349954.25.01.14-45-03.WIP_ssEPI_Exp_TU.01-classic1.DCM	9501-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9501.1679596677.1.296485632	None
114854	Tong_349954.26.01.14-45-54.WIP_ssEPI_Exp_147.01-classic1.DCM	9601-WIP ssEPI_Exp_147	DICOM-Classic	5586		112	112	5586	1	2.000000854	25	WIP ssEPI_Exp_147	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_147		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9601.1679596125.1.296485632	None
115084	Tong_349954.27.01.14-52-48.WIP_ssEPI_Exp_TU.01-classic1.DCM	9701-WIP ssEPI_Exp_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Exp_TU	FALSE	FALSE	Tong_349954	Phantom		ssEPI_Exp_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9701.1679596118.1.296485632	None
117364	Tong_349954.28.01.14-53-39.WIP_ssEPI_Rest.01-classic1.DCM	9801-WIP ssEPI_Rest	DICOM-Classic	2280		112	112	2280	1	2.000000854	25	WIP ssEPI_Rest	FALSE	FALSE	Tong_349954			ssEPI_Rest		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9801.1679596024.1.296485632	None
117594	Tong_349954.29.01.14-57-40.WIP_ssEPI_Rest_TU.01-classic1.DCM	9901-WIP ssEPI_Rest_TU	DICOM-Classic	230		112	112	230	1	1.999999512	25.001	WIP ssEPI_Rest_TU	FALSE	FALSE	Tong_349954			ssEPI_Rest_TU		('ORIGINAL', 'PRIMARY', 'M_FFE', 'M', 'FFE')		025Y	F	None	0.0.0.0.3.27248.9901.1679596021.1.296485632	None

I appreciate your patience!

Best,
-Loïc

fieldmap1 is not a valid suffix. If these are EPI images, the suffix is epi.

Hi, to get back on this information I looked around for some information on how to do it, and found this very informative page:

It seems for fMRI, the B0FieldIdentifier needs to have matching values between the BOLD files and the EPI files, not the B0FieldSource values. Would you be able to confirm?

Thanks!
Best,
-Loïc

B0FieldIdentifier should be set to the same value for all images you want to use to create estimate a B0 field. If you want to use (bold + epi) to correct bold, then both the bold and epi images should share a B0FieldIdentifier AND the bold image should use B0FieldSource to indicate that it should be corrected with that field estimate. If you have two opposite-encoded EPI images and you want to correct BOLD images with them, you set B0FieldIdentifier on the EPI images and B0FieldSource on the BOLD image.