@@ -77,7 +77,7 @@ def crlb_finitediff_cost(flip, ESP, T1, T2):
7777t1 = 1000.0
7878t2 = 100.0
7979
80- angles = np .ones (60 , dtype = np .float32 ) * 120.0
80+ angles = np .concatenate (( np . linspace ( 0 , 180.0 , 36 ), np . ones (60 , dtype = np .float32 ) * 180.0 ))
8181esp = 5.0
8282
8383# run
@@ -104,21 +104,21 @@ def crlb_finitediff_cost(flip, ESP, T1, T2):
104104tcost = t1 - t0
105105
106106# plot derivative
107- #%%
107+ #%%plots
108108fsz = 20
109109plt .figure ()
110110plt .subplot (2 ,2 ,1 )
111111plt .rcParams .update ({'font.size' : 0.5 * fsz })
112112plt .plot (angles , '.' )
113113plt .xlabel ("Echo #" , fontsize = fsz )
114- plt .xlim ([- 1 , 51 ])
114+ plt .xlim ([- 1 , 97 ])
115115plt .ylabel ("Flip Angle [deg]" , fontsize = fsz )
116116
117117plt .subplot (2 ,2 ,2 )
118118plt .rcParams .update ({'font.size' : 0.5 * fsz })
119119plt .plot (abs (grad ), '-k' ), plt .plot (abs (grad0 ), '*r' )
120120plt .xlabel ("Echo #" , fontsize = fsz )
121- plt .xlim ([- 1 , 51 ])
121+ plt .xlim ([- 1 , 97 ])
122122plt .ylabel (r"$\frac{\partial signal}{\partial T2}$ [a.u.]" , fontsize = fsz )
123123plt .legend (["Finite Diff" , "Auto Diff" ])
124124
@@ -127,7 +127,7 @@ def crlb_finitediff_cost(flip, ESP, T1, T2):
127127plt .rcParams .update ({'font.size' : 0.5 * fsz })
128128plt .plot (abs (dcost ), '-k' ), plt .plot (abs (dcost0 ), '*r' )
129129plt .xlabel ("Echo #" , fontsize = fsz )
130- plt .xlim ([- 1 , 51 ])
130+ plt .xlim ([- 1 , 97 ])
131131plt .ylabel (r"$\frac{\partial CRLB}{\partial FA}$ [a.u.]" , fontsize = fsz )
132132plt .legend (["Finite Diff" , "Auto Diff" ])
133133
@@ -148,7 +148,7 @@ def crlb_finitediff_cost(flip, ESP, T1, T2):
148148# Add some text for labels, title and custom x-axis tick labels, etc.
149149plt .ylabel ('Execution Time [s]' , fontsize = fsz )
150150plt .xticks (x , labels , fontsize = fsz )
151- plt .ylim ([0 , 25 ])
151+ # plt.ylim([0, 25])
152152plt .legend ()
153153
154154plt .bar_label (rects1 , padding = 3 , fontsize = fsz )
0 commit comments