Date: August 29, 2024
Contributors: Abuzar Mahmood, abuzarmahmood
PR: https://github.com/katzlabbrandeis/blech_clust/pull/215
In our continuous efforts to improve the Blech Clust project, we have made some significant changes that warrant your attention. This blog post will detail the recent addition of the ephys_data
utility, a change aimed to enhance the project’s usability and functionality.
Primarily, the pull request incorporates the ephys_data
utility into our codebase. This addition involved changes to 11 files, with 1939 lines added and no deletions. The impacted files are primarily in Python and Log languages.
The main files changed in this pull request include:
utils/ephys_data/BAKS.py
utils/ephys_data/convenience_scripts/region_spectrogram_plot.py
utils/ephys_data/ephys_data.py
utils/ephys_data/lfp_processing.py
utils/ephys_data/project.log
Among the changes, one crucial update was made to the ephys_data
utility’s BAKS.py
file. Here’s a snippet of the updated code:
"""
Python implementation of BAKS from 10.1371/journal.pone.0206794
"""
import numpy as np
import scipy.special
def BAKS(SpikeTimes, Time):
N = len(SpikeTimes)
a = float(4)
b = float(N**0.8)
sumnum = float(0); sumdenum = float(0)
for i in range(N):
numerator = (((Time-SpikeTimes[i])**2)/2 + 1/b)**(-a)
denumerator = (((Time-SpikeTimes[i])**2)/2 + 1/b)**(-a-0.5)
sumnum = sumnum + numerator
sumdenum = sumdenum + denumerator
...
The addition of ephys_data
as a utility brings a number of benefits. First, it improves the project’s usability by providing a defined way to handle electrophysiological data. It also aids in producing more accurate analysis results, thanks to the BAKS (Bayesian Adaptive Kernel Smoother) method implemented in the BAKS.py
file for spike train data smoothing.
Moreover, the changes made in the region_spectrogram_plot.py
file, which is part of the convenience_scripts
, will allow users to generate and plot spectrograms for specific regions more conveniently.
In conclusion, this pull request represents a significant stride forward in our project’s development, making it more user-friendly and functional. We believe that the addition of the ephys_data
utility will greatly enhance data analysis and visualization capabilities for all users. We’re excited for you to try out these new features and look forward to your feedback!