[aimc] r304 committed - Move design of SAI out of SAI_Run.m

0 views
Skip to first unread message

ai...@googlecode.com

unread,
Jun 27, 2013, 4:47:06 PM6/27/13
to aimc...@googlegroups.com
Revision: 304
Author: ro...@google.com
Date: Thu Jun 27 13:47:02 2013
Log: Move design of SAI out of SAI_Run.m

http://code.google.com/p/aimc/source/detail?r=304

Modified:
/trunk/matlab/bmm/carfac/SAI_Run.m

=======================================
--- /trunk/matlab/bmm/carfac/SAI_Run.m Tue May 28 09:12:07 2013
+++ /trunk/matlab/bmm/carfac/SAI_Run.m Thu Jun 27 13:47:02 2013
@@ -17,8 +17,8 @@
% See the License for the specific language governing permissions and
% limitations under the License.

-function [frame_rate, num_frames] = SAI_Run(CF, input_waves)
-% function [CF, SAI_movie] = SAI_Run(CF, input_waves)
+function [frame_rate, num_frames] = SAI_Run(CF, sai_struct, input_waves)
+% function [frame_rate, num_frames] = SAI_Run(CF, sai_struct, input_waves)
% This function runs the CARFAC and display an SAI movie.

n_ch = CF.n_ch;
@@ -32,19 +32,10 @@
frame_rate = fs / seglen;
n_segs = ceil(n_samp / seglen);

-% Design the SAI parameters.
-sai_struct.width = 256;
-sai_struct.future_lags = sai_struct.width / 2;
-sai_struct.window_width = seglen;
-n_triggers = 2;
-sai_struct.n_window_pos = n_triggers;
-sai_struct.channel_smoothing_scale = 0;
-
-
% State stored in sai_struct.
% Make the history buffer.
buffer_width = sai_struct.width + ...
- floor((1 + (n_triggers - 1)/2) * sai_struct.window_width);
+ floor((1 + (sai_struct.n_window_pos - 1)/2) * sai_struct.window_width);
sai_struct.nap_buffer = zeros(buffer_width, n_ch);
% The SAI frame is transposed to be image-like.
sai_struct.frame = zeros(n_ch, sai_struct.width);
@@ -76,7 +67,7 @@

cmap = 1 - gray; % jet
figure(10)
- image(32 * sai_struct.frame);
+ imagesc(32 * sai_struct.frame);
colormap(cmap);
colorbar

Reply all
Reply to author
Forward
0 new messages