% compute features for a window that describe the distribution
% currently, 87 features
% data_fft(num_bands, num_times)
function features = compute_local_features_window(data_fft, fft_pow)
    
    num_times = size(data_fft, 2);
    num_bands = size(data_fft, 1);
    
    time_width = [5 3 3];
    band_width = [8 8 4];
    
    features = zeros(sum(time_width.*(band_width+1)), 1);
    
    count = 0;
    for r = 1:length(time_width)                        
        for t = 1:time_width(r)
            t1 = floor((t-1)*num_times/time_width(r))+1;
            t2 = floor(t*num_times/time_width(r));
            for b = 1:band_width(r)
                b1 = floor((b-1)*num_bands/band_width(r))+1;
                b2 = floor(b*num_bands/band_width(r));
                count = count + 1;
                features(count) = sum(sum(data_fft(b1:b2, t1:t2)));
            end
            count= count + 1;
            features(count) = sum(fft_pow(t1:t2));
        end
    end
    
    