Skip to content

Commit

Permalink
Got width sections to approach constant signal as width sections incr…
Browse files Browse the repository at this point in the history
…ease
  • Loading branch information
Tom Close committed Apr 10, 2013
1 parent 1728e60 commit 9d300cb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions bash/calc_base_signal
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

rm ~/Desktop/intensities;
for n in `seq 30`; do
generate_image /home/tclose/fouts/params/fibre/tract/test_configurations/x-large.tct ~/Desktop/intens_calc/$n.mif -clean --exp_num_width $n;
maxb0 ~/Desktop/intens_calc/$n.mif >> ~/Desktop/intensities;
echo " " >> ~/Desktop/intensities;
done
python /home/tclose/fouts/python/plot_base_signal.py

Binary file modified params/fibre/tract/test_configurations/x-larger.tct
Binary file not shown.
6 changes: 6 additions & 0 deletions python/plot_base_signal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
d = np.loadtxt('/home/tclose/Desktop/intensities')
plt.plot(d)
plt.show()
2 changes: 1 addition & 1 deletion src/bts/fibre/tractlet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ namespace BTS {
double length_fraction = 1.0 / (double)num_length_sections;
double width_fraction = 1.0 / (double)num_width_sections;

double intensity_scale = 1.0 / (double)(MR::Math::pow2(num_width_sections));
double intensity_scale = 1.0 / (double)(width_fractions.rows());

const MR::Math::Matrix<double>& position_matrix = Strand::position_matrix(
num_length_sections, this->degree());
Expand Down

0 comments on commit 9d300cb

Please sign in to comment.