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

Using DiffusionGradientTable on HCP-style acquisition #128

Open
josephmje opened this issue Nov 10, 2020 · 3 comments
Open

Using DiffusionGradientTable on HCP-style acquisition #128

josephmje opened this issue Nov 10, 2020 · 3 comments
Assignees

Comments

@josephmje
Copy link
Collaborator

Should this be the intended behaviour?

np.genfromtxt(bval)

>>> array([   5.,    5.,  610., 1240.,  615., 1225.,  625., 1230.,  620.,
           1230.,  610., 1240.,  615., 1225.,  620., 1220.,  620.,    5.,
           1225.,  615., 1240.,  625., 1230.,  620., 1240.,  615., 1225.,
            615., 1230.,  625., 1230.,  610., 1230.,    5.,  615., 1235.,
            615., 1220.,  625., 1245.,  620., 1240.,  620., 1225.,  615.,
            1235.,  620., 1225.,  605.,    5., 1225.,  625., 1235.,  615.,
            1230.,  620., 1230.,  610., 1235.,  620., 1230.,  620., 1220.,
            625., 1235.,    5.,  610., 1230.,  620., 1240.,  615., 1230.,
            625., 1230.,  610., 1235.,  610., 1240.,  620., 1235.,  620.,
            5., 1220.,  615., 1230.,  615., 1230.,  620., 1240.,  610.,
            1215.,  620., 1240.,  620., 1225.,  620., 1225.,  615., 1230.,
            5.,  890., 1800.,  895., 1785.,  910., 1790.,  900., 1795.,
            890., 1800.,  895., 1785.,  905., 1780.,  900.,    5., 1785.,
            895., 1805.,  905., 1795.,  900., 1800.,  895., 1780.,  895.,
           1790.,  905., 1790.,  890., 1790.,    5.,  895., 1795.,  895.,
           1775.,  905., 1805.,  900., 1805.,  900., 1785.,  895., 1795.,
           900., 1785.,  885.,    5., 1785.,  905., 1795.,  895., 1795.,
           900., 1790.,  890., 1795.,  900., 1790.,  900., 1780.,  910.,
           1795.,    5.,  890., 1790.,  900., 1805.,  895., 1790.,  905.,
           1790.,  890., 1795.,  890., 1800.,  905., 1800.,  900.,    5.,
           1780.,  895., 1790.,  895., 1790.,  900., 1805.,  890., 1775.,
           900., 1805.,  900., 1785.,  900., 1785.,  895., 1790.])
gtab = DiffusionGradientTable(dwi_file=dwi, bvecs=bvec, bvals=bval)

gtab._bvals

>>> Inconsistent bvals and bvecs (13, 0 low-b, respectively).
array([   0,    0,  600, 1200,  600, 1200,  600, 1200,  600, 1200,  600,
       1200,  600, 1200,  600, 1200,  600,    0, 1200,  600, 1200,  600,
       1200,  600, 1200,  600, 1200,  600, 1200,  600, 1200,  600, 1200,
          0,  600, 1200,  600, 1200,  600, 1200,  600, 1200,  600, 1200,
        600, 1200,  600, 1200,  600,    0, 1200,  600, 1200,  600, 1200,
        600, 1200,  600, 1200,  600, 1200,  600, 1200,  600, 1200,    0,
        600, 1200,  600, 1200,  600, 1200,  600, 1200,  600, 1200,  600,
       1200,  600, 1200,  600,    0, 1200,  600, 1200,  600, 1200,  600,
       1200,  600, 1200,  600, 1200,  600, 1200,  600, 1200,  600, 1200,
          0,  900, 1800,  900, 1800,  900, 1800,  900, 1800,  900, 1800,
        900, 1800,  900, 1800,  900,    0, 1800,  900, 1800,  900, 1800,
        900, 1800,  900, 1800,  900, 1800,  900, 1800,  900, 1800,    0,
        900, 1800,  900, 1800,  900, 1800,  900, 1800,  900, 1800,  900,
       1800,  900, 1800,  900,    0, 1800,  900, 1800,  900, 1800,  900,
       1800,  900, 1800,  900, 1800,  900, 1800,  900, 1800,    0,  900,
       1800,  900, 1800,  900, 1800,  900, 1800,  900, 1800,  900, 1800,
        900, 1800,  900,    0, 1800,  900, 1800,  900, 1800,  900, 1800,
        900, 1800,  900, 1800,  900, 1800,  900, 1800,  900, 1800],
      dtype=uint16)
@arokem
Copy link
Collaborator

arokem commented Nov 10, 2020

I think so. The questions is basically to what order of magnitude should you be rounding the b-values. This is determined through an optional bmag input to the round_bvals function. If you do not specify that, this order of magnitude is determined by the value of the largest b-value, to be order of magnitude smaller than that of the maximal value. So, in this case, it automatically rounds into the nearest 100's. We could give users extra controls, by exposing this keyword argument through our API.

@josephmje
Copy link
Collaborator Author

josephmje commented Nov 10, 2020

It seems like there are 2 places where the bvals are getting rescaled: 1 and 2

I was looking at how MRtrix3 handles this and they scale by the squared amplitude of the gradient vectors

@josephmje
Copy link
Collaborator Author

josephmje commented Feb 8, 2021

I ran into this issue again when working with the NTU-DSI-122 dataset. The round_bvals function artificially introduces b0s into the dataset. Below is what MRtrix3 outputs vs DiffusionGradientTable:

MRtrix3

                     0                      0                      0                      0
   -0.9899531957603029   0.005809392215236331     -0.141276045974019      23.69176963999999
 -0.006502908410694216    -0.9999646796184842   0.005324631227082544      23.70627335999999
    0.1410910353363024  -0.006607010764052516    -0.9899745790455904            23.69922632
   -0.1407945428760187    0.00625032986577012     0.9900191059130637      23.67952356000002
  0.006860320422247859     0.9999602581574732  -0.005693690309796706      23.68945347999999
    0.9900094119725403  -0.006166866655823903     0.1408663691639498      23.70607623999998
   -0.7045540089015556    -0.7031449846408822   -0.09586855123094538      94.63130459999998
   -0.6001289237969868    -0.0005646504771176    -0.7999030916255475      94.64211015000005
   -0.7996815774092526   0.008759225039016638     0.6003604340135726      94.57770119999999
   -0.6952306934237482     0.7112326081846938    -0.1039348833468926      94.59178469999996
   0.09513700199524415    -0.7117946055596297    -0.6959147866999006      94.66587375000003
   -0.1043794235335665    -0.7026097143670808     0.7038782033987196      94.61751630000005
    0.1046273090687004     0.7023341984240934    -0.7041163255606483      94.62329115000003
  -0.09492256010233978     0.7118148396036609     0.6959233734425307      94.59294089999997
    0.6952535017302935    -0.7112531678920744     0.1036412055856805      94.65391814999997
    0.7996456549792608  -0.009010127363994088    -0.6004045670026783      94.64561564999997
    0.6004142069813299   0.000310617935881372     0.7996891168269572      94.63131690000002
    0.7048237809209271     0.7029095809977064    0.09561149925588244      94.62628004999992
    -0.493809498332005    -0.5777528760218104    -0.6498875238113285           213.01434271
   -0.6567618534198728    -0.5703284057907044     0.4933450896084069      213.0151272599999
   -0.4861878538895903     0.5768854414110277    -0.6563722710613529      212.9470006300001
   -0.6491074074800444     0.5845102005647062     0.4868340569335127           212.96463916
    0.6490803459881754     -0.584508681060358    -0.4868719608038146      213.1169618499999
    0.4863538361429843    -0.5770465955993693     0.6561075922256814      212.9811977800001
    0.6568874031501775     0.5700520054254746    -0.4934973664499241      213.0666583499999
    0.4940917381045879     0.5776357224313291     0.6497771360305191           212.94774826
   -0.9899785880381897   0.005794062414228898    -0.1410986324053229      378.7514825899997
  -0.00668158292718224    -0.9999625022749526   0.005509128207131228      378.8580133299998
    0.1410910353363024  -0.006607010764052516    -0.9899745790455904      378.8798389600001
    -0.140942823755781   0.006428707571396775     0.9899968647176152      378.7223078900003
  0.006860320422247859     0.9999602581574732  -0.005693690309796706      378.7236004399999
    0.9900066998982968  -0.005972831099460889     0.1408937878160044      378.8658301799998
   -0.8884309004261718    -0.4420410454093279    -0.1236537477853798      591.4315788199997
   -0.8223376853574679   0.002227073738432438    -0.5689954054150929      591.5360090199998
   -0.9485558590624227   0.008138254289808971     0.3165052148945788      591.3164133799996
   -0.8824709581135973     0.4524002319696442    -0.1287596140095248      591.4100621999996
   -0.4486547759013213    -0.8918155694771829   -0.05808512803655598           591.66935362
   -0.3165053592573777  -0.003326032088558235     -0.948584890809412      591.5686607600003
    -0.568868238191698   0.008349094632621139     0.8223862962109041           591.33580756
   -0.4366329090312537     0.8970448619936776   -0.06828043879215234      591.3946052999997
   0.05710964645604326    -0.8973340983424405    -0.4376414105562053           591.71424784
  -0.06892055970921297    -0.8915171562323196     0.4477132079722535      591.5923459599999
    0.1231332314170047    -0.4530313796439907    -0.8829500418362688      591.6634477000003
   -0.1291220352910538    -0.4414154913016568     0.8879638866762616      591.5484822000003
    0.1292684993217259     0.4412127024240272    -0.8880433583461992      591.6613560200001
   -0.1230036383974283     0.4529781870019794     0.8829953946886668            591.3826858
    0.0690834101640624     0.8914088529116291    -0.4479037166522264      591.5228129799997
  -0.05696369370430737     0.8973754047988891     0.4375757311158741      591.4479123800002
    0.4367033714557719    -0.8970240922409807    0.06810244708089999      591.6339334799997
    0.5688980603518858  -0.008507891104895858     -0.822364039046461           591.60401938
     0.316697719442156   0.003165673538300151     0.9485212348762606      591.4432676200004
    0.4488501643784535      0.891727618627997    0.05792567749691497      591.5728441199999
     0.882460575140504    -0.4524741927965215     0.1285707516343706      591.6368710599996
    0.9485212254543728  -0.008297290316853355    -0.3166048638854632      591.5576486799996
    0.8224655944965047  -0.002387682577986434     0.5688098494588663      591.5804418399998
    0.8885454764525162     0.4418583349005428     0.1234833922221551      591.4904688399998
   -0.7533834826133998    -0.4062106252124091     -0.517113388039653      851.9036544199998
   -0.8686361430677322    -0.4008207916553304     0.2912283364187087      851.8252917199991
   -0.7479435981593581     0.4102720606408222    -0.5217827231999602      851.8689311599999
    -0.863179838650881     0.4156906413791559     0.2865691135074139      851.8271192599993
   -0.3519473045253541    -0.8167765161927547    -0.4571752589908646      852.2581971799998
   -0.4670587342569737    -0.8114958647902543     0.3511845671190453      852.0466640399994
   -0.2917227184055466    -0.4112244174766262    -0.8635926898932665      852.0802797000005
   -0.5220486664500021    -0.4006130767426127     0.7529769934072301           851.88966174
     -0.28627273647741      0.405171762856365     -0.868264800008385      852.0530142800003
    -0.516600790026178     0.4160297924607157     0.7483600974994743      851.8250886599999
   -0.3411110303320227     0.8161406186474721      -0.46643086902514      851.8933537400001
   -0.4561956325431975     0.8215671869639007     0.3419252873841518      851.8280791799999
    0.4562320574314936    -0.8215184341347409    -0.3419938188748878      852.2334792399998
    0.3412221195574559    -0.8162062793233974     0.4662346777297602      852.0625396400001
    0.5166175864847988    -0.4160732704769194    -0.7483243300396305           852.24784112
    0.2864260496132027    -0.4053302795987155     0.8681402435916687      852.0033015000004
    0.5221258643694325     0.4004143957354313    -0.7530291451493111      852.1108310000003
    0.2919107154615287     0.4111383498263035     0.8635701427798685      851.8290206400003
     0.467203069576093     0.8113480910497152    -0.3513339820294353      852.0489346199996
    0.3521405863409586     0.8167419643203911     0.4570881437638862      852.0242166799998
    0.8631270804454189    -0.4157421101508428    -0.2866533461327322      852.2174559599995
    0.7480209233495438    -0.4103816554874255     0.5215856545867569           852.02301678
    0.8686848615611676     0.4006296865075726    -0.2913459551517732      852.0140821399992
    0.7535494435145621      0.406075231868157     0.5169778933785432      851.8561937599998
   -0.7046889102329872    -0.7030273014536346   -0.09574002927441276      1515.291546979999
    -0.600195794664835 -0.0005755931077146655    -0.7998529094522452      1515.215175740001
   -0.7997312580113511   0.008769821541340104     0.6002940989129535          1514.76522062
   -0.6953093089583275     0.7111742648843095    -0.1038081395756383          1514.94989524
   0.09503157912174616    -0.7117359783189992    -0.6959891494383547          1515.54776732
   -0.1043766151664705    -0.7024828448187593     0.7040052378652685          1515.15965764
    0.1045005570446163     0.7023450832745057    -0.7041242912849212          1515.20591862
  -0.09492434608072184     0.7117460795026269     0.6959934531544012          1514.96385478
    0.6953206955686101    -0.7111845494579555     0.1036613087235014          1515.44739158
    0.7997132938262949  -0.008895281317442789    -0.6003161847291655          1515.30895332
     0.600338454002406  0.0004485686333996093     0.7997459217977809          1515.12873492
    0.7048237809209271     0.7029095809977064    0.09561149925588244      1515.251391759999
   -0.9899701274364242   0.005799172409878569    -0.1411577712450526      1916.925590579998
   -0.6173936842303266    -0.6649581564486334    -0.4203042812593496      1916.957821739999
   -0.7114357348014649    -0.6606297702102505     0.2396403596213524      1917.143621639999
   -0.5681384216010937    -0.3338168227922801    -0.7521868535952256          1917.29730114
   -0.7562248026233656    -0.3251569423814092     0.5678001503332177          1916.93996169
   -0.5636907750696808     0.3327457452699993    -0.7559980020516293      1917.257510610001
   -0.7517878599288741     0.3415958249823061     0.5640277528794316          1916.80228701
   -0.6084983677331682     0.6682918001457023    -0.4279203270751306           1916.8792929
     -0.70251446122126     0.6727609977964326     0.2320906538810886      1916.513120339999
    -0.240367081706168     -0.669084520996192    -0.7032421843116043          1917.03106179
   -0.4284092566129611    -0.6604176484851919     0.6166960664846336          1916.83263525
   -0.2314659577468467     0.6641448894837612    -0.7108692398584551      1916.923624590001
   -0.4195165219505614     0.6730221131994961     0.6091363746772874          1916.60084226
 -0.006621665306556075    -0.9999625155773325   0.005578618899059132          1917.26099955
    0.1410989233339639  -0.006618065797046873     -0.989973380975015      1917.101948190001
     -0.14100011290462   0.006499192632161513     0.9899882467261996      1916.570438640001
  0.006740815394305235     0.9999610254392798  -0.005701667321395197          1916.80746504
    0.4195489560772245    -0.6730040471101617     -0.609133996775631          1917.38610297
    0.2315796962647312    -0.6642514040932337     0.7107326617217634          1917.00018744
     0.428507440275229     0.6602667679254923    -0.6167894039313541          1917.01320174
    0.2405185711335091     0.6690569020218755     0.7032166656136539           1916.5029858
    0.7024978428901176    -0.6727515123280156    -0.2321684375514883      1917.249757409999
    0.6085560479614197    -0.6683449348936378     0.4277552857552987          1917.26160873
    0.7517566747494677    -0.3416476422071081    -0.5640379336037132      1917.565008059999
    0.5638011929302532    -0.3328608298531396     0.7558649897963939      1917.311478420001
    0.7562523650985684     0.3249981419288268     -0.567854354588949      1917.400307939999
    0.5682935805719739     0.3337186690737641      0.752113193736369          1917.04894953
    0.7115295966625185     0.6604872599652611    -0.2397544837888441      1917.275619869999
    0.6175478580595608     0.6648769341127702     0.4202062654112281          1916.73549873
    0.9899888861620468  -0.005918356630029949     0.1410211981598144      1917.311339969999
   -0.9412730152281118    -0.3107270697509186     -0.132112826505933      2366.585501619998
   -0.8945684503270923   0.003402233679603241    -0.4469180153958598      2366.745967169999
   -0.9837845115878349   0.007591182922420133     0.1791937741712129      2366.869201019998
   -0.9370557078734542      0.321723407374855    -0.1357226933452656      2366.543685189999
   -0.3193203725357843    -0.9468329427227913   -0.03926675767755151      2367.183270409999
   -0.1791737856582176  -0.004441257737078998    -0.9838074149764352      2367.229456180002
   -0.4468359397816953   0.007992867080288183     0.8945802127228424          2366.59633266
   -0.3066721383396326     0.9504964500551029   -0.05008690446458604      2366.620794809999
   0.03832898943699911    -0.9507214655645158    -0.3076679760449529          2367.37229052
  -0.05090413420123846    -0.9465934258980432     0.3183860159740499          2367.06942141
    0.1316895777194686    -0.3224677129197085    -0.9373752873019431      2367.026620340001
   -0.1358163757208486    -0.3100663269908438     0.9409637532617611      2366.542485160001
    0.1359165359806085     0.3099250145368349    -0.9409958451615899      2366.965111110001
   -0.1315983819303749      0.322405750260741     0.9374094079281027      2366.268047530001
   0.05101972688012212     0.9465411928083104    -0.3185227743601685      2366.762367579999
  -0.03822237134781056      0.950748588085418     0.3075974196610474      2366.671442229999
    0.3067425177260495    -0.9504802100804183    0.04996396766238997      2367.267610979999
    0.4468789848045321  -0.008105249683660033    -0.8945576995742847          2367.32985869
    0.1793030250077296   0.004328043693851294     0.9837843733567136      2366.781660370001
    0.3194570189273209     0.9467915319025614    0.03915364830600442      2366.822184459999
    0.9370498973207249    -0.3217964877809104     0.1355894921558798      2367.140284719998
    0.9837667991671223  -0.007703796963752689    -0.1792861856608486      2367.494785889999
    0.8946369338019593  -0.003515696550488997      0.446780031509012      2366.977757579999
    0.9413334729664334     0.3105963270064366     0.1319894477716441      2366.846154289998
   -0.8549609679148263    -0.2982328809073012    -0.4243805981520303      2864.317945999999
   -0.9400095918458854    -0.2942713576422251     0.1725871817636922      2863.875932699998
   -0.8509174546513529     0.3047536892530264    -0.4278605780582414           2863.6911794
   -0.9359855425211463       0.30873975200132     0.1691473609772225      2863.846246249998
   -0.2620100281067728    -0.9047053321344104    -0.3359449466490814      2864.843094899999
   -0.3470091186333988    -0.9007896395804802     0.2610798667261423      2864.468544649998
   -0.1729022532928009    -0.3056936922238296    -0.9362991922141313      2864.649709850001
   -0.4279968960004523    -0.2938875015408901     0.8546629706802741      2863.900981700001
   -0.1688758516036347     0.2972378119123657    -0.9397503018965709      2864.583397700002
   -0.4239676305448513     0.3092335887989287     0.8512496906364898      2863.783589900001
    -0.249862613818343     0.9042739471320735    -0.3462041345132169           2863.7830483
   -0.3349469756238608     0.9082474190195536     0.2507930409017528      2863.914758649999
    0.3349997602480558    -0.9082086034425383    -0.2508630966617038           2864.8429595
     0.249948083456955    -0.9043041497632406     0.3460635206102743      2864.278036849999
     0.424001287646818    -0.3092883889830437    -0.8512130171197535          2864.77536105
    0.1689919856960985    -0.2973621240688353     0.9396900956909997      2864.275599650001
    0.4280574723187167     0.2937472487857345    -0.8546808493367117      2864.523110850001
    0.1730297652866712     0.3056214930763044     0.9362992060739184      2863.972337500002
    0.3471271180225797     0.9007096943504823    -0.2611987948601578      2864.287954899999
     0.262145162286633     0.9046939230382548     0.3358702420688193      2864.229292849998
    0.9359499738219118    -0.3088010411822438    -0.1692322766718121      2864.719203899998
    0.8509591924406823    -0.3048386377012674     0.4277170300153331          2864.13092475
    0.9400340486222252     0.2941371591380657    -0.1726827120620243      2864.379316049999
    0.8550575438837615     0.2981208846307415     0.4242646989727678          2864.38818475
   -0.4939246480189293    -0.5777570648867422    -0.6497962881186946          3408.17476792
   -0.6567925106718234    -0.5702592868223907      0.493384174572129      3407.833737879999
   -0.4862619982122057     0.5768600254002929    -0.6563396835403497           3407.5625974
   -0.6491074074800444     0.5845102005647062     0.4868340569335127      3407.434226559999
    0.6490938744916878    -0.5845094408353735    -0.4868530123884295          3408.65269732
    0.4863449881129788    -0.5769406059504606     0.6562073527040839          3407.83613768
    0.6568552912166838     0.5701210741640584      -0.49346031977725      3408.245949679999
    0.4940657631320519     0.5776984879956225     0.6497410858706064          3407.64204924
    -0.827413688352487    -0.5498411755184203    -0.1142859135303006      3999.817079999997
   -0.7454337505997074   0.001151140596793054    -0.6665787262898357             3999.87124
   -0.9019259452246351   0.008482161769937506      0.431807413394394      3999.452599999998
   -0.8200092268500472     0.5594966284461088    -0.1206167096144834      3999.745399999999
   -0.5546281054971127    -0.8288438912204545   -0.07352189183650651      4000.255799999998
    -0.431726937927713  -0.002292833738135957    -0.9020014379040699      3999.944240000002
   -0.6664646595981388   0.008612692866099933      0.745486873813571      3999.727359999999
   -0.5435616493837029     0.8352539199752849   -0.08301579660033943      3999.387559999999
   0.07265043573113061    -0.8356550025385839    -0.5444287197791059               4000.821
  -0.08378266680158862    -0.8283913321415923     0.5538485944518523      4000.183159999999
    0.1136813815843553    -0.5602154166562033    -0.8205091287863826      4000.631720000002
    -0.121017813724323    -0.5492736856681243     0.8268331796643986      3999.606440000002
    0.1211112881411373     0.5491512915927016    -0.8269007889867211      3999.937520000001
   -0.1136000111165844     0.5602001089062693     0.8205308497891568      3999.427120000001
   0.08388264772335099     0.8283064956418115    -0.5539603331363195                4000.04
  -0.07256254734585145     0.8356772402753291     0.5444063067310031               3999.654
    0.5435903766350605    -0.8352463958570921    0.08290332102811493      4000.414159999999
    0.6664682303220866  -0.008711116452934969    -0.7454825379722112             4000.86668
    0.4318468174447974   0.002193280933706632     0.9019442974937786      3999.547880000002
    0.5547462521193397     0.8287736164372909    0.07342266991195694      3999.972159999998
    0.8200058303557354    -0.5595267738875824     0.1204999065790308      4000.739359999998
    0.9019038907283556  -0.008580682524391807    -0.4318515297836401      4000.521759999997
    0.7455280107963963  -0.001250795895002524     0.6664731207090031      3999.916560000001
    0.8274997059968422      0.549733230412031     0.1141823627181212      3999.937599999997

DiffusionGradientTable

0.0 0.0 0.0 0.0
-0.990085600945986 0.005729240668949958 -0.14034841859024655 0.0
-0.006408110577589846 -0.9999712593904923 0.004051729484837986 0.0
0.14202021538131568 -0.007909507982222862 -0.989832156532876 0.0
-0.14171970374714504 0.007547881104733507 0.9898780506005023 0.0
0.0067651627013240396 0.9999673681277524 -0.0044153429403288496 0.0
0.9901407189031045 -0.006087194064674898 0.1399439274797677 0.0
-0.7045388258106275 -0.7031270977120262 -0.09611101595782376 100.0
-0.6056875149438168 -0.001476615882230732 -0.7957012340361929 100.0
-0.803827375428434 0.0096037313249807 0.5947851030888995 100.0
-0.6954704053638414 0.7112228648980631 -0.10238628672456915 100.0
0.09500964157233417 -0.7166389683333316 -0.6909426583114076 100.0
-0.10443696744248396 -0.7075234653573219 0.6989302295652865 100.0
0.10468719718526959 0.7072489741832778 -0.6991705652143787 100.0
-0.09479395478705964 0.7166592380327984 0.690951259263689 100.0
0.6954922714504436 -0.7112431352020608 0.10209653755463718 100.0
0.8037915048088767 -0.009856177596470641 -0.5948294482961215 100.0
0.6059720716831126 0.001220315095691316 0.7954849836239173 100.0
0.7048083942828075 0.7028914986737812 0.09585754242946244 100.0
-0.49657003807504435 -0.5809684510416212 -0.6448983301113813 200.0
-0.659333190932965 -0.5723896503905906 0.487493416837491 200.0
-0.48991918836478643 0.5796772918767126 -0.6511170602545057 200.0
-0.6507168070409143 0.5869964311319205 0.4816667176304236 200.0
0.6506898702771295 -0.5869953024619808 -0.4817044816132604 200.0
0.49008356058525776 -0.579836862793705 0.6508512243129225 200.0
0.6594607510281713 0.5721130338662863 -0.48764556220032795 200.0
0.49685242980057 0.58084955933259 0.644787912746824 200.0
-0.990110474523657 0.0057141202039039905 -0.14017345350969362 400.0
-0.0065865964022920115 -0.9999693465981557 0.0042335105870895465 400.0
0.14202021538131568 -0.007909507982222862 -0.989832156532876 400.0
-0.14186998710104298 0.007728723477850583 0.9898551275784517 400.0
0.0067651627013240396 0.9999673681277524 -0.0044153429403288496 400.0
0.9901380371942211 -0.005893129762135645 0.13997120533446056 400.0
-0.8884551039428082 -0.4420658455491029 -0.12339090921510676 600.0
-0.8258009879667129 0.0016275368870112895 -0.5639592887761337 600.0
-0.9501151120058755 0.008617631413081825 0.31178038804083086 600.0
-0.8827016949213986 0.45234336573219464 -0.1273703154622778 600.0
-0.448617266736816 -0.891786783397561 -0.058812251640452354 600.0
-0.32127346296999804 -0.004481901943437485 -0.9469758574252222 600.0
-0.5739058522164338 0.009478128008727568 0.8188664347017645 600.0
-0.43682653526596205 0.8970673174207521 -0.06672934963770219 600.0
0.05683423033768568 -0.8994193741180088 -0.43337588733464644 600.0
-0.06863499439324434 -0.894346951559238 0.442077784763425 600.0
0.12348983397714466 -0.4586724809489968 -0.8799828499035589 600.0
-0.1297219775660433 -0.4457069912884663 0.8857299173297343 600.0
0.1298704120615909 0.4455024672887376 -0.8858110564395772 600.0
-0.12335900724801888 0.45861923403781707 0.8800289503768323 600.0
0.06879847162347157 0.8942405369465758 -0.4422676026839116 600.0
-0.05668802774460435 0.8994599553045316 0.4333108079819807 600.0
0.4368965555179416 -0.8970462547755738 0.06655386216948234 600.0
0.5739355771887424 -0.009638541886382758 -0.8188437285265909 600.0
0.32146752389864 0.004319538218735346 0.9469107522190536 600.0
0.4488125803171237 0.8916988529573848 0.058655122398386265 600.0
0.8826906691905944 -0.4524173329661649 0.12718388009351972 600.0
0.950081157341781 -0.008777100768716366 -0.3118793949048216 600.0
0.8259270737979053 -0.0017889451976543656 0.563774128922842 600.0
0.8885694072503242 0.4418829567827539 0.1232228104035063 600.0
-0.7557152244887201 -0.40773734743862977 -0.5124887852233193 900.0
-0.8700623309943085 -0.4011998480570642 0.2864091864862908 900.0
-0.7510659195016786 0.4110981363400537 -0.5166220154627874 900.0
-0.8640376782314689 0.4166391239409078 0.2825787164634404 900.0
-0.352955236606693 -0.8186739261882446 -0.45298521336952935 900.0
-0.46792635745959166 -0.8132849392016634 0.34585044695987444 900.0
-0.29521829335886074 -0.4159285281867795 -0.8601451149118159 900.0
-0.5261642175997037 -0.40344252583777723 0.7485889021775077 900.0
-0.29031580354122033 0.4085180353611797 -0.8653494952901153 900.0
-0.5198775813091904 0.4202066907187346 0.7437429915819819 900.0
-0.3428785954645138 0.8184806859793204 -0.46100285839797467 900.0
-0.4564649741003303 0.8229905159337928 0.3381217799885334 900.0
0.45650162009910406 -0.8229423366625485 -0.33818956426134444 900.0
0.34298887448088183 -0.8185445550919566 0.4608073820064614 900.0
0.5198941214620356 -0.4202501256064274 -0.7437068874207098 900.0
0.2904697154113903 -0.40867714472774946 0.8652227087900548 900.0
0.5262426279503687 0.4032422643924263 -0.7486416851442073 900.0
0.29540777430027315 0.4158413928987775 0.860122190642099 900.0
0.46807184072094277 0.8131380557870712 -0.3459989221875267 900.0
0.3531484214129084 0.8186383830265573 0.4528988742415182 900.0
0.8639853169943791 -0.4166910474872846 -0.28266224184010125 900.0
0.7511412652408338 -0.41120725987875595 0.5164255890981823 900.0
0.8701120484465393 0.4010086459390592 -0.28652589591569105 900.0
0.7558802004285193 0.4076008302594469 0.5123540629017701 900.0
-0.7046735811532899 -0.703009360895894 -0.09598428265786121 1500.0
-0.6057541416809226 -0.0014875812295923716 -0.7956504929543463 1500.0
-0.8038764487678012 0.009614296987731552 0.5947186060734104 1500.0
-0.6955486195168412 0.7111643458104835 -0.10226138633992497 1500.0
0.09490366772823944 -0.7165810039992271 -0.6910173359324551 1500.0
-0.10443427547179372 -0.7073971879002713 0.6990584386569335 1500.0
0.10455938996288426 0.7072599202256491 -0.6991786175313129 1500.0
-0.09479580216355747 0.7165911374729836 0.6910216332267342 1500.0
0.6955595104629227 -0.7111745102944119 0.10211651831159636 1500.0
0.8038584954392483 -0.009740525672486814 -0.5947408187351626 1500.0
0.6058964395746209 0.001359419897293853 0.795542366243521 1500.0
0.7048083942828075 0.7028914986737812 0.09585754242946244 1500.0
-0.9901021874094782 0.005719166470607316 -0.14023177108575602 1900.0
-0.6185793510471768 -0.6662578714946386 -0.41648533603175936 1900.0
-0.7122733764568506 -0.6613283012934102 0.23518400264288813 1900.0
-0.5725150189428349 -0.3367865723980953 -0.7475301717905625 1900.0
-0.7600163239514693 -0.3262980786111486 0.5620540465310856 1900.0
-0.5687976383180421 0.33440851424745366 -0.7514254402418302 1900.0
-0.7548141249799444 0.3439602255264789 0.5585221571133366 1900.0
-0.6105846271730525 0.6695531578965255 -0.422947965843004 1900.0
-0.7027770938760133 0.6735097916468816 0.2291045981183251 1900.0
-0.24233933671065666 -0.6734985657584285 -0.6983346817994786 1900.0
-0.43063870486458505 -0.6641471306021994 0.6111128331048349 1900.0
-0.2340710872325876 0.6684580339031801 -0.7059565022237909 1900.0
-0.4208835572454681 0.6768912936693983 0.6038834389143066 1900.0
-0.006526607763866985 -0.9999694471841309 0.004302102899772643 1900.0
0.14202820376265288 -0.007920706341035382 -0.9898309207874916 1900.0
-0.1419280500811043 0.007800185718714706 0.9898462434655845 1900.0
0.006645642058811181 0.9999681342618827 -0.004423336120565783 1900.0
0.42091612502359244 -0.676873210548744 -0.6038810085907316 1900.0
0.23418493446078484 -0.6685636262974695 0.7058187402326289 1900.0
0.43073824750115924 0.6639962132973048 -0.6112066678844973 1900.0
0.24249145164094815 0.6734703428380037 0.698309095743946 1900.0
0.7027607076590011 -0.6735007354213335 -0.22918147210789738 1900.0
0.6106410446398192 -0.6696052789148822 0.42278396971800297 1900.0
0.7547828323509816 -0.34401228075701695 -0.5585323864169253 1900.0
0.568907207517654 -0.3345237131478323 0.7512912049107535 1900.0
0.7600445918694017 0.32613850017370427 -0.5621084388928183 1900.0
0.5726702449926084 0.3366872329515118 0.747456017212759 1900.0
0.712368009675338 0.6611861429868161 -0.23529705292122818 1900.0
0.6187330918954259 0.6661758103769639 0.41638822108955215 1900.0
0.9901205796064902 -0.005838504474641356 0.14009692967801793 1900.0
-0.941324897551557 -0.3107737088871107 -0.13163259138260552 2400.0
-0.8967505771614018 0.002954766968002509 -0.4425264644208949 2400.0
-0.984385800898399 0.007899125353663832 0.17584708928004675 2400.0
-0.9372644568635099 0.32165076608901466 -0.13444747143289665 2400.0
-0.31927077877429527 -0.9468110910728037 -0.040186162324635906 2400.0
-0.18256525291529346 -0.005672228691095566 -0.9831773767991465 2400.0
-0.45124934226892993 0.009208839823003788 0.8923503955123079 2400.0
-0.3068354339671953 0.9505216834562817 -0.048585447837793894 2400.0
0.038118329046678986 -0.9516809675987384 -0.3047135193932462 2400.0
-0.05059768988908536 -0.9482421637970396 0.3134911044597536 2400.0
0.13228232065886333 -0.32740056191936184 -0.9355801727783633 2400.0
-0.13660989436701887 -0.31305083107519854 0.9398600501798976 2400.0
0.13671147011237908 0.31290781438858706 -0.9398929054069243 2400.0
-0.13219013204817806 0.3273381680494778 0.9356150344704264 2400.0
0.050713472013861026 0.9481911424977915 -0.3136266905813856 2400.0
-0.038011689776849274 0.9517075246823317 0.30464388866894665 2400.0
0.3069055429063742 -0.9505052355856276 0.048464263717240955 2400.0
0.45129260213572525 -0.009322533116608266 -0.8923273377151771 2400.0
0.1826960826042792 0.0055574891467958625 0.9831537294418577 2400.0
0.31940739933289014 0.9467697347611272 0.04007471262210337 2400.0
0.9372582062997825 -0.3217239158151297 0.1343159585317166 2400.0
0.9843685435822754 -0.00801193232929759 -0.17593856696603163 2400.0
0.8968178022394603 -0.0030686025858206426 0.44238943620361765 2400.0
0.9413851252166496 0.31064280343715417 0.13151081588043828 2400.0
-0.8566314005686223 -0.2990936148894659 -0.4203875034919478 2900.0
-0.9406642789511742 -0.2942433889672509 0.16903118751974322 2900.0
-0.8531150708519479 0.304928539085742 -0.42333587367043574 2900.0
-0.936348466254012 0.30918661164729766 0.16629849344423522 2900.0
-0.2624640403231961 -0.9056998222038736 -0.33289707057451784 2900.0
-0.3472660202343198 -0.9020077924679587 0.2564922094678451 2900.0
-0.17579568196038933 -0.31022183473404896 -0.934268853948542 2900.0
-0.43202684040181505 -0.29621364848321285 0.8518276137955896 2900.0
-0.17203179152136755 0.2998742240328551 -0.9383392310175684 2900.0
-0.4274173204825563 0.3134386948609006 0.8479803174103789 2900.0
-0.2508524239804252 0.9058418364215928 -0.34135557527525673 2900.0
-0.334921679423324 0.9089736195616642 0.24818224673257167 2900.0
0.3349745415935188 -0.9089352705519276 -0.2482513452751186 2900.0
0.25093754923402156 -0.905870806589383 0.34121610183800466 2900.0
0.42745095250471304 -0.3134937261707449 -0.8479430209951584 2900.0
0.1721490915578727 -0.29999971247399904 0.9382776043321704 2900.0
0.4320882476335002 0.2960718235652479 -0.8518457733344458 2900.0
0.17592459926181592 0.3101487743132551 0.9342688441591933 2900.0
0.347384542530662 0.9019286494643114 -0.2566099976350217 2900.0
0.2625990488044365 0.9056878034875459 0.33282328972130215 2900.0
0.9363132255333845 -0.3092481529604904 -0.1663824617614328 2900.0
0.8531554486773856 -0.3050133913946325 0.4231933499737841 2900.0
0.9406892752645482 0.2941091217160661 -0.16912572816003893 2900.0
0.8567270997792931 0.29898097614677627 0.4202725929751809 2900.0
-0.49668476830812897 -0.580971653918149 -0.6448070860918874 3400.0
-0.659364331666567 -0.5723204853631522 0.48753250164433887 3400.0
-0.4899933973034695 0.5796513175983287 -0.6510843421596973 3400.0
-0.6507168070409143 0.5869964311319205 0.4816667176304236 3400.0
0.6507033221044637 -0.5869958759801344 -0.48168561135301663 3400.0
0.49007557259614976 -0.5797311395866533 0.6509514105815549 3400.0
0.6594281667049459 0.5721821396299418 -0.4876085438593707 3400.0
0.49682600809413807 0.5809121686172354 0.6447518670261173 3400.0
-0.8274190997710505 -0.549847240929348 -0.11421753357715166 4000.0
-0.7499330025473955 0.00042484203276193556 -0.6615136515594334 4000.0
-0.9045116662603169 0.009108327485697211 0.42635159665398054 4000.0
-0.8202506575682548 0.5594573361195452 -0.119148427689449 4000.0
-0.5545989708624862 -0.8288146362898541 -0.07406942817376126 4000.0
-0.4372084753097648 -0.003365067683741304 -0.8993538933238653 4000.0
-0.6715059699088077 0.009644944847007774 0.7409363720426535 4000.0
-0.5437778141893775 0.8352675473165634 -0.0814482240149862 4000.0
0.07238105815060095 -0.8388701330814612 -0.5394978055978458 4000.0
-0.08358572424151994 -0.8322207699771493 0.5481076689133819 4000.0
0.113828777003584 -0.5659206744517679 -0.8165640206094832 4000.0
-0.12141007748585289 -0.5542071789807765 0.8234767731096299 4000.0
0.12150469805024021 0.5540842492961428 -0.8235455379234653 4000.0
-0.1137467364844332 0.5659054875474807 0.8165859777774714 4000.0
0.08368630528650375 0.8321369652995952 -0.5482195484379176 4000.0
-0.07229288784719913 0.8388920520473985 0.5394755447454659 4000.0
0.5438061912072764 -0.8352598828410839 0.08133728862541502 4000.0
0.6715094355097525 -0.009744226315673725 -0.7409319321468621 4000.0
0.4373289548283984 0.0032643918126165593 0.8992956849750777 4000.0
0.5547170673820221 0.8287443353883462 0.0739716277826665 4000.0
0.8202468723931196 -0.5594874254712163 0.11903314273300296 4000.0
0.9044899260128851 -0.00920723167541776 -0.4263955917057312 4000.0
0.7500263305374764 -0.0005251356899835024 0.6614077620749512 4000.0
0.8275049988111247 0.5497391720592623 0.11411537865773048 4000.0

I don't know as much about diffusion gradient scheme handling. But I was wondering whether we should even be rounding at all? If not, we could use clustering to assign b-values to shells (unique_bvals_tolerance).

array([   0,   23,   94,  213,  378,  591,  852, 1515, 1917, 2367, 2864,
       3408, 4000], dtype=uint16)

Or by default, only round to the nearest 10?

EDIT: Both of these solutions would fail in the HCP dataset I described earlier.

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

3 participants