# Where's the data for spike width, and what are all these features?

**URL:** <https://community.brain-map.org/t/wheres-the-data-for-spike-width-and-what-are-all-these-features/432>\
**Category:** Technical\
**Tags:** celltype, electrophysiology, allensdk\
**Created:** [February 5, 2020, 12:39am UTC](https://community.brain-map.org/t/wheres-the-data-for-spike-width-and-what-are-all-these-features/432 "2020-02-05T00:39:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajuavinett](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/ajuavinett/32/29_2.png) [@ajuavinett](https://community.brain-map.org/u/ajuavinett)\
**Post date:** [February 5, 2020, 12:39am UTC](https://community.brain-map.org/t/wheres-the-data-for-spike-width-and-what-are-all-these-features/432/1 "2020-02-05T00:39:48Z")

</div>

Hi all!

In the documentation for the Cell Types Database, there’s a mention of spike width as a derived metric for single spikes, however I don’t see it on the website or when I pull the data from the SDK. Is this metric hiding? Or is it simply not in the cell features any longer? It would be great to have. 🙂

Related, is there any documentation that clearly maps all of the metrics available via `get_ephys_features` to what each of these are actually capturing (e.g., fast trough vs slow trough)? I can piece it together from the documentation, but it is kind of dense to tease apart.

Thanks!  
Ashley

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/brainobservatory/original/1X/0db6379d4ccb554aa1d85161660b161a084c1843.png)

---

<div class="post-metadata">

**Author:** ![tmchartrand](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/tmchartrand/32/862_2.png) [@tmchartrand](https://community.brain-map.org/u/tmchartrand)\
**Post date:** [February 7, 2020, 9:31pm UTC](https://community.brain-map.org/t/wheres-the-data-for-spike-width-and-what-are-all-these-features/432/2 "2020-02-07T21:31:45Z")

</div>

Hi Ashley,  
You’re correct that spike width is not among the spike features included in the cell features summary. However, you can use AllenSDK to calculate it easily - see [https://allensdk.readthedocs.io/en/latest/\_static/examples/nb/cell\_types.html#Computing-Electrophysiology-Features](https://allensdk.readthedocs.io/en/latest/_static/examples/nb/cell_types.html#Computing-Electrophysiology-Features).  
Regarding documentation, it looks like you already found the ephys whitepaper ([help.brain-map.org/display/celltypes/Documentation](http://help.brain-map.org/display/celltypes/Documentation)), which is the best source currently. Note that the AP features included as cell features are in Table 3. I know there are a few aspects of the whitepaper that are out of date (e.g. AP height from trough is no longer calculated at all), so if you have any specific suggestions for clarity there let us know, as it’s due for an update soon.

---

<div class="post-metadata">

**Author:** ![ajuavinett](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/ajuavinett/32/29_2.png) [@ajuavinett](https://community.brain-map.org/u/ajuavinett)\
**Post date:** [February 7, 2020, 10:23pm UTC](https://community.brain-map.org/t/wheres-the-data-for-spike-width-and-what-are-all-these-features/432/3 "2020-02-07T22:23:40Z")

</div>

Thank you, I didn’t know about the EphysSweepFeatureExtractor – that’s useful!

---

<div class="post-metadata">

**Author:** ![ajuavinett](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/ajuavinett/32/29_2.png) [@ajuavinett](https://community.brain-map.org/u/ajuavinett)\
**Post date:** [May 7, 2020, 4:58pm UTC](https://community.brain-map.org/t/wheres-the-data-for-spike-width-and-what-are-all-these-features/432/4 "2020-05-07T16:58:29Z")

</div>

Hi Tom, I’m circling back to this, re: documentation.

I’m compiling a glossary for my students on the various features available through get\_ephys\_features(). There are still a few I’m not sure about, and I’d definitely like a pair of Allen eyes on these to make sure I’ve distilled the white paper correctly. Would you mind taking a look?

> **[Allen Cell Types Metrics Glossary](https://docs.google.com/document/d/1YGLwkMTebwrXd_1E817LFbztMjSTCWh83Mlp3_3ZMEo/edit?usp=sharing)**
>
> Allen Cell Types Metrics Glossary Provides a short definition for the metrics available via the get\_ephys\_features() method. Some of these features were obtained from single spikes, whereas others are obtained from spike trains. More detailed...

Other educators are using some of the [lessons I’ve developed](http://sites.google.com/ucsd.edu/neuroedu) around these datasets, so input would be appreciated by many. 🙂

Thanks!  
Ashley

---

<div class="post-metadata">

**Author:** ![tmchartrand](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/tmchartrand/32/862_2.png) [@tmchartrand](https://community.brain-map.org/u/tmchartrand)\
**Post date:** [May 12, 2020, 10:11pm UTC](https://community.brain-map.org/t/wheres-the-data-for-spike-width-and-what-are-all-these-features/432/5 "2020-05-12T22:11:55Z")

</div>

Glad to help, very cool to see your use of the datasets!

Ri is input resistance

Vm\_for\_sag is the peak deflection at which sag is measured (targeted at -100 mV, but not always exact)

Electrode\_0\_pa is the pipette offset

Id is an internal id for each cell (you could use it, for instance, to cross-reference to morphology data or to the web viewer for the cell types database)

---

<div class="post-metadata">

**Author:** ![ajuavinett](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/ajuavinett/32/29_2.png) [@ajuavinett](https://community.brain-map.org/u/ajuavinett)\
**Post date:** [May 13, 2020, 12:33am UTC](https://community.brain-map.org/t/wheres-the-data-for-spike-width-and-what-are-all-these-features/432/6 "2020-05-13T00:33:48Z")

</div>

Gotcha, thank you. Is pipette offset something that already was taken into consideration when computing these features? As I understand it, this is the voltage recorded before entering the cell – should be close to 0 but may not be exact? Thanks!

---

<div class="post-metadata">

**Author:** ![tmchartrand](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/tmchartrand/32/862_2.png) [@tmchartrand](https://community.brain-map.org/u/tmchartrand)\
**Post date:** [May 13, 2020, 1:00am UTC](https://community.brain-map.org/t/wheres-the-data-for-spike-width-and-what-are-all-these-features/432/7 "2020-05-13T01:00:36Z")

</div>

Yes, already taken into account. There are a few features, like this and the Gohm seal, which are used initially for our QC process (so cells where those values indicate something weird are not released). We include them just for transparency, but in most cases they are not of interest to users.
