Open ImagineOrange opened 2 years ago
@ImagineOrange Just curious: is it possible for you to provide us with a .txt file containing a sample of voltage, time values that are failing but that you would expect to succeed?
If not, we'll find a way to work through, but it will be more straightforward on our end if there is example of data that is provoking this failure.
Thanks.
@danielsf sure thing: Here are voltage,time in order. time.txt voltage.txt
thank you for the quick response.
Describe the bug I'm calling the putative_spike_detection function on some optical electrophysiology data. The data is squeezed to a range of -80,80 mV.
The function runs smoothly until it calls on the calculate_dvdt function, where it then throws the error:
Traceback (most recent call last): File "allen_sdk.py", line 258, in
before_cutoff = 2000)
File "allen_sdk.py", line 235, in main
test = allensdk_feature_extraction(DENOISED_traces[0])
File "allen_sdk.py", line 206, in allensdk_feature_extraction
spike_indices = detect_putative_spikes(voltage,time) ###we only need stimulus-times
File "/opt/anaconda3/envs/allen_sdk/lib/python3.7/site-packages/allensdk/ephys/ephys_features.py", line 85, in detect_putative_spikes
dvdt = calculate_dvdt(v_window, t_window, filter)
File "/opt/anaconda3/envs/allen_sdk/lib/python3.7/site-packages/allensdk/ephys/ephys_features.py", line 662, in calculate_dvdt
raise ValueError("bessel coeff ({:f}) is outside of valid range [0,1); cannot filter sampling frequency {:.1f} kHz with cutoff frequency {:.1f} kHz.".format(filt_coeff, sample_freq / 1e3, filter))
ValueError: bessel coeff (20000.000000) is outside of valid range [0,1); cannot filter sampling frequency 0.0 kHz with cutoff frequency 10.0 kHz.
I can eliminate the error by setting the filter parameter to anything less than or equal to 0.000099, but this returns no spike indices despite obvious spikes in the data.
To Reproduce Here is a sample of the data that I'm working with:
and as of now I'm calling the putative spike function with the correct numpy arrays, one voltage array and the other a time array of equivalent dimension:
Environment (please complete the following information):
Thank you for the help!