コード例 #1
0
# initialize lists
module_input_json = []
module_output_json = []
session_id = []
data_directory = []

for i, spec in enumerate(recording_specs):

    path = spec[0]
    npx_directory = os.path.dirname(path)
    fname, fextension = os.path.splitext(path)
    input_meta_fullpath = os.path.join(npx_directory, (fname + '.meta'))
    print(input_meta_fullpath)
    binName = os.path.basename(path)
    baseName = SpikeGLX_utils.ParseTcatName(binName)
    prbStr = SpikeGLX_utils.GetProbeStr(binName)  # returns empty string for 3A

    # Create output directory
    kilosort_output_parent = os.path.join(npx_directory, baseName)

    if not os.path.exists(kilosort_output_parent):
        os.mkdir(kilosort_output_parent)

    # output subdirectory
    outputName = 'imec' + prbStr + '_ks2'

    kilosort_output_dir = os.path.join(kilosort_output_parent, outputName)

    session_id.append(baseName)
コード例 #2
0
            #'psth_events',
            #'mean_waveforms',
            #'quality_metrics'

		  ]

for fi in run_names:
    
    [h,t] = os.path.split(fi)
    npx_directory = h
    
    npx_file = glob.glob(os.path.join(npx_directory,'*.ap.bin'))
    print(npx_file[0])
    [h,t]=os.path.split(h)
    session_id = t
    baseName = SpikeGLX_utils.ParseTcatName(npx_file[0])

    print(session_id)




    input_json = os.path.join(fi, session_id +'-inputClassifier.json')
    output_json = os.path.join(fi, session_id +'-outputClassifier.json')

    
   
    
    print( 'Creating json file postprocessing')
    info = createInputJson(input_json, npx_directory=npx_directory, 
	                                   continuous_file = npx_file[0],