AllenInstitute / ecephys_spike_sorting

Modules for processing extracellular electrophysiology data from Neuropixels probes
Other
109 stars 91 forks source link

Questions regarding create_input_json.py setup #77

Open petesass opened 1 year ago

petesass commented 1 year ago

Hello! I am seeking assistance to understand how to edit _create_inputjson.py. I have edited lines 17-23 of the code below, this is a recreation of how I filled in these values:

def createInputJson(output_file,
                    npx_directory=C:\Users\user\ecephysinputdata,
                    continuous_file =None,
                    extracted_data_directory=C:\Users\user\ecephysinputdata\recording1,
                    kilosort_output_directory=C:\Users\user\ecephysinputdata\KS,
                    kilosort_output_tmp=None,
                    probe_type='3B1):

Am I right to change these values in this way? Is the format correct? Are there more values to be changed within _create_inputjson.py?

After running python C:\Users\user\Downloads\ecephys_spike_sorting-master\ecephys_spike_sorting-master\ecephys_spike_sorting\scripts\batch_processing.py I got the following error:

Traceback (most recent call last):
  File "C:\Users\user\Downloads\ecephys_spike_sorting-master\ecephys_spike_sorting-master\ecephys_spike_sorting\scripts\batch_processing.py", line 23, in <module>
    info = createInputJson(input_json, kilosort_output_directory=directory)
  File "C:\Users\user\Downloads\ecephys_spike_sorting-master\ecephys_spike_sorting-master\ecephys_spike_sorting\scripts\create_input_json.py", line 202, in createInputJson
    with io.open(output_file, 'w', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\svc_neuropix\\Documents\\json_files\\outputs-input.json'

I assume given from the above error that I also have to edit 'C:\\Users\\svc_neuropix\\Documents\\json_files\\outputs-input.json' in _create_inputjson.py, but I will try this tomorrow. Is this the only other thing that needs to be changed to run _batchprocessing.py?

I apologize for the trivial nature of these questions and I appreciate any assistance in getting ecephys up and running!

jsiegle commented 1 year ago

It's failing because the script cannot find the specified file – you'll need to change any file paths in create_input_json.py and batch_processing.py to point to locations that exist on your system.