#! /bin/bash # script for constructing direction concentration vs b value # from test function data synthesis. echo synthesising data from test functions... # synthesise data and obtain statistics echo b=500 bin/datasynth -testfunc 1 -snr 18.7451 -schemefile scans/tensorDirs_b=5.0e+02.scheme -voxels 1000 | bin/modelfit -inversion 1 -schemefile scans/tensorDirs_b=5.0e+02.scheme | bin/invstats -voxels 1000 > scans/inversionstats_b=500.Bdouble echo b=750 bin/datasynth -testfunc 1 -snr 17.1569 -schemefile scans/tensorDirs_b=7.5e+02.scheme -voxels 1000 |bin/modelfit -inversion 1 -schemefile scans/tensorDirs_b=7.5e+02.scheme | bin/invstats -voxels 1000 > scans/inversionstats_b=750.Bdouble echo b=1000 bin/datasynth -testfunc 1 -snr 16.0 -schemefile scans/tensorDirs_b=1.0e+03.scheme -voxels 1000 |bin/modelfit -inversion 1 -schemefile scans/tensorDirs_b=1.0e+03.scheme | bin/invstats -voxels 1000 > scans/inversionstats_b=1000.Bdouble echo b=1500 bin/datasynth -testfunc 1 -snr 14.3333 -schemefile scans/tensorDirs_b=1.5e+03.scheme -voxels 1000 |bin/modelfit -inversion 1 -schemefile scans/tensorDirs_b=1.5e+03.scheme | bin/invstats -voxels 1000 > scans/inversionstats_b=1500.Bdouble echo b=2000 bin/datasynth -testfunc 1 -snr 13.1176 -schemefile scans/tensorDirs_b=2.0e+03.scheme -voxels 1000 |bin/modelfit -inversion 1 -schemefile scans/tensorDirs_b=2.0e+03.scheme | bin/invstats -voxels 1000 > scans/inversionstats_b=2000.Bdouble echo b=2500 bin/datasynth -testfunc 1 -snr 12.1765 -schemefile scans/tensorDirs_b=2.5e+03.scheme -voxels 1000 |bin/modelfit -inversion 1 -schemefile scans/tensorDirs_b=2.5e+03.scheme | bin/invstats -voxels 1000 > scans/inversionstats_b=2500.Bdouble echo b=3000 bin/datasynth -testfunc 1 -snr 11.4118 -schemefile scans/tensorDirs_b=3.0e+03.scheme -voxels 1000 |bin/modelfit -inversion 1 -schemefile scans/tensorDirs_b=3.0e+03.scheme | bin/invstats -voxels 1000 > scans/inversionstats_b=3000.Bdouble echo b=3500 bin/datasynth -testfunc 1 -snr 10.7647 -schemefile scans/tensorDirs_b=3.5e+03.scheme -voxels 1000 |bin/modelfit -inversion 1 -schemefile scans/tensorDirs_b=3.5e+03.scheme | bin/invstats -voxels 1000 > scans/inversionstats_b=3500.Bdouble echo b=4000 bin/datasynth -testfunc 1 -snr 10.1961 -schemefile scans/tensorDirs_b=4.0e+03.scheme -voxels 1000 |bin/modelfit -inversion 1 -schemefile scans/tensorDirs_b=4.0e+03.scheme | bin/invstats -voxels 1000 > scans/inversionstats_b=4000.Bdouble # extract the direction from the inversion stats files and construct the text file of results echo 500 `cat scans/inversionstats_b=500.Bdouble | bin/shredder 40 8 96 | bin/double2txt` >> dirnConcs.dat echo 750 `cat scans/inversionstats_b=750.Bdouble | bin/shredder 40 8 96 | bin/double2txt` >> dirnConcs.dat echo 1000 `cat scans/inversionstats_b=1000.Bdouble | bin/shredder 40 8 96 | bin/double2txt` >> dirnConcs.dat echo 1500 `cat scans/inversionstats_b=1500.Bdouble | bin/shredder 40 8 96 | bin/double2txt` >> dirnConcs.dat echo 2000 `cat scans/inversionstats_b=2000.Bdouble | bin/shredder 40 8 96 | bin/double2txt` >> dirnConcs.dat echo 2500 `cat scans/inversionstats_b=2500.Bdouble | bin/shredder 40 8 96 | bin/double2txt` >> dirnConcs.dat echo 3000 `cat scans/inversionstats_b=3000.Bdouble | bin/shredder 40 8 96 | bin/double2txt` >> dirnConcs.dat echo 3500 `cat scans/inversionstats_b=3500.Bdouble | bin/shredder 40 8 96 | bin/double2txt` >> dirnConcs.dat echo 4000 `cat scans/inversionstats_b=4000.Bdouble | bin/shredder 40 8 96 | bin/double2txt` >> dirnConcs.dat