Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions blech_dat_file_join.py

This file was deleted.

4 changes: 2 additions & 2 deletions blech_make_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def create_emg_trials_for_digin(
match_ind = np.where(
np.abs(taste_info_frame['start'] - this_start) < match_tol
)[0]
assert len(match_ind) == 1, 'Exact match not found'
assert len(match_ind) == 1, f'Exact match not found between taste and laser signals given tolerance of {(match_tol)/sampling_rate} sec'
match_trials_ind.append(match_ind[0])
match_trials = taste_info_frame.iloc[match_trials_ind]['abs_trial_num'].values
laser_info_frame['abs_trial_num'] = match_trials
Expand Down Expand Up @@ -479,4 +479,4 @@ def create_emg_trials_for_digin(
hf5.close()

# Write successful execution to log
this_pipeline_check.write_to_log(script_path, 'completed')
this_pipeline_check.write_to_log(script_path, 'completed')
4 changes: 4 additions & 0 deletions params/_templates/sorting_params_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
2000,
5000
],
"responsiveness_pre_post_durations": [
1000,
2000
],
"pal_iden_calc_params": {
"window_size": 250,
"step_size": 25
Expand Down
4 changes: 1 addition & 3 deletions params/dependency_graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
"blech_process.py": "blech_common_avg_reference.py",
"blech_post_process.py": "blech_process.py",
"blech_units_plot.py": "blech_post_process.py",
"blech_make_psth.py": "blech_make_arrays.py",
"emg/emg_filter.py": "blech_make_arrays.py",
"blech_palatability_identity_setup.py": "blech_make_psth.py",
"blech_overlay_psth.py": "blech_palatability_identity_setup.py",
"blech_unit_characteristics.py": "blech_make_arrays.py",
"utils/qa_utils/unit_similarity.py": "blech_post_process.py",
"utils/qa_utils/drift_check.py": "blech_post_process.py"
},
Expand Down
2 changes: 2 additions & 0 deletions pipeline_testing/test_data_handling/download_test_data.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Google Drive link : https://drive.google.com/file/d/1EcpUIqp81h3J89-6dEEueeULqBlKW5a7/view?usp=sharing

SCRIPT_PATH=$(realpath ${BASH_SOURCE[0]})
# Find path to neuRecommend as parent directory of test.sh
DIR_PATH=$(dirname ${SCRIPT_PATH})
Expand Down
File renamed without changes.
File renamed without changes.
15 changes: 8 additions & 7 deletions utils/cluster_stability.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@
import seaborn as sns
import matplotlib

def load_electrode_data(electrode_num):
def load_electrode_data(data_dir, electrode_num):
"""
Load data from disk
"""

loading_paths = [\
f'./spike_waveforms/electrode{electrode_num:02}/spike_waveforms.npy',
f'./spike_times/electrode{electrode_num:02}/spike_times.npy',
f'./spike_waveforms/electrode{electrode_num:02}/pca_waveforms.npy',
f'./spike_waveforms/electrode{electrode_num:02}/energy.npy',
f'./spike_waveforms/electrode{electrode_num:02}/spike_amplitudes.npy',
f'spike_waveforms/electrode{electrode_num:02}/spike_waveforms.npy',
f'spike_times/electrode{electrode_num:02}/spike_times.npy',
f'spike_waveforms/electrode{electrode_num:02}/pca_waveforms.npy',
f'spike_waveforms/electrode{electrode_num:02}/energy.npy',
f'spike_waveforms/electrode{electrode_num:02}/spike_amplitudes.npy',
]
loading_paths = [os.path.join(data_dir, x) for x in loading_paths]

loaded_dat = [np.load(x) for x in loading_paths]

Expand Down Expand Up @@ -78,7 +79,7 @@ def return_clustering_solutions(electrode_num):
pca_slices,
energy,
amplitudes,
) = load_electrode_data(electrode_num)
) = load_electrode_data(data_dir, electrode_num)

# Load predictions for all clustering solutions
predictions = [load_cluster_predictions(electrode_num, x) \
Expand Down
File renamed without changes.
File renamed without changes.