示例#1
0
    def __init__(self, filepath):
        """
        Initialize the interface to the data.

        Parameters
        ----------
        filepath : string
            String specifiying the filename (with full path if
            applicable).
        """
        # set up the basic params of the data
        if os.path.exists(filepath):
            self.filepath = filepath
        else:
            raise IOError(
                str(filepath) + '\n does not exist!' +
                'Valid path to data file is needed!')
        self._nchannels = read_number_of_signals(self.filepath)

        numbers = []
        names = []
        for i in range(self._nchannels):
            numbers.append(i + 1)
            # CTW: Here we should use the actual channel labels as
            # name -- requires additional cython code to interface
            # with the EDF library:
            names.append(str(i + 1))
        self._channel_info = np.rec.fromarrays([numbers, names],
                                               names='number,name')
示例#2
0
    def __init__(self, filepath):
        """
        Initialize the interface to the data.

        Parameters
        ----------
        filepath : string
            String specifiying the filename (with full path if
            applicable).
        """
        # set up the basic params of the data
        if os.path.exists(filepath):
            self.filepath = filepath
        else:
            raise IOError(str(filepath)+'\n does not exist!'+
                          'Valid path to data file is needed!')
        self._nchannels = read_number_of_signals(self.filepath)

        numbers = []
        names = []        
        for i in range(self._nchannels):
            numbers.append(i+1)
            # CTW: Here we should use the actual channel labels as
            # name -- requires additional cython code to interface
            # with the EDF library:
            names.append(str(i+1))
        self._channel_info = np.rec.fromarrays(
            [numbers, names], names='number,name')    
示例#3
0
文件: edfwrapper.py 项目: jdetle/ptsa
 def _get_nchannels(self):
     return read_number_of_signals(self.filepath)
示例#4
0
 def _get_channels(self):
     # this needs to be replaced by a list of the propper channel labels!
     # return [str(channel)
     #         for channel in range(read_number_of_signals(self.filepath))]
     return [channel
             for channel in range(read_number_of_signals(self.filepath))]
示例#5
0
文件: edfwrapper.py 项目: Jeff33/ptsa
 def _get_nchannels(self):
     return read_number_of_signals(self.filepath)