<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi,
<div><br>
</div>
<div>Without looking through this in detail, I would expect the output to contain 16x10 values - 16 for each of the 10 voxels. &nbsp;The fact that you get 16x20 values with extreme values suggests a datatype problem: maybe somewhere you have a file containing doubles
 rather than floats.</div>
<div><br>
</div>
<div>Have a look through the chunkstats man page and you'll probably find where the error lies.</div>
<div><br>
</div>
<div>Danny</div>
<div><br>
</div>
<div><br>
<div>
<div>On 17 Jun 2014, at 12:18, stefania oliviero &lt;<a href="mailto:stefania.oliviero@hotmail.it">stefania.oliviero@hotmail.it</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div class="hmmessage" style="font-size: 12pt; font-family: Calibri; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<div dir="ltr">Hi all,<br>
first thanks to all the camino moderators for their precious suggestions.&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
I am trying to make a substrate of one voxel and fit the relative signal with mmwmd model.<br>
I am using the follow script:<span class="Apple-converted-space">&nbsp;</span><br>
&nbsp;<br>
SCHEMEFILE=SF90.scheme<br>
WALKERS=160000;<br>
TIMESTEPS=5000;<br>
SNR=20;<br>
DIFF=6.0E-10;<br>
OUTPUTDIR=AbSim<br>
mkdir ${OUTPUTDIR}<br>
<br>
FLOAT_rnd=$RANDOM<br>
INT_rnd=${FLOAT_rnd%.*}<br>
LATSIZE=2.92E-5&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
NUMCYL=20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
GAMA=5.3316<br>
GAMB=2.0484E-7<br>
FNAME=AbD1a20.Bfloat<br>
FNAMEINFO=AbD1a20<br>
<br>
let &quot;SIGMA=$WALKERS/$SNR&quot;<br>
<br>
datasynth -walkers ${WALKERS} -tmax ${TIMESTEPS} -geometry inflammation -numcylinders ${NUMCYL} -p 0.0 -initial uniform -seed ${INT_rnd} -voxels 1 \<br>
-increments 1 -separateruns -latticesize ${LATSIZE} -schemefile ${SCHEMEFILE} -gamma ${GAMA} ${GAMB} -diffusivity ${DIFF} \<br>
-substrateinfo -drawcrosssection ${FNAMEINFO}.gray &gt; ${OUTPUTDIR}/${FNAME} 2&gt; ${FNAMEINFO}.txt<span class="Apple-converted-space">&nbsp;</span><br>
<br>
for ((i=1; i&lt;=10; i=i&#43;1)); do cat ${OUTPUTDIR}/${FNAME}; done | addnoise -sigma ${SIGMA} &gt; ${FNAMEINFO}_NOISE.Bfloat<span class="Apple-converted-space">&nbsp;</span><br>
<br>
cat ${FNAMEINFO}_NOISE.Bfloat | modelfit -fitmodel mmwmdfixed -fitalgorithm mcmc -mmwmddiff 6E-10 -burnin 1000 -samples 100 \<br>
-interval 500 -noisemodel rician -sigma ${SIGMA} -schemefile ${SCHEMEFILE} | chunkstats -chunksize 16 -samples 100 \<br>
-mean &gt; ${FNAMEINFO}_NOISE_MMWMD.Bfloat<br>
<br>
The problem is that file ${FNAMEINFO}_NOISE_MMWMD.Bfloat do not contain only 16 values as I expect (the substrate is formed of one voxel), but 16 X 20 with also negative value:<br>
I see them using fopen and fread.<span class="Apple-converted-space">&nbsp;</span><br>
<br>
fid = fopen('AbD1a20_NOISE_MMWMD.Bfloat', 'r', 'b');<br>
res = fread(fid, 'float')&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
<br>
How can I solve the problem? How can I interpret all the values?<br>
Thanks again<span class="Apple-converted-space">&nbsp;</span><br>
<br>
Cheers<span class="Apple-converted-space">&nbsp;</span><br>
Stefania Oliviero<span class="Apple-converted-space">&nbsp;</span><br>
<br>
ps. the list of the 16X20 values &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
<br>
<br>
&nbsp; 0<br>
&nbsp;0<br>
S0&nbsp; 8.224530220031738<br>
&nbsp;-1.863699110444668e-21<br>
f1&nbsp; 1.858711004257202<br>
&nbsp;9.190513773973481e&#43;25<br>
f2&nbsp; 0.926609992980957<br>
&nbsp;7.015029707773839e&#43;21<br>
f3&nbsp; 1.369219303131104<br>
&nbsp;1.693542986709899e-30<br>
f4&nbsp; 0.7559823989868164<br>
&nbsp;-3.17694181388827e-30<br>
d&nbsp; 0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp; 2.172163724899292<br>
&nbsp;-9.884467027226646e-22<br>
&nbsp; 2.810829639434814<br>
&nbsp;8.930397508547379e&#43;16<br>
&nbsp; 0.4786647856235504<br>
&nbsp;1.310057078073177e&#43;36<br>
&nbsp; 0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp; 2.172163724899292<br>
&nbsp;-9.884467027226646e-22<br>
&nbsp; 2.810829639434814<br>
&nbsp;8.930397508547379e&#43;16<br>
&nbsp; 0.06447996199131012<br>
&nbsp;-1.633653217959846e&#43;28<br>
&nbsp; 0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp; -5.199854850769043<br>
&nbsp;-1.163995524844674e&#43;29<br>
&nbsp;0<br>
&nbsp;0<br>
&nbsp;8.17563533782959<br>
&nbsp;-4.75105565851089e-15<br>
&nbsp;1.841294884681702<br>
&nbsp;5.775239769918727e-13<br>
&nbsp;1.488044142723083<br>
&nbsp;-3.395917218218452e-24<br>
&nbsp;1.047731041908264<br>
&nbsp;35.55131530761719<br>
&nbsp;0.9550412893295288<br>
&nbsp;1.061308366193202e&#43;21<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.174391984939575<br>
&nbsp;3.561243531291051e-25<br>
&nbsp;-2.534331798553467<br>
&nbsp;-9.564227348742295e-31<br>
&nbsp;0.4786647856235504<br>
&nbsp;1.319587750654668e&#43;36<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.174391984939575<br>
&nbsp;3.561243531291051e-25<br>
&nbsp;-2.534331798553467<br>
&nbsp;-9.564227348742295e-31<br>
&nbsp;0.1034887805581093<br>
&nbsp;5.771853661684645e-09<br>
&nbsp;0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp;-5.175981044769287<br>
&nbsp;-1.017516352809881e&#43;31<br>
&nbsp;0<br>
&nbsp;0<br>
&nbsp;8.219924926757812<br>
&nbsp;9.26491752822447e&#43;28<br>
&nbsp;1.855491638183594<br>
&nbsp;-4.515597338480398e-29<br>
&nbsp;1.364690542221069<br>
&nbsp;-5.770785558985449e&#43;27<br>
&nbsp;1.033074736595154<br>
&nbsp;-1.394390768037511e&#43;26<br>
&nbsp;1.006693363189697<br>
&nbsp;4309.93798828125<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;-4.958737850189209<br>
&nbsp;6758401536<br>
&nbsp;3.998507738113403<br>
&nbsp;6.259943643533397e-18<br>
&nbsp;0.4765672087669373<br>
&nbsp;3.773402528519296e-34<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;-4.958737850189209<br>
&nbsp;6758401536<br>
&nbsp;3.998507738113403<br>
&nbsp;6.259943643533397e-18<br>
&nbsp;0.09576673060655594<br>
&nbsp;5965048832<br>
&nbsp;0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp;-5.17671012878418<br>
&nbsp;2.23596379118343e&#43;27<br>
&nbsp;0<br>
&nbsp;0<br>
&nbsp;8.234395980834961<br>
&nbsp;1.016925203195662e&#43;30<br>
&nbsp;1.843050599098206<br>
&nbsp;0.0001048958147293888<br>
&nbsp;0.967486560344696<br>
&nbsp;-6.782044408492824e-14<br>
&nbsp;1.389882206916809<br>
&nbsp;-3.594784016218256e&#43;27<br>
&nbsp;1.333303689956665<br>
&nbsp;4.160535260636049e-18<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.040200233459473<br>
&nbsp;-2.493551332435465e-28<br>
&nbsp;-2.421376705169678<br>
&nbsp;-5.195420690853957e&#43;26<br>
&nbsp;0.4786647856235504<br>
&nbsp;1.159980398881132e&#43;36<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.040200233459473<br>
&nbsp;-2.493551332435465e-28<br>
&nbsp;-2.421376705169678<br>
&nbsp;-5.195420690853957e&#43;26<br>
&nbsp;0.07098308205604553<br>
&nbsp;-1.573314289671638e-29<br>
&nbsp;0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp;-5.185783863067627<br>
&nbsp;0.7966716885566711<br>
&nbsp;0<br>
&nbsp;0<br>
&nbsp;8.235532760620117<br>
&nbsp;-8.098136313376767e-16<br>
&nbsp;1.847925424575806<br>
&nbsp;3.091666234071697e-15<br>
&nbsp;1.068425297737122<br>
&nbsp;NaN<br>
&nbsp;1.369619965553284<br>
&nbsp;-1.664226908913367e-21<br>
&nbsp;1.265216469764709<br>
&nbsp;3.220426972578015e&#43;27<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.054977416992188<br>
&nbsp;-3.666441705597253e&#43;24<br>
&nbsp;-2.232414484024048<br>
&nbsp;-2.637206364558206e&#43;36<br>
&nbsp;0.4786647856235504<br>
&nbsp;1.319557960865562e&#43;36<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.054977416992188<br>
&nbsp;-3.666441705597253e&#43;24<br>
&nbsp;-2.232414484024048<br>
&nbsp;-2.637206364558206e&#43;36<br>
&nbsp;0.07892990857362747<br>
&nbsp;1.344784331364716e-18<br>
&nbsp;0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp;-5.193636894226074<br>
&nbsp;4.350179035559406e-34<br>
&nbsp;0<br>
&nbsp;0<br>
&nbsp;8.215572357177734<br>
&nbsp;1.485588127265567e&#43;25<br>
&nbsp;1.846333742141724<br>
&nbsp;8.714338832760404e-07<br>
&nbsp;1.075241208076477<br>
&nbsp;-2.976498574343404e&#43;22<br>
&nbsp;1.401218175888062<br>
&nbsp;1.285109448242627e&#43;17<br>
&nbsp;1.212325811386108<br>
&nbsp;-5.062357224591691e&#43;29<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.243474721908569<br>
&nbsp;1.949174898671407e&#43;36<br>
&nbsp;-2.302396297454834<br>
&nbsp;1.900524481719367e-24<br>
&nbsp;0.474882572889328<br>
&nbsp;1.963849098186959e&#43;31<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.243474721908569<br>
&nbsp;1.949174898671407e&#43;36<br>
&nbsp;-2.302396297454834<br>
&nbsp;1.900524481719367e-24<br>
&nbsp;0.07929259538650513<br>
&nbsp;4.45744695420087e-32<br>
&nbsp;0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp;-5.188226222991943<br>
&nbsp;7.813559375285837e-21<br>
&nbsp;0<br>
&nbsp;0<br>
&nbsp;8.190117835998535<br>
&nbsp;1.20175033323514e-25<br>
&nbsp;1.845718026161194<br>
&nbsp;9.202333741453702e-37<br>
&nbsp;1.145087122917175<br>
&nbsp;4.004461796559765e-23<br>
&nbsp;1.34853994846344<br>
&nbsp;0.006131891626864672<br>
&nbsp;1.297427892684937<br>
&nbsp;-1.704187254181844e&#43;37<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.21069073677063<br>
&nbsp;3.700585306736271e-19<br>
&nbsp;-1.788000345230103<br>
&nbsp;-1.796271638376812e-11<br>
&nbsp;0.4717114567756653<br>
&nbsp;-226895.890625<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.21069073677063<br>
&nbsp;3.700585306736271e-19<br>
&nbsp;-1.788000345230103<br>
&nbsp;-1.796271638376812e-11<br>
&nbsp;0.08328014612197876<br>
&nbsp;-5.104643430855692e&#43;32<br>
&nbsp;0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp;-5.156137466430664<br>
&nbsp;1.73671554887888e&#43;36<br>
&nbsp;0<br>
&nbsp;0<br>
&nbsp;8.220879554748535<br>
&nbsp;7616.06298828125<br>
&nbsp;1.706142067909241<br>
&nbsp;-1.051235178980411e&#43;22<br>
&nbsp;1.717968940734863<br>
&nbsp;4.473759607288441e-18<br>
&nbsp;1.404045701026917<br>
&nbsp;377.2929992675781<br>
&nbsp;1.39950966835022<br>
&nbsp;-8.309964484175231e-19<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.019524574279785<br>
&nbsp;-1.776001764192488e&#43;34<br>
&nbsp;1.441986560821533<br>
&nbsp;-1.319797957257027e&#43;24<br>
&nbsp;0.4786647856235504<br>
&nbsp;1.319516445308405e&#43;36<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.019524574279785<br>
&nbsp;-1.776001764192488e&#43;34<br>
&nbsp;1.441986560821533<br>
&nbsp;-1.319797957257027e&#43;24<br>
&nbsp;0.1197220385074615<br>
&nbsp;1.642972189503863e-13<br>
&nbsp;0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp;-5.174685478210449<br>
&nbsp;-2.278755491750942e&#43;38<br>
&nbsp;0<br>
&nbsp;0<br>
&nbsp;8.245189666748047<br>
&nbsp;278710.40625<br>
&nbsp;1.782524943351746<br>
&nbsp;5.795323332336011e-09<br>
&nbsp;1.595520973205566<br>
&nbsp;-1.038947912619138e-14<br>
&nbsp;1.322386980056763<br>
&nbsp;-1.005076333284924e&#43;19<br>
&nbsp;1.450064539909363<br>
&nbsp;-5.906108935249677e-09<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.062609434127808<br>
&nbsp;-3.539777639983856e-25<br>
&nbsp;-2.417265176773071<br>
&nbsp;0.01927732862532139<br>
&nbsp;0.4786647856235504<br>
&nbsp;1.306203499476646e&#43;36<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.062609434127808<br>
&nbsp;-3.539777639983856e-25<br>
&nbsp;-2.417265176773071<br>
&nbsp;0.01927732862532139<br>
&nbsp;0.1120011657476425<br>
&nbsp;5.331455710003461e&#43;32<br>
&nbsp;0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp;-5.179274559020996<br>
&nbsp;-6.79911182910331e-10<br>
&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
&nbsp;0<br>
&nbsp;8.243127822875977&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
&nbsp;-5.033884947667555e-29<br>
&nbsp;1.78268301486969&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
&nbsp;-1.226406241071041e&#43;36<br>
&nbsp;1.662764310836792&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
&nbsp;-2.75854094571034e-38<br>
&nbsp;1.27248477935791&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><br>
&nbsp;-5219.408203125<br>
&nbsp;0.9848801493644714<br>
&nbsp;-213086279565312 #10^10<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.034368515014648<br>
&nbsp;-1.700320171723325e&#43;17<br>
&nbsp;1.544929027557373<br>
&nbsp;9.088711549266166e&#43;18<br>
&nbsp;0.4786647856235504<br>
&nbsp;1.310674265459163e&#43;36<br>
&nbsp;0.1295076459646225<br>
&nbsp;-4.165380421254879e&#43;21<br>
&nbsp;2.034368515014648<br>
&nbsp;-1.700320171723325e&#43;17<br>
&nbsp;1.544929027557373<br>
&nbsp;9.088711549266166e&#43;18<br>
&nbsp;0.1152695417404175<br>
&nbsp;-0.2617772817611694<br>
&nbsp;0.1574022024869919<br>
&nbsp;-3.151482974496329e&#43;24<br>
&nbsp;-5.211963176727295<br>
&nbsp;-1.513784627604764e-05<span class="Apple-converted-space">&nbsp;</span><br>
fid = fopen('AbD1a80_NOISE_MMWMD.Bfloat', 'r', 'b'); #apre file bfloat<br>
&nbsp;res = fread(fid, 'float');&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # lo legge nella var res come float<br>
fid = fopen('AbD1a80_NOISE_MMWMD.Bfloat', 'r', 'b'); #apre file bfloat<br>
&nbsp;res = fread(fid, 'float');&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # lo legge nella var res come float<br>
<br>
</div>
_______________________________________________<br>
Camino-users mailing list<br>
<a href="mailto:Camino-users@www.nitrc.org">Camino-users@www.nitrc.org</a><br>
<a href="http://www.nitrc.org/mailman/listinfo/camino-users">http://www.nitrc.org/mailman/listinfo/camino-users</a></div>
</blockquote>
</div>
<br>
</div>
</body>
</html>