<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. 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 <<a href="mailto:stefania.oliviero@hotmail.it">stefania.oliviero@hotmail.it</a>> 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. <span class="Apple-converted-space"> </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"> </span><br>
<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 <span class="Apple-converted-space"> </span><br>
NUMCYL=20 <span class="Apple-converted-space"> </span><br>
GAMA=5.3316<br>
GAMB=2.0484E-7<br>
FNAME=AbD1a20.Bfloat<br>
FNAMEINFO=AbD1a20<br>
<br>
let "SIGMA=$WALKERS/$SNR"<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 > ${OUTPUTDIR}/${FNAME} 2> ${FNAMEINFO}.txt<span class="Apple-converted-space"> </span><br>
<br>
for ((i=1; i<=10; i=i+1)); do cat ${OUTPUTDIR}/${FNAME}; done | addnoise -sigma ${SIGMA} > ${FNAMEINFO}_NOISE.Bfloat<span class="Apple-converted-space"> </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 > ${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"> </span><br>
<br>
fid = fopen('AbD1a20_NOISE_MMWMD.Bfloat', 'r', 'b');<br>
res = fread(fid, 'float') <span class="Apple-converted-space"> </span><br>
<br>
How can I solve the problem? How can I interpret all the values?<br>
Thanks again<span class="Apple-converted-space"> </span><br>
<br>
Cheers<span class="Apple-converted-space"> </span><br>
Stefania Oliviero<span class="Apple-converted-space"> </span><br>
<br>
ps. the list of the 16X20 values <span class="Apple-converted-space"> </span><br>
<br>
<br>
0<br>
0<br>
S0 8.224530220031738<br>
-1.863699110444668e-21<br>
f1 1.858711004257202<br>
9.190513773973481e+25<br>
f2 0.926609992980957<br>
7.015029707773839e+21<br>
f3 1.369219303131104<br>
1.693542986709899e-30<br>
f4 0.7559823989868164<br>
-3.17694181388827e-30<br>
d 0.1295076459646225<br>
-4.165380421254879e+21<br>
2.172163724899292<br>
-9.884467027226646e-22<br>
2.810829639434814<br>
8.930397508547379e+16<br>
0.4786647856235504<br>
1.310057078073177e+36<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.172163724899292<br>
-9.884467027226646e-22<br>
2.810829639434814<br>
8.930397508547379e+16<br>
0.06447996199131012<br>
-1.633653217959846e+28<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.199854850769043<br>
-1.163995524844674e+29<br>
0<br>
0<br>
8.17563533782959<br>
-4.75105565851089e-15<br>
1.841294884681702<br>
5.775239769918727e-13<br>
1.488044142723083<br>
-3.395917218218452e-24<br>
1.047731041908264<br>
35.55131530761719<br>
0.9550412893295288<br>
1.061308366193202e+21<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.174391984939575<br>
3.561243531291051e-25<br>
-2.534331798553467<br>
-9.564227348742295e-31<br>
0.4786647856235504<br>
1.319587750654668e+36<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.174391984939575<br>
3.561243531291051e-25<br>
-2.534331798553467<br>
-9.564227348742295e-31<br>
0.1034887805581093<br>
5.771853661684645e-09<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.175981044769287<br>
-1.017516352809881e+31<br>
0<br>
0<br>
8.219924926757812<br>
9.26491752822447e+28<br>
1.855491638183594<br>
-4.515597338480398e-29<br>
1.364690542221069<br>
-5.770785558985449e+27<br>
1.033074736595154<br>
-1.394390768037511e+26<br>
1.006693363189697<br>
4309.93798828125<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
-4.958737850189209<br>
6758401536<br>
3.998507738113403<br>
6.259943643533397e-18<br>
0.4765672087669373<br>
3.773402528519296e-34<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
-4.958737850189209<br>
6758401536<br>
3.998507738113403<br>
6.259943643533397e-18<br>
0.09576673060655594<br>
5965048832<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.17671012878418<br>
2.23596379118343e+27<br>
0<br>
0<br>
8.234395980834961<br>
1.016925203195662e+30<br>
1.843050599098206<br>
0.0001048958147293888<br>
0.967486560344696<br>
-6.782044408492824e-14<br>
1.389882206916809<br>
-3.594784016218256e+27<br>
1.333303689956665<br>
4.160535260636049e-18<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.040200233459473<br>
-2.493551332435465e-28<br>
-2.421376705169678<br>
-5.195420690853957e+26<br>
0.4786647856235504<br>
1.159980398881132e+36<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.040200233459473<br>
-2.493551332435465e-28<br>
-2.421376705169678<br>
-5.195420690853957e+26<br>
0.07098308205604553<br>
-1.573314289671638e-29<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.185783863067627<br>
0.7966716885566711<br>
0<br>
0<br>
8.235532760620117<br>
-8.098136313376767e-16<br>
1.847925424575806<br>
3.091666234071697e-15<br>
1.068425297737122<br>
NaN<br>
1.369619965553284<br>
-1.664226908913367e-21<br>
1.265216469764709<br>
3.220426972578015e+27<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.054977416992188<br>
-3.666441705597253e+24<br>
-2.232414484024048<br>
-2.637206364558206e+36<br>
0.4786647856235504<br>
1.319557960865562e+36<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.054977416992188<br>
-3.666441705597253e+24<br>
-2.232414484024048<br>
-2.637206364558206e+36<br>
0.07892990857362747<br>
1.344784331364716e-18<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.193636894226074<br>
4.350179035559406e-34<br>
0<br>
0<br>
8.215572357177734<br>
1.485588127265567e+25<br>
1.846333742141724<br>
8.714338832760404e-07<br>
1.075241208076477<br>
-2.976498574343404e+22<br>
1.401218175888062<br>
1.285109448242627e+17<br>
1.212325811386108<br>
-5.062357224591691e+29<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.243474721908569<br>
1.949174898671407e+36<br>
-2.302396297454834<br>
1.900524481719367e-24<br>
0.474882572889328<br>
1.963849098186959e+31<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.243474721908569<br>
1.949174898671407e+36<br>
-2.302396297454834<br>
1.900524481719367e-24<br>
0.07929259538650513<br>
4.45744695420087e-32<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.188226222991943<br>
7.813559375285837e-21<br>
0<br>
0<br>
8.190117835998535<br>
1.20175033323514e-25<br>
1.845718026161194<br>
9.202333741453702e-37<br>
1.145087122917175<br>
4.004461796559765e-23<br>
1.34853994846344<br>
0.006131891626864672<br>
1.297427892684937<br>
-1.704187254181844e+37<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.21069073677063<br>
3.700585306736271e-19<br>
-1.788000345230103<br>
-1.796271638376812e-11<br>
0.4717114567756653<br>
-226895.890625<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.21069073677063<br>
3.700585306736271e-19<br>
-1.788000345230103<br>
-1.796271638376812e-11<br>
0.08328014612197876<br>
-5.104643430855692e+32<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.156137466430664<br>
1.73671554887888e+36<br>
0<br>
0<br>
8.220879554748535<br>
7616.06298828125<br>
1.706142067909241<br>
-1.051235178980411e+22<br>
1.717968940734863<br>
4.473759607288441e-18<br>
1.404045701026917<br>
377.2929992675781<br>
1.39950966835022<br>
-8.309964484175231e-19<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.019524574279785<br>
-1.776001764192488e+34<br>
1.441986560821533<br>
-1.319797957257027e+24<br>
0.4786647856235504<br>
1.319516445308405e+36<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.019524574279785<br>
-1.776001764192488e+34<br>
1.441986560821533<br>
-1.319797957257027e+24<br>
0.1197220385074615<br>
1.642972189503863e-13<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.174685478210449<br>
-2.278755491750942e+38<br>
0<br>
0<br>
8.245189666748047<br>
278710.40625<br>
1.782524943351746<br>
5.795323332336011e-09<br>
1.595520973205566<br>
-1.038947912619138e-14<br>
1.322386980056763<br>
-1.005076333284924e+19<br>
1.450064539909363<br>
-5.906108935249677e-09<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.062609434127808<br>
-3.539777639983856e-25<br>
-2.417265176773071<br>
0.01927732862532139<br>
0.4786647856235504<br>
1.306203499476646e+36<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.062609434127808<br>
-3.539777639983856e-25<br>
-2.417265176773071<br>
0.01927732862532139<br>
0.1120011657476425<br>
5.331455710003461e+32<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.179274559020996<br>
-6.79911182910331e-10<br>
0 <span class="Apple-converted-space"> </span><br>
0<br>
8.243127822875977 <span class="Apple-converted-space"> </span><br>
-5.033884947667555e-29<br>
1.78268301486969 <span class="Apple-converted-space"> </span><br>
-1.226406241071041e+36<br>
1.662764310836792 <span class="Apple-converted-space"> </span><br>
-2.75854094571034e-38<br>
1.27248477935791 <span class="Apple-converted-space"> </span><br>
-5219.408203125<br>
0.9848801493644714<br>
-213086279565312 #10^10<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.034368515014648<br>
-1.700320171723325e+17<br>
1.544929027557373<br>
9.088711549266166e+18<br>
0.4786647856235504<br>
1.310674265459163e+36<br>
0.1295076459646225<br>
-4.165380421254879e+21<br>
2.034368515014648<br>
-1.700320171723325e+17<br>
1.544929027557373<br>
9.088711549266166e+18<br>
0.1152695417404175<br>
-0.2617772817611694<br>
0.1574022024869919<br>
-3.151482974496329e+24<br>
-5.211963176727295<br>
-1.513784627604764e-05<span class="Apple-converted-space"> </span><br>
fid = fopen('AbD1a80_NOISE_MMWMD.Bfloat', 'r', 'b'); #apre file bfloat<br>
res = fread(fid, 'float'); # lo legge nella var res come float<br>
fid = fopen('AbD1a80_NOISE_MMWMD.Bfloat', 'r', 'b'); #apre file bfloat<br>
res = fread(fid, 'float'); # 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>