def convert_to_coarse(data,chan_per_coarse):
<EOL>num_coarse = data.size/chan_per_coarse<EOL>data_shaped = np.array(np.reshape(data,(num_coarse,chan_per_coarse)))<EOL>return np.mean(data_shaped[:,<NUM_LIT:2>:-<NUM_LIT:1>],axis=<NUM_LIT:1>)<EOL>
Converts a data array with length n_chans to an array of length n_coarse_chans
by averaging over the coarse channels