function Gamma = sparse_code_block(data_block,D,G,thresh,ompfunc,ompparams)
n_feats = size(D, 1);
n_atoms = size(D, 2);
n_signals = size(data_block, 1)/n_feats;
    
% Reshape the data_block
data = reshape(data_block, [n_feats n_signals]);

Gamma = ompfunc(D'*data,G,thresh,ompparams{:});
end
