def loadRawOEdir(rawDataDir):
    data = OE.loadFolderToArray(rawDataDir,
                                channels=range(FIRST_CH, LAST_CH + 1),
                                chprefix='CH',
                                dtype=float,
                                session='0',
                                source='100')
    print(np.shape(data))
    totalNumSamples = np.shape(data)[
        0]  #no longer used but available for later
    print(data)
    return data
示例#2
0
def loadRawOEdir(rawDataDir):
    # print('loading: ' + pathToFile)
    # data_dict = OE.load(pathToFile) # returns a dict with data, timestamps, etc.
    # print(data_dict)

    # # open ephys's BROKEN (float given but expects int error) downsample code
    # # def downsample(trace,down):
    # #     downsampled = scipy.signal.resample(trace,np.shape(trace)[0]/down)
    # #     return downsampled
    data = OE.loadFolderToArray(rawDataDir,
                                channels=range(FIRST_CH, LAST_CH + 1),
                                chprefix='CH',
                                dtype=float,
                                session='0',
                                source='100')
    print(np.shape(data))
    totalNumSamples = np.shape(data)[
        0]  #no longer used but available for later
    print(data)
    return data
示例#3
0
            sys.exit(
                'ERROR: user parameters in this script failed to find a valid directory of recordings!'
            )

print('loading: ' + RAW_DATA_PATH)

data_dict = OE.load(pathToFile)  # returns a dict with data, timestamps, etc.
print(data_dict)

# open ephys's BROKEN (float given but expects int error) downsample code
# def downsample(trace,down):
#     downsampled = scipy.signal.resample(trace,np.shape(trace)[0]/down)
#     return downsampled
data = OE.loadFolderToArray(RAW_DATA_PATH,
                            channels=range(FIRST_CH, LAST_CH + 1),
                            chprefix='CH',
                            dtype=float,
                            session='0',
                            source='100')
print(np.shape(data))
totalNumSamples = np.shape(data)[0]  #no longer used but available for later
print(data)

### FIGURE STYLING:
titleFontSize = 120
LINE_WIDTH = 0.5
style.use('fivethirtyeight')
sns.set_style('white')
axes_font_size = 100
axes_font_weight = 'demi'
x_axes_font = {
    'fontsize': axes_font_size,
        for EvTS in range(len(Events['timestamps'])):
            if Events['eventType'][EvTS] == 3: # if event is a TTL
                if Events['eventId'][EvTS] == 1: # if TTL is on
                    TTLSound(find(TempTimestamps==EventsTimestamps(EvTS)): ...  
                        find(TempTimestamps==EventsTimestamps(EvTS+1))) = 1;    
                end                                                             
            end                                                                 
        end                                                                     
    else                                                                        
        TTLSound = zeros(size(TempData, 1), size(TempData, 2));                 
    end                                                                         
    disp('Done.')


#%% Filter raw data
OpenEphys.loadFolderToArray(RecFolder)
import glob
import numpy
import os
import Intan

SoundIntFiles = glob.glob('IntanSound/*.int')
LightOnlyIntFiles = glob.glob('IntanLightOnly/*.int')
N = numpy.size(SoundIntFiles, axis=0)
O = numpy.size(LightOnlyIntFiles, axis=0)

os.makedirs('SpkSound', exist_ok=True)
os.makedirs('SpkLightOnly', exist_ok=True)

LFPCh = numpy.array([16, 1]) # Larger number first!!!