blimpy/calib_utils/stokescal.py
def convert_to_coarse(data,chan_per_coarse):
    '''
    Converts a data array with length n_chans to an array of length n_coarse_chans
    by averaging over the coarse channels
    '''
    #find number of coarse channels and reshape array
    num_coarse = data.size/chan_per_coarse
    data_shaped = np.array(np.reshape(data,(num_coarse,chan_per_coarse)))

    #Return the average over each coarse channel
    return np.mean(data_shaped[:,2:-1],axis=1)
def convert_to_coarse(data,chan_per_coarse):
    '''
    Converts a data array with length n_chans to an array of length n_coarse_chans
    by averaging over the coarse channels
    '''
    #find number of coarse channels and reshape array
    num_coarse = data.size/chan_per_coarse
    data_shaped = np.array(np.reshape(data,(num_coarse,chan_per_coarse)))

    #Return the average over each coarse channel
    return np.mean(data_shaped[:,2:-1],axis=1)
def convert_to_coarse ( data , chan_per_coarse ) : #find number of coarse channels and reshape array num_coarse = data . size / chan_per_coarse data_shaped = np . array ( np . reshape ( data , ( num_coarse , chan_per_coarse ) ) ) #Return the average over each coarse channel return np . mean ( data_shaped [ : , 2 : - 1 ] , axis = 1 )
Converts a data array with length n_chans to an array of length n_coarse_chans
    by averaging over the coarse channels
Converts a data array with length n_chans to an array of length n_coarse_chans by averaging over the coarse channels