pynwb
pynwb copied to clipboard
get column through `DynamicTableRegion`
This works:
nwb.electrodes['group_name'][:]
But you can't use the same syntax with a DynamicTableRegion, for instance when you get the electrodes field from an ElectricalSeries. This doesn't work:
nwb.processing['ecephys']['LFP']['lfp'].electrodes['group_name'][:]
I'd like for you to be able to get a specific column of a DynamicTableRegion. This would pull the specific column from the target table and would return the specific region that is defined within the DynamicTableRegion.
You can use this syntax:
nwb.processing['ecephys']['LFP']['lfp'].electrodes[:, 'group_name']
You can also use DynamicTableRegion.table to get the target table:
nwb.processing['ecephys']['LFP']['lfp'].electrodes.table['group_name'][:]
We can add the suggested enhancement in HDMF though. I opened an issue in HDMF.