Skip to content

Commit

Permalink
Merge pull request #95 from Julie-Fabre/bleeding_edge
Browse files Browse the repository at this point in the history
Bleeding edge
  • Loading branch information
Julie-Fabre authored Jun 5, 2024
2 parents 20774d4 + 85ffcce commit daf2701
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 53 deletions.
22 changes: 22 additions & 0 deletions qualityMetrics/bc_updateSpatialDecaySlope.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function bc_updateSpatialDecaySlope(kilosortSavePath, qMetricSavePath)

% load in quality metrics
[~, qMetric] = bc_loadSavedMetrics(qMetricSavePath);

% load in relevant kilosort files
[~, spikeTemplates, templateWaveforms, ~, ~, ...
~, ~] = bc_loadEphysData(kilosortSavePath);

uniqueTemplates = unique(spikeTemplates);

% update spatial decay value
for iUnit = 1:size(uniqueTemplates,1)

thisUnit = uniqueTemplates(iUnit);

qMetric.spatialDecaySlope(iUnit) = qMetric.spatialDecaySlope(iUnit)./max(max(templateWaveforms(thisUnit, :,:)));
end

% save new metrics
parquetwrite([fullfile(qMetricSavePath, 'templates._bc_qMetrics.parquet')], qMetric)
end
53 changes: 0 additions & 53 deletions qualityMetrics/helpers/bc_getSpatialDecay.asv

This file was deleted.

0 comments on commit daf2701

Please sign in to comment.