@@ -26,6 +26,8 @@ def main():
26
26
parser .add_argument ('--other-noise' , type = str , help = 'Path to the raw noise data file of another coil part' )
27
27
# add scaling factor, defaulted to 100
28
28
parser .add_argument ('--scaling-factor' , type = float , default = 100 , help = 'Scaling factor for the SNR map' )
29
+ # Add argument to specify the maximum value of the colorbar. No default value.
30
+ parser .add_argument ('--max-colorbar' , type = float , help = 'Maximum value for the colorbar' )
29
31
args = parser .parse_args ()
30
32
31
33
fname_image = args .fname_image
@@ -119,7 +121,11 @@ def main():
119
121
snr_rss *= args .scaling_factor
120
122
121
123
plt .figure ()
122
- plt .imshow (np .abs (snr_rss ), cmap = 'jet' , extent = extent )
124
+ # display SNR map, and colorbar with max value specified by user, if provided
125
+ if args .max_colorbar is not None :
126
+ plt .imshow (np .abs (snr_rss ), cmap = 'jet' , extent = extent , vmax = args .max_colorbar )
127
+ else :
128
+ plt .imshow (np .abs (snr_rss ), cmap = 'jet' , extent = extent )
123
129
plt .title ('SNR map from RSS Combination' )
124
130
plt .colorbar ()
125
131
plt .savefig (f'{ fname_image } _snr_rss.png' )
0 commit comments