def get_num_samples_per_frame(allsamples,num_channels,data_type):
    """
    Based on number of channels and data type (complex or real, get number of samples per frame.
    
    Parameters
    ----------
     allsamples : int
         total number of sample components in the frame.
     num_channels : int
         number of channels in the frame.
     data_type : int
         0 for real, 1 for complex.
    
    Returns
    -------
     tot_samples_per_channel_and_frame_full : int
         number of samples per channel per frame (full samples, i.e. R or R+jI)
     totsamples_per_channel_and_frame_single : int
         number of sample components (i.e. R, I).
    """
    tot_samples_per_channel_and_frame=len(allsamples)//num_channels
    # number of full samples (real and imag for complex)
    if data_type==1:
        tot_samples_per_channel_and_frame_full=tot_samples_per_channel_and_frame//2
    else:
        tot_samples_per_channel_and_frame_full=tot_samples_per_channel_and_frame
    
    return([tot_samples_per_channel_and_frame,tot_samples_per_channel_and_frame_full])