# Stimulus changes within electrophysiology data

**URL:** <https://community.brain-map.org/t/stimulus-changes-within-electrophysiology-data/669>\
**Category:** Technical\
**Tags:** atlas-cell-types, experiment-design, electrophysiology, allensdk\
**Created:** [August 14, 2020, 6:38pm UTC](https://community.brain-map.org/t/stimulus-changes-within-electrophysiology-data/669 "2020-08-14T18:38:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiawei](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@Jiawei](https://community.brain-map.org/u/Jiawei)\
**Post date:** [August 14, 2020, 6:38pm UTC](https://community.brain-map.org/t/stimulus-changes-within-electrophysiology-data/669/1 "2020-08-14T18:38:16Z")

</div>

Hi,

I’m doing a research on the [Multimodal Characterization of Individual Neurons dataset](https://portal.brain-map.org/explore/classes/multimodal-characterization). After viewing the [electrophysiology data](https://gui.dandiarchive.org/#/dandiset/000020/draft), I found that within each sweep, the stimulus for different cells have different time duration (for example in sweep 0 in some cells we have 4 stimulus last 500 time points but some have 4 last 2000 time points), why does this difference occur? Also, can I find a specific stimulus that has been applied to all cells since I want to use the cell response to the same stimulus for analysis?

Thanks.

---

<div class="post-metadata">

**Author:** ![jim](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/jim/32/206_2.png) [@jim](https://community.brain-map.org/u/jim)\
**Post date:** [August 20, 2020, 6:44pm UTC](https://community.brain-map.org/t/stimulus-changes-within-electrophysiology-data/669/2 "2020-08-20T18:44:30Z")

</div>

Hi Jiawei,

Thanks for reaching out! The reason some sweeps have stimuli with different durations is because they have different stimulus types applied to them (for any given cell we use 5 or 6 different types of stimuli that characterize the cells response in different ways).

You will want to use the stimulus ontology with the filtered\_sweep\_table function described here: [https://ipfx.readthedocs.io/en/latest/stimuli.html](https://ipfx.readthedocs.io/en/latest/stimuli.html) to find the same stimulus type across the cells.

Jim

---

<div class="post-metadata">

**Author:** ![Jiawei](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@Jiawei](https://community.brain-map.org/u/Jiawei)\
**Post date:** [August 29, 2020, 3:21pm UTC](https://community.brain-map.org/t/stimulus-changes-within-electrophysiology-data/669/3 "2020-08-29T15:21:04Z")

</div>

Thank you for the explanation!
