annotate aim-mat/modules/sai/ti2003/gen_grouped.m @ 4:537f939baef0 tip

various bug fixes and changed copyright message
author Stefan Bleeck <bleeck@gmail.com>
date Tue, 16 Aug 2011 14:37:17 +0100
parents 20ada0af3d7d
children
rev   line source
tomwalters@0 1 % generating function for 'aim-mat'
tomwalters@0 2 %function returnframes=gen_ti2003(nap,strobes,options)
tomwalters@0 3 %
tomwalters@0 4 % INPUT VALUES:
tomwalters@0 5 %
tomwalters@0 6 % RETURN VALUE:
tomwalters@0 7 %
tomwalters@0 8 % time integration
tomwalters@0 9 %
tomwalters@0 10 % (c) 2011, University of Southampton
bleeck@3 11 % Maintained by Stefan Bleeck (bleeck@gmail.com)
bleeck@3 12 % download of current version is on the soundsoftware site:
bleeck@3 13 % http://code.soundsoftware.ac.uk/projects/aimmat
bleeck@3 14 % documentation and everything is on http://www.acousticscale.org
tomwalters@0 15
tomwalters@0 16 function returnframes=gen_grouped(nap,strobes,options)
tomwalters@0 17 % calculates the stablized image from the data given in options
tomwalters@0 18
tomwalters@0 19
tomwalters@0 20 if ~isfield(strobes,'grouped')
tomwalters@0 21 error('does only work with strobes ''grouping''');
tomwalters@0 22 end
tomwalters@0 23 nr_sources=size(strobes.cross_strobes{1}.source_cross_channel_value,2);
tomwalters@0 24
tomwalters@0 25 % Aufteilen auf Quellen (nur über und unter Hälfte)
tomwalters@0 26 nr_chan=getnrchannels(nap);
tomwalters@0 27
tomwalters@0 28 % for ii=1:nr_sources
tomwalters@0 29 for ii=2:2
tomwalters@0 30 for jj=1:nr_chan
tomwalters@0 31 newstrobes{jj}.strobes=strobes.cross_strobes{jj}.strobe_times;
tomwalters@0 32 newstrobes{jj}.strobe_vals=strobes.cross_strobes{jj}.strobe_vals;
tomwalters@0 33 newstrobes{jj}.strobe_weights=strobes.cross_strobes{jj}.source_cross_channel_value(:,ii);
tomwalters@0 34 end
tomwalters@0 35
tomwalters@0 36 options.criterion='fixed_weights';
tomwalters@0 37 options.start_time=0;
tomwalters@0 38 options.maxdelay=0.035;
tomwalters@0 39 options.buffer_memory_decay=0.03;
tomwalters@0 40 options.frames_per_second=200;
tomwalters@0 41 options.weight_threshold=0;
tomwalters@0 42 options.do_normalize=1;
tomwalters@0 43 options.do_adjust_weights=1;
tomwalters@0 44 options.strobe_weight_alpha=0.5;
tomwalters@0 45 options.delay_weight_change=0.5;
tomwalters@0 46 options.mindelay=0.001;
tomwalters@0 47 retfr=gen_ti2003(nap,newstrobes,options);
tomwalters@0 48
tomwalters@0 49 end
tomwalters@0 50 returnframes=retfr;
tomwalters@0 51 return
tomwalters@0 52
tomwalters@0 53