yeatmanlab / pyAFQ

Automated Fiber Quantification ... in Python
http://yeatmanlab.github.io/pyAFQ/
BSD 2-Clause "Simplified" License
56 stars 34 forks source link

plot_tract_profile example errors #188

Closed gkiar closed 4 years ago

gkiar commented 4 years ago

Hi!

I'm trying to run the example and getting the following error:

$ time python ./plot_tract_profile.py
/home/users/gkiar/ace_mount/ace_home/code/env/gp3/lib/python3.6/site-packages/dipy/stats/__init__.py:7: UserWarning: The `dipy.stats` module is still under heavy development and functionality, as well as the API is likely to change in future versions of the software
  warnings.warn(w_string)
Dataset is already in place. If you want to fetch it again please first remove the folder /home/users/gkiar/.dipy/stanford_hardi 
Calculating DTI...
Tracking...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:15<00:00,  6.26it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 652536/652536 [3:55:01<00:00, 46.28it/s]
Traceback (most recent call last):
  File "/home/users/gkiar/plot_tract_profile.py", line 47, in <module>
    aus.write_trk('./dti_streamlines.trk', streamlines, affine=img.affine)
  File "/home/users/gkiar/ace_mount/ace_home/code/env/gp3/lib/python3.6/site-packages/AFQ/utils/streamlines.py", line 28, in write_trk
    streamlines = dtu.move_streamlines(streamlines, affine)
AttributeError: module 'dipy.tracking.utils' has no attribute 'move_streamlines'

real    235m34.280s
user    172m31.158s
sys     63m1.843s

Thanks!

arokem commented 4 years ago

Are you running the current master branch? I believe this is fixed in master

On Tue, Dec 10, 2019 at 8:50 AM Greg Kiar notifications@github.com wrote:

Hi!

I'm trying to run the example and getting the following error:

$ time python ./plot_tract_profile.py /home/users/gkiar/ace_mount/ace_home/code/env/gp3/lib/python3.6/site-packages/dipy/stats/init.py:7: UserWarning: The dipy.stats module is still under heavy development and functionality, as well as the API is likely to change in future versions of the software warnings.warn(w_string) Dataset is already in place. If you want to fetch it again please first remove the folder /home/users/gkiar/.dipy/stanford_hardi Calculating DTI... Tracking... 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:15<00:00, 6.26it/s] 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 652536/652536 [3:55:01<00:00, 46.28it/s] Traceback (most recent call last): File "/home/users/gkiar/plot_tract_profile.py", line 47, in aus.write_trk('./dti_streamlines.trk', streamlines, affine=img.affine) File "/home/users/gkiar/ace_mount/ace_home/code/env/gp3/lib/python3.6/site-packages/AFQ/utils/streamlines.py", line 28, in write_trk streamlines = dtu.move_streamlines(streamlines, affine) AttributeError: module 'dipy.tracking.utils' has no attribute 'move_streamlines'

real 235m34.280s user 172m31.158s sys 63m1.843s

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yeatmanlab/pyAFQ/issues/188?email_source=notifications&email_token=AAA46NXDQ47HHD2NFUT3VPLQX7CGXA5CNFSM4JZBUYYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H7QQ34A, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA46NTMNDWZUSSBJSMGM3DQX7CGXANCNFSM4JZBUYYA .

gkiar commented 4 years ago

If master is the default branch, then yes. I installed it yesterday (December 9th at 13h29 EST) using the following command:

$ pip install git+https://github.com/yeatmanlab/pyAFQ.git

The version is 0.1.dev0.

arokem commented 4 years ago

Did you change the plot_tract_profile.py script? The error you are getting is on line 47 of that script and this is the current l47: https://github.com/yeatmanlab/pyAFQ/blob/master/examples/plot_tract_profile.py#L47

gkiar commented 4 years ago

Ah, it appears that the link from the documentation doesn't give the up to date script, and that is where I downloaded the script from. Will try using the one in the repo

arokem commented 4 years ago

Gotcha. Yes - we should update that. I'll leave this open for now, to remind me to update that as soon as #183 lands.

On Tue, Dec 10, 2019 at 10:43 AM Greg Kiar notifications@github.com wrote:

Ah, it appears that the link from the documentation http://yeatmanlab.github.io/pyAFQ/auto_examples/plot_tract_profile.html doesn't give the up to date script, and that is where I downloaded the script from. Will try using the one in the repo

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/yeatmanlab/pyAFQ/issues/188?email_source=notifications&email_token=AAA46NR3D3HBDQW3M2PZQCDQX7PN3A5CNFSM4JZBUYYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGQKAHQ#issuecomment-564174878, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA46NXLCMSK4IFL3BMYF6TQX7PN3ANCNFSM4JZBUYYA .

gkiar commented 4 years ago

Success! And so much faster, too... Timing once the data was downloaded:

real    0m32.516s
user    0m44.594s
sys     0m17.240s
36000 commented 4 years ago

@arokem we should come up with a system to update these examples automatically from the code.

arokem commented 4 years ago

The examples on our website update every time we make a release. So, people installing from PyPI will get examples that sync up with their installation. Folks installing from GitHub (like @gkiar did here) might find the examples sometimes out of sync with master. I think that it's fine. And I think that we can close this one.