Skip to content

Saving deepinterpolation denoised file as binary #1785

Closed
@jazlynntan

Description

@jazlynntan

Hello,

I managed to run deepinterpolation and the time series plot looks good. However, when I try to save it as a .dat binary file to run on my local installation of Kilosort3, I get the error message: TypeError: init() got an unexpected keyword argument 'recording'. I get the same error when running Kilosort3 on the denoised recording using the singularity container directly.

I run deepinterpolation via:
import spikeinterface.preprocessing as sp
rec5 = sp.deepinterpolate(sp.zero_channel_pad(rec4,384), model_path = '2020_02_29_15_28_unet_single_ephys_1024_mean_squared_error-1050.h5')
where rec4 is the output of filtering, removing bad channels and common average referencing, following the code of the Neuropixel tutorial. The zero channel padding is because I removed a bad channel (the reference channel). I have the model downloaded and the path is correct.

Regarding saving, I tried:
job_kwargs = dict(n_jobs=12, chunk_duration='1s', progress_bar=True)
rec = rec5.save(folder='myfolder', format='binary', **job_kwargs)
which gave the same TypeError: init() got an unexpected keyword argument 'recording'

as well as:
import spikeinterface.core as sc
job_kwargs = dict(chunk_duration='1s', progress_bar=True)
sc.write_binary_recording(rec5, file_paths = 'myfolder/deepinterpolation_denoised.dat', dtype='int16', n_jobs=12, **job_kwargs)
which again gave the same error.

May I know if I was running deepinterpolation wrongly? Also, is it recommended to save the output as a binary .dat file via the recording.save() method or the write_binary_recording() method? I attempted to save my filtered recording (without deepinterpolation denoising) via the .save() method but it gave a .raw file that my local installation of Kilosort3 did not accept (error message that the input was not binary).

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    preprocessingRelated to preprocessing module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions