Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"NaN" weight after running encode... #96

Open
htakemur opened this issue Jul 17, 2019 · 5 comments
Open

"NaN" weight after running encode... #96

htakemur opened this issue Jul 17, 2019 · 5 comments

Comments

@htakemur
Copy link

Hi Franco and all,

When I run LiFE using encode for specific dataset, I found a case in which small number of streamlines got "NaN" weights after fitting.

For example, I got something like

fe.life.fit.weights(1:10)

ans =

     0

0.0102
0
0
0
NaN
0.0086

In this case, streamlines #6 got "NaN" weight.

It is a first time for me to see this phenomenon. Are there anybody who see similar sort of phenomenon?

@francopestilli
Copy link
Contributor

  1. what are the details of the data and tract?
  2. What are the DWI params and how many fibers does the connectome have?
  3. Are you sure the white matter mask, the DWI signal, and the fibers are well aligned?
  4. Is this a human brain?

@htakemur
Copy link
Author

It is West Haven dataset (analyzed in Yeatman et al. Nat Comm), collected at Stanford. Therefore, it is a human data, with b=2000 s/mm2 and 96 directions. As far as we exported streamlines from connectome (2 million streamlines), they are correctly aligned.

There may be one issue which we need to test in our side about this dataset, and I will contact back with you this later...

@htakemur
Copy link
Author

We made several testing in our side. It seems to be that NaN appears when dMRI data is not exactly isotropic. When data were resampled into exactly isotropic voxel size (e.g. 2 x 2 x 2 mm), we don't see NaN after fitting LiFE in encode. I'm not sure whether it is worth solving, but perhaps one of the practical guide for LiFE user is to recommend isotropic voxel acquisition, or if the acquisition cannot be exactly isotropic, it may be good to resample data into isotropic voxels...

@francopestilli
Copy link
Contributor

Thanks for the checks @htakemur would you please check the distribution of signal (make a histogram and check the min-max and median) of both the original and resampled data? Use the fe.life fieldss to compute the hist, please. Resampling can also smooth the signal, I wonder whether you have some weird values in the signal.

@htakemur
Copy link
Author

htakemur commented Aug 8, 2019

Sorry for my delayed responses. I have checked a variable (fe.life.diffusion_signal_img).
I don't see a major difference in distribution, except for voxel size difference coming from the resampling. Median of whole signal is almost identical (141 for resampled, 142 for without resampling). Min is identical (0 for both cases). Max is not identical but close (948 for resampled, 954 for without resampling).

withoutresample
resampled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants