I am trying to run the following code:
from dipy.denoise.localpca import localpca from dipy.denoise.pca_noise_estimate import pca_noise_estimate from dipy.core.gradients import gradient_table gtab = gradient_table(bvals, bvecs) sigma = pca_noise_estimate(data, gtab, correct_bias=True, smooth=3) denoised_arr = localpca(data, sigma, tau_factor=2.3, patch_radius=2)
using a dataset that is (100, 128, 3, 21) with the following bvals setup:
array([ 0., 1000., 1000., 1000., 1000., 1000., 1000., 0., 1000.,
1000., 1000., 1000., 1000., 1000., 0., 1000., 1000., 1000.,
1000., 1000., 1000.])
I keep receiving this error when I run though:
.../opt/anaconda3/lib/python3.7/site-packages/dipy/denoise/localpca.py:246: RuntimeWarning: invalid value encountered in true_divide
denoised_arr = thetax / theta
The resulting array is all np.nan's.
Any idea on how to go about this?
Hi all, I am working with a script that generates peaks using dipy's peaks_from_model() to track white matter pathways. I am attempting to save these peaks to a nifti from the .PAM5 file they are saved in using save_peaks(). My PeaksandMetrics object does not have the affine attribute, however even if I specify it in save_peaks() as the docs suggest it still fails to recognize it and gives the error:
AttributeError: 'PeaksAndMetrics' object has no attribute 'affine'. I am using dipy 0.15, python 2.7 . Here is my code, any advice is helpful since I am still fairly new to dipy:
`csapeaks = peaks_from_model(model=csa_model,
pam = savepeaks(os.path.join(Diffusion, 'peaks.pam5'), csapeaks, affine=np.eye(4))
Hi, a question for the community: I would need to cluster streamline pairs rather than streamlines whilst still using QuickBundles. By this I mean that I have one streamline pair [A B], where A and B are individual streamlines, and one streamline pair [C D], where C and D are individual streamlines. What I want to do is calculate the distance between A and C, and B and D and cluster based on the total distance between the pairs as: totalDistance = distanceBetween(A, C) +distanceBetween(B, D).
If anyone has any idea of how to achieve this I would be very thankful to hear it!
Dear DIPY Community (@/all),
Do you need help to add a new feature on DIPY?
Do you want to share ideas or a moment with DIPY users and developers? or Do you have any questions about your DIPY code?
Feel free to join us on December 16th-17th during our Brainhack event! (https://brainhack.luddy.indiana.edu/)
Whatever your background or level of expertise is, you are encouraged to join us and participate: propose and discuss ideas, showcase demos, or contribute to activities initiated by others.
This free online event will be a good opportunity to connect with each other (registration is mandatory).
Some users already have proposed projects that you might be interested in:
You will find all the information (schedule, registration, ...) at https://brainhack.luddy.indiana.edu/