Some QSIRecon runs encountering CsdNanResponseError in PyAFQ

Hello,

Sorry - this is a bit hard to diagnose without the data in hand, but let me try to provide some helpful context for why these errors show up and think about ways forward in your case.

The error message that you are seeing indicates that pyAFQ tried to automatically compute a CSD response function from the data using the DIPY auto_response_ssst function and that process failed.

First of all, you might be wondering why pyAFQ is even using CSD in the first place, since you are using mrtrix for tractography.This happens because your recon spec file specified the (default value) power_map for reg_subject_spec. In that case, pyAFQ uses the CSD model to calculate an anisotropic power map for the purpose of registration of the diffusion data to the MNI T1w template.

Further into the details of this error: the automated response function calculation relies on finding a set of voxels in the corpus callosum that have high FA and modeling the CSD single-fiber response function after the signal in those voxels. In some cases, that function doesn’t find any voxels that fit the criteria, and then this error is raised. This can happen for a variety of reasons that include generally low FA in the CC, or a subject who is not oriented in the scanner in the way that this function expects.

One way around this in your case would be to use different reg_subject_spec and reg_template_spec values. I would suggest:

        reg_subject_spec: b0
        reg_template_spec: mni_T2

which would not rely on this particular step. Something we might also want to do longer-term is to allow using a subject T1-weighted image as a registration target, rather than APM. We are currently doing some development on pyAFQ 3.0, which aligns well with such a change, but that’s not something that you’ll have off-the-shelf soon.

So, for now, I would recommend trying to change the recon spec as suggested and seeing whether that resolves your issues (without creating new ones…).

Cheers,
Ariel

1 Like