Skip to content
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

Add probe CCF coordinates to NWB2 files #1482

Closed
wbwakeman opened this issue Apr 7, 2020 · 6 comments
Closed

Add probe CCF coordinates to NWB2 files #1482

wbwakeman opened this issue Apr 7, 2020 · 6 comments
Assignees
Labels
braintv relates to Insitute BrainTV program neuropixels

Comments

@wbwakeman
Copy link
Contributor

wbwakeman commented Apr 7, 2020

Work with @bendichter to determine the right way to store CCF probe location in an NWB2.2.2 file.
Update ecephys nwb write module to add the information

Get CCF coordinates from Warehouse ( #1094 )
Add to LIMS so we can include them in NWB files

@wbwakeman wbwakeman added braintv relates to Insitute BrainTV program neuropixels labels Apr 7, 2020
@bendichter
Copy link
Contributor

You can store them simply as x, y, and z in the electrodes table e.g. nwbfile.add_electrode(..., x=x, y=y, z=z). +x is posterior, +y is inferior, and +z is right.

See:

@njmei
Copy link
Contributor

njmei commented May 7, 2020

@bendichter It looks like we are adding electrodes with:

nwbfile.electrodes = pynwb.file.ElectrodeTable().from_dataframe(input_df)

Just to double check, the input_df just needs to have x, y, and z columns filled out?

@bendichter
Copy link
Contributor

@njmei I'd recommend using nwbfile.add_electrode() in a for loop. The required columns for the electrodes table are:
x (float) – the x coordinate of the position (+x is posterior)
y (float) – the y coordinate of the position (+y is inferior)
z (float) – the z coordinate of the position (+z is right)
imp (float) – the impedance of the electrode
location (str) – the location of electrode within the subject e.g. brain region
filtering (str) – description of hardware filtering
group (ElectrodeGroup) – the ElectrodeGroup object to add to this NWBFile

@njmei
Copy link
Contributor

njmei commented May 8, 2020

  • LIMS ecephys_write_nwb_strategy.rb needs to be updated to include CCF data for channels
  • AllenSDK write_nwb input schema for channels need to be updated
  • AllenSDK write_nwb needs to be updated to write CCF coordinates
  • Fix/Add any necessary tests

@njmei
Copy link
Contributor

njmei commented May 12, 2020

@bendichter Noticed some weirdness with the documentation and figured it'd be good to get some clarification:

https://pynwb.readthedocs.io/en/stable/pynwb.file.html?highlight=add_electrode#pynwb.file.NWBFile.add_electrode

  1. The description states Add a unit to the unit table but shouldn't it be adding an electrode to the ElectrodeTable?

  2. What units should imp be in, I'm guessing ohms?

  3. What is meant be Filtering? should it be the name of a filter? The name of a piece of hardware that does filtering? The parameters used to do hardware filtering?

njmei added a commit that referenced this issue May 13, 2020
This commit adds CCF coordinates to the pynwb electrode
(a.k.a. 'channel') table written by the ecephys write nwb
module.

Relates to: #1482
@njmei njmei mentioned this issue May 13, 2020
3 tasks
njmei added a commit that referenced this issue May 18, 2020
This commit adds CCF coordinates to the pynwb electrode
(a.k.a. 'channel') table written by the ecephys write nwb
module.

Relates to: #1482
@rly
Copy link

rly commented May 18, 2020

  1. The description states Add a unit to the unit table but shouldn't it be adding an electrode to the ElectrodeTable?

Yes, that is a bug in our documentation. I'll raise an issue in PyNWB.

  1. What units should imp be in, I'm guessing ohms?

Yes, ohms. I'll add that to the documentation.

  1. What is meant be Filtering? should it be the name of a filter? The name of a piece of hardware that does filtering? The parameters used to do hardware filtering?

This should include all relevant information about filtering applied to the electrode at the hardware level. It should include at least the name, frequency cutoffs, and perhaps the name of the hardware, though that should be in Device. For example, you could write, "2nd-order Butterworth bandpass filter that passes frequencies 300-6000 Hz". I believe this is the default in Open Ephys, but please check. If the filtering is unknown, please use "unknown".

https://open-ephys.atlassian.net/wiki/spaces/OEW/pages/950415/Bandpass+Filter

This is free-form text -- it might be useful to structure the components of this information as separate fields, but given the wide variety of filtering operations that can be applied, we think it is best left for now as free-form text. If structured fields are useful for a particular tool that AIBS is developing, please develop an extension and let us know that this would be a useful addition to the core standard.

njmei added a commit that referenced this issue May 30, 2020
This commit adds CCF coordinates to the pynwb electrode
(a.k.a. 'channel') table written by the ecephys write nwb
module.

Relates to: #1482
njmei added a commit that referenced this issue Jun 9, 2020
This commit adds CCF coordinates to the pynwb electrode
(a.k.a. 'channel') table written by the ecephys write nwb
module.

Relates to: #1482
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
braintv relates to Insitute BrainTV program neuropixels
Projects
None yet
Development

No branches or pull requests

4 participants