Closed danielsf closed 1 year ago
Here is some code I used in spring 2022 to access the VCN data release from the warehouse. It can probably be repurposed into a script to make sure that we don't accidentally break VCN while working on VBN.
from allensdk.brain_observatory.ecephys.ecephys_project_cache import (
EcephysProjectCache)
import os
import hashlib
manifest_path = '/allen/aibs/informatics/danielsf/scratch/ecephys_manifest.json'
if os.path.exists(manifest_path):
os.unlink(manifest_path)
control_dir = 'warehouse_control'
test_dir = 'warehouse_test'
path_list = ('warehouse_session_table.csv',
'warehouse_probes.csv',
'warehouse_channels.csv',
'warehouse_units.csv')
for path_name in path_list:
full_name = os.path.join(test_dir, path_name)
if os.path.exists(full_name):
os.unlink(full_name)
cache = EcephysProjectCache.from_warehouse(manifest=manifest_path)
session_table = cache.get_session_table()
session_table.to_csv(os.path.join(test_dir, 'warehouse_session_table.csv'))
probes = cache.get_probes()
probes.to_csv(os.path.join(test_dir, 'warehouse_probes.csv'))
channels = cache.get_channels()
channels.to_csv(os.path.join(test_dir, 'warehouse_channels.csv'))
units = cache.get_units()
units.to_csv(os.path.join(test_dir, 'warehouse_units.csv'))
In the process of this work @aamster discovered the need to create an API and store the data for current_source_density
. This work can be done as part of the LFP packaging.
from_json
->to_nwb
API.Scott experimented with this in spring 2022. The
formal_lfp_nwb_generation.py
script in here/allen/aibs/informatics/danielsf/lfp_nwb
should call the VCN code and produce an (unvalidated) NWB file.