Esempio n. 1
0
def getSignalHeaders(edfFilename):
    try:
        print("Reading headers from ", edfFilename)
        edfR = EdfReader(str(edfFilename))
        return edfR.getSignalHeaders()
    except:
        print('Could not read headers from {}'.format(edfFilename))
        return []
Esempio n. 2
0
def get_signal_headers(edf_filename, verbose=False):
    if verbose:
        print("Reading headers from ", edf_filename)
    try:
        edf_r = EdfReader(str(edf_filename),
                          annotations_mode=False,
                          check_file_size=False)
        return edf_r.getSignalHeaders()
    except:
        print("Failed reading headers from ", str(edf_filename))
        return []
def getSignalHeaders(edfFilename):
    try:
        # print("Reading headers from ", edfFilename)
        try:
            edfR = EdfReader(str(edfFilename))
            return edfR.getSignalHeaders()
        except:
            edfR = mne.io.read_raw_edf(str(edfFilename), verbose=False)
            return edfR.ch_names
    except:
        print("Could not read headers from {}".format(edfFilename))
        return []