# continue # elif ephys_folder.find('m480') == 104: # if 'm480.dat' not in os.listdir(ephys_folder): # op.pack_2(ephys_folder,filename =ephys_folder +'/'+'m480'+'.dat', channels =channels_m486_m482_m480_m478, chprefix = 'CH', dref = 'ave') # elif ephys_folder.find('m478') == 104: # if 'm478.dat' not in os.listdir(ephys_folder): # op.pack_2(ephys_folder, filename =ephys_folder +'/'+'m478'+'.dat', channels =channels_m486_m482_m480_m478, chprefix = 'CH', dref = 'ave') # elif ephys_folder.find('m486') == 104: # if 'm486.dat' not in os.listdir(ephys_folder): # op.pack_2(ephys_folder, filename =ephys_folder +'/'+'m486'+'.dat', channels =channels_m486_m482_m480_m478, chprefix ='CH', dref = 'ave') # elif ephys_folder.find('m482') == 104: # if 'm482.dat' not in os.listdir(ephys_folder): # op.pack_2(ephys_folder, filename =ephys_folder +'/'+'m482'+'.dat', channels =channels_m486_m482_m480_m478, chprefix ='CH', dref = 'ave') # elif ephys_folder.find('m484') == 109: # if 'm484.dat' not in os.listdir(ephys_folder): # op.pack_2(ephys_folder, filename =ephys_folder +'/'+'m484'+'.dat', channels =channels_m484_m479, chprefix ='CH', dref = 'ave') # elif ephys_folder.find('m479') == 109: # if 'm479.dat' not in os.listdir(ephys_folder): # op.pack_2(ephys_folder, filename =ephys_folder +'/'+'m479'+'.dat', channels =channels_m484_m479, chprefix ='CH', dref = 'ave') # for file in files: ephys_folder = os.path.join(files_folder, file) if ephys_folder.find('m480') == 104: if 'm480.dat' not in os.listdir(ephys_folder): op.pack_2(ephys_folder, filename=ephys_folder + '/' + 'm480' + '.dat', channels=channels_m486_m482_m480_m478_second_box, chprefix='CH', dref='ave')
# create shank1 and shank2 folders os.makedirs(folderpath + '/shank1') os.makedirs(folderpath + '/shank2') # use channels ordered by intan headstage!!! # shnk1chan = [6, 8, 7, 9, 12, 14, 1, 2, 10, 16, 4, 13, 5, 15, 3, 11] # shnk1chan = [19, 18, 25, 24, 20, 17, 23, 31, 27, 32, 26, 30] shnk1chan = [ 22, 21, 28, 29, 19, 18, 25, 24, 20, 17, 23, 31, 27, 32, 26, 30 ] # all channels shnk2chan = [12, 5, 4, 14, 15, 13, 16, 2, 6, 1, 3] # all channels # use the folder name to name individual dat files datname1 = dfold + '_shank1.dat' OpenEphys.pack_2(folderpath, filename='shank1/' + datname1, source='103', channels=shnk1chan, dref=None) datname2 = dfold + '_shank2.dat' OpenEphys.pack_2(folderpath, filename='shank2/' + datname2, source='103', channels=shnk2chan, dref=None) #==============================================================================# #=============================== GENERATE NEW PRM FILES =======================# # Copy template prm file, edit relevant lines, produce specific prm file for each shank # for shank1