  end
    
    if nargin < 3
        display_progress = false;
    end

    figure();
    ax = axes();
    
    % Number of points we will use to calculate the variance
    n_req = 100;
    
    % Number of time to repeat the calculation at diffent histogram
    % positions
    N = 50;

    % Reshape data if required, e.g. if images are passed
    sz = size(data);
    data = reshape(data,[sz(1) prod(sz(2:end))]);
    
    % Calculate intensity
    I = squeeze(sum(data,1));
    
    % 