Responsemean error

Dear experts,

When I try to calculate the response function for my cohort, I encounter the following error:

responsemean: Calculating mean RF across 61 inputs, with 4 b-values and lmax=10

responsemean: [ERROR] Unhandled Python exception:
responsemean: [ERROR]   ValueError: math domain error
responsemean: [ERROR] Traceback:
responsemean: [ERROR]   /EBC/local/MRtrix3.0.4/mrtrix3/bin/responsemean:70 (in execute())
responsemean: [ERROR]     log_multiplier += math.log(mean_lzero / subj_lzero)

The command I used is: responsemean response_functions/*_sfwm.txt test.txt

However, if I add the -legacy option, it works perfectly. What is the problem?

Best regards,

Manuel

1 Like

Hi, I have the same issue with a 600+ subject cohort
Have you figured out the error ?

Best,
Clément

Hi,

In my case, it was ine subject that the preprocessing didn’t work, so the final image was basically half brain - half blank image and due to that the response function of this subject was very strange. Removing this subject made everything work as expected.

Best regards,

Manuel

I see. Can you tell me which command output you checked to determine which subject was involved ? Was it the file output by dwifslpreproc, dwibiascorrect or dwi2response ?

Thank you,
Clément

Hi,

I was inspecting the final data one by one, I know it is not practical but it was a small sample.

I guess what you could do is to check the responses functions itself, then when you see something off, go to inspect that subject.

Best regards,

Manuel