Skip to content

Commit

Permalink
remove column of row labels from waveform_metrics.csv and metrics.csv
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferColonell committed Oct 26, 2021
1 parent 60c4025 commit d77560f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 0 additions & 2 deletions ecephys_spike_sorting/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
import os
import numpy as np
import json
import glob
import sys
import time
import psutil
import pathlib

from git import Repo
Expand Down
2 changes: 1 addition & 1 deletion ecephys_spike_sorting/modules/mean_waveforms/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def calculate_mean_waveforms(args):
# save new metrics as _version number
wm_fullpath = os.path.join(pathlib.Path(wm_fullpath).parent, pathlib.Path(wm_fullpath).stem + '_' + repr(clu_version) + '.csv')

metrics.to_csv(wm_fullpath)
metrics.to_csv(wm_fullpath, index=False)


else:
Expand Down
2 changes: 1 addition & 1 deletion ecephys_spike_sorting/modules/quality_metrics/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def calculate_quality_metrics(args):

print("Saving data...")

metrics.to_csv(output_file)
metrics.to_csv(output_file, index=False )

execution_time = time.time() - start

Expand Down
3 changes: 2 additions & 1 deletion ecephys_spike_sorting/scripts/create_input_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def createInputJson(output_file,
# location of kilosor respository and kilosort version

kilosort_repository = r'C:\Users\labadmin\Documents\jic\KS3_fork\Kilosort2'

KS2ver = '2.0' # must equal '3.0', '2.5' or '2.0', and match the kiilosort_repository

# KS 3.0 does not yet output pcs.
Expand Down Expand Up @@ -155,7 +156,7 @@ def createInputJson(output_file,
nrows = np.sqrt((np.square(ks_templateRadius_um) - np.square(hpitch.get(probe_type))))/vpitch.get(probe_type)
ks_nNeighbors = int(round(2*nrows*nColumn.get(probe_type)))
if ks_nNeighbors > 64:
ks_nNeighbors = 64 #max allowed in CUDA
ks_nNeighbors = 64 #max allowed in CUDA for standard KS2
print('ks_nNeighbors: ' + repr(ks_nNeighbors))

c_waves_radius_sites = int(round(c_Waves_snr_um/vpitch.get(probe_type)))
Expand Down
6 changes: 3 additions & 3 deletions ecephys_spike_sorting/scripts/sglx_filelist_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# -------------------------------
# Full path to log file
# If this file exists, new run data is appended to it
logFullPath = r'E:\SC045\SC045_121520_g0_imec0\pipeline_log.csv'
logFullPath = r'D:\ecephys_fork\test_data\file_list_test\pipeline_log.csv'

# brain region specific params
# can add a new brain region by adding the key and value for each param
Expand All @@ -39,12 +39,12 @@

# Raw data directory = npx_directory
# run_specs = name, gate, trigger and probes to process
npx_directory = r'D:\ecephys_fork\test_data\SC_10trial'
npx_directory = r'D:\ecephys_fork\test_data\file_list_test'

# for each recording, specfiy a full path the the binary and a brain region

recording_specs = [
[r'E:\SC045\SC045_121520_g0_imec0\SC045_121520_g0_tcat.imec0.ap.bin', ['default'] ]
[r'D:\ecephys_fork\test_data\file_list_test\SC024_092319_NP1.0_Midbrain_g0_tcat.imec0.ap.bin', ['default'] ]

]

Expand Down
7 changes: 4 additions & 3 deletions ecephys_spike_sorting/scripts/sglx_multi_run_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
# Set to an existing directory; all output will be written here.
# Output will be in the standard SpikeGLX directory structure:
# run_folder/probe_folder/*.bin
catGT_dest = r'D:\ecephys_fork\test_data\SC_10trial\test_depth'
catGT_dest = r'D:\ecephys_fork\test_data\SC_10trial\test_events'

# ------------
# CatGT params
Expand Down Expand Up @@ -126,7 +126,7 @@
# extract param string for psth events -- copy the CatGT params used to extract
# events that should be exported with the phy output for PSTH plots
# If not using, remove psth_events from the list of modules
event_ex_param_str = 'XD=-1,1,50'
event_ex_param_str = 'XD=4,1,50'

# -----------------
# TPrime parameters
Expand All @@ -143,7 +143,8 @@
modules = [
'kilosort_helper',
'kilosort_postprocessing',
'noise_templates',
'noise_templates',
'psth_events',
'mean_waveforms',
'quality_metrics'
]
Expand Down

0 comments on commit d77560f

Please sign in to comment.