Skip to content

implement data compression using mtscomp for openephys and spikeglx for neuropixels data #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 15, 2022

Conversation

ttngu207
Copy link
Contributor

@ttngu207 ttngu207 commented Jul 25, 2022

  • implement data compression using mtscomp for openephys and spikeglx for neuropixels data
  • improve memory management with large OpenEphys objects - explicit calls to gc.collect()

@ttngu207 ttngu207 marked this pull request as ready for review August 15, 2022 19:07
@sidhulyalkar sidhulyalkar merged commit c153e7f into datajoint:run_kilosort Aug 15, 2022
# explicitly garbage collect "loaded_oe"
# as these may have large memory footprint and may not be cleared fast enough
del loaded_oe
gc.collect()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has been this shown to improve performance compared to normal garbage collection?

Comment on lines 274 to 276
self.EphysFile.insert([{**key,
'file_path': fp.relative_to(root_dir).as_posix()}
for fp in probe_data.recording_info['recording_files']])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generator is even more efficient that then the list

            self.EphysFile.insert({**key,
                                    'file_path': fp.relative_to(root_dir).as_posix()}
                                   for fp in probe_data.recording_info['recording_files'])

@@ -325,6 +326,10 @@ def make(self, key):
self.EphysFile.insert([{**key,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, replace list comprehension with generator.

lfp_file = self.root_dir / (self.root_name + '.lf.bin')

decompressed_files = []
for bin_fp, band_type in zip([ap_file, lfp_file], ['ap', 'lfp']):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for bin_fp, band_type in ((ap_file, 'ap'), (lfp_file, 'lfp')):

kabilar pushed a commit to kabilar/element-array-ephys that referenced this pull request Jun 26, 2023
Revise pytests/docker, markdown lint, pre-commit, spell check cleanup, NWB test update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants