started making changes to adapt statistics to 3D matrix of chan_freq_time, where chan = sources
tried making more changes, but script not yet correctly modified