Convert expanded signals with different samples/frame into
        a uniform numpy array.

        Input parameters
        - sigtype (default='physical'): Specifies whether to mooth
          the e_p_signal field ('physical'), or the e_d_signal
          field ('digital').

def smooth_frames(self, sigtype='physical'):
        """
        Convert expanded signals with different samples/frame into
        a uniform numpy array.

        Input parameters
        - sigtype (default='physical'): Specifies whether to mooth
          the e_p_signal field ('physical'), or the e_d_signal
          field ('digital').
        """
        spf = self.samps_per_frame[:]
        for ch in range(len(spf)):
            if spf[ch] is None:
                spf[ch] = 1

        # Total samples per frame
        tspf = sum(spf)

        if sigtype == 'physical':
            n_sig = len(self.e_p_signal)
            sig_len = int(len(self.e_p_signal[0])/spf[0])
            signal = np.zeros((sig_len, n_sig), dtype='float64')

            for ch in range(n_sig):
                if spf[ch] == 1:
                    signal[:, ch] = self.e_p_signal[ch]
                else:
                    for frame in range(spf[ch]):
                        signal[:, ch] += self.e_p_signal[ch][frame::spf[ch]]
                    signal[:, ch] = signal[:, ch] / spf[ch]

        elif sigtype == 'digital':
            n_sig = len(self.e_d_signal)
            sig_len = int(len(self.e_d_signal[0])/spf[0])
            signal = np.zeros((sig_len, n_sig), dtype='int64')

            for ch in range(n_sig):
                if spf[ch] == 1:
                    signal[:, ch] = self.e_d_signal[ch]
                else:
                    for frame in range(spf[ch]):
                        signal[:, ch] += self.e_d_signal[ch][frame::spf[ch]]
                    signal[:, ch] = signal[:, ch] / spf[ch]
        else:
            raise ValueError("sigtype must be 'physical' or 'digital'")

        return signal