-
Notifications
You must be signed in to change notification settings - Fork 38
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
Conversation
… neuropixels data
# explicitly garbage collect "loaded_oe" | ||
# as these may have large memory footprint and may not be cleared fast enough | ||
del loaded_oe | ||
gc.collect() |
There was a problem hiding this comment.
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?
self.EphysFile.insert([{**key, | ||
'file_path': fp.relative_to(root_dir).as_posix()} | ||
for fp in probe_data.recording_info['recording_files']]) |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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']): |
There was a problem hiding this comment.
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')):
Revise pytests/docker, markdown lint, pre-commit, spell check cleanup, NWB test update
mtscomp
for openephys and spikeglx for neuropixels datagc.collect()