function [data_avg_pg_cmb] = AVE_combine_planar(data)
% thus function applies planar gradient correction and then averages..
cfg                 = [];
cfg.method          = 'template';
cfg.template        = 'CTF275_neighb.mat'; % load the neighboirs template of the CFT275
cfg.layout         =   'CTF275.lay';
cfg.neighbours      = ft_prepare_neighbours(cfg, data);
cfg.method          = 'sincos';
data_avg_pg      = ft_megplanar(cfg, data);

cfg                 = [];
data_avg_pg_cmb =  ft_combineplanar(cfg, data_avg_pg);

end
