neuropoly/mp2rage

preclinical data

IRISstrasbourg opened this issue · 19 comments

Hello,

I'm working in Strasbourg (France) on Bruker system. I did MP2RAGE acquisition which I would like process using your code.
Installation was easy helped by your clear instructions.
I meet issue with -acqparam. In preclinical, we don't used parallel imaging, so, no GRAPPA.
Which option do I must write in -acqparam?
My actual command line, which is not perfect because didn't take in account the absence of GRAPPA, is:
python /mnt/hgfs/share/logiciels/mp2rage-master/mp2rage_compute_t1_map.py -i MP2RAGE.nii -acqparam ti=800,2200:alpha=7,7:tr_seq=6250:tr_gre=8.74:matrix_sizes=128,128,128:bandwidths=20000,20000 -t1range 100,5000 -o T1map.nii.gz,RHOmap.nii.gz

Message after process:
Sequence parameters:
({'tr_gre': 8.74, 'n_gre': 96, 'a1': 7.0, 'a2': 7.0, 'tb': 480.96000000000004, 'tc': 3525.6, 'eff': 0.95, 'ta': 565.36}, {'t_acq': 500.0})
Traceback (most recent call last):
File "/mnt/hgfs/share/logiciels/mp2rage-master/mp2rage_compute_t1_map.py", line 210, in
main()
File "/mnt/hgfs/share/logiciels/mp2rage-master/mp2rage_compute_t1_map.py", line 139, in main
T1map_data, RHOmap_out_data = pmc.t1_mp2rage(rho_arr=rho.get_data(), t1_value_range=t1range, **acq_params)
File "/home/po/.local/lib/python2.7/site-packages/pymrt/computation.py", line 597, in t1_mp2rage
if rho_arr == None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Thank you,
Chrystelle

hi Chrystelle,

sorry for the late response. Without having the data, it is difficult to know what causes the bug (is it a problem in the input data?). Are you able to debug this by yourself by running the code in debug mode (e.g. using an IDE like Pycharm) and look at your problematic variable rho_arr before it crashes? If not maybe you can send you the data and we can look at it ourself

best,
Julien

Hello,

I don't have the good soft to run it in debug mode.
I will send you by email the raw data if it's fine for you.

Best,
Chrystelle

Hi Chrystelle,
OK this is fine, you can email me the data and we will look into it.

I get the same error message. I replaced if rho_arr == None: on line 597 to if rho_arr is None: and now it works.

thank you very much @devDonnn

Cool! @IRISstrasbourg please let us know if this works for you and resolves all your issues.

@IRISstrasbourg you made mistake in the command. Change grappa_refs:0,0,0to grappa_refs=0,0,0.

Pfff, so stupid error :/
But there is still following message error:
Sequence parameters:
({'tr_gre': 8.744, 'n_gre': 48, 'a1': 7.0, 'a2': 7.0, 'tb': 980.288, 'tc': 3787.68, 'eff': 0.95, 'ta': 642.608}, {'t_acq': 800.0})
Traceback (most recent call last):
File "/mnt/hgfs/share/logiciels/mp2rage-master/mp2rage_compute_t1_map.py", line 210, in
main()
File "/mnt/hgfs/share/logiciels/mp2rage-master/mp2rage_compute_t1_map.py", line 139, in main
T1map_data, RHOmap_out_data = pmc.t1_mp2rage(rho_arr=rho.get_data(), t1_value_range=t1range, **acq_params)
File "/home/po/.local/lib/python2.7/site-packages/pymrt/computation.py", line 597, in t1_mp2rage
if rho_arr == None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

It seems I have a parameters error somewhere but I checked in Bruker raw data each one.

Have you actually changed the code on line 597 in computation.py script? It seems you are getting the same error as the first time.

@IRISstrasbourg Can you update computation.py script here: home/po/.local/lib/python2.7/site-packages/pymrt/computation.py? It seems that your previous edit is not taking effect as computation.py is read from home/po/.local/lib/python2.7/site-packages/pymrt/ not /mnt/hgfs/share/logiciels/mp2rage-master/.

I changed the computation.py script localized in home/po/.local/lib/python2.7/site-packages/pymrt/.
New message :'(
Traceback (most recent call last):
File "/mnt/hgfs/share/logiciels/mp2rage-master/mp2rage_compute_t1_map.py", line 17, in
import pymrt.computation as pmc
File "/home/po/.local/lib/python2.7/site-packages/pymrt/computation.py", line 600
else:
^
IndentationError: unindent does not match any outer indentation level

It's working and I need to learn python language ;)

Thank you so much!!!!

@IRISstrasbourg could you confirm again that the your issue running this software with your data has been resolved?

If so, I think we could do the suggested fix by:

I get the same error message. I replaced if rho_arr == None: on line 597 to if rho_arr is None: and now it works.

and merge it to master so that all users can benefit from this fix.