# Voltage Membrane Issue

**URL:** <https://brian.discourse.group/t/voltage-membrane-issue/1005>\
**Category:** Support\
**Tags:** monitor\
**Created:** [12 June 2023 12:19 UTC](https://brian.discourse.group/t/voltage-membrane-issue/1005 "2023-06-12T12:19:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haydar](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@Haydar](https://brian.discourse.group/u/Haydar)\
**Post date:** [12 June 2023 12:19 UTC](https://brian.discourse.group/t/voltage-membrane-issue/1005/1 "2023-06-12T12:19:07Z")

</div>

Hello Brian Community,

I am monitoring the voltage membrane of the LIF Neuron and I notice that the stateMonitor is showing the value of the voltage membrane equal to the resting voltage even though it is not (double checked by the spikemonitor).  
This behavior was repeated when the neuron reaches its maximum firing rate (according to the simulation). I attached a figure to clarify my issue

 ![Capture](https://global.discourse-cdn.com/free1/uploads/brian/original/1X/f9da07c8007189d6667468101aea54fea8cfa721.png)  
is there any justification for this ?  
Thank you.

---

<div class="post-metadata">

**Author:** ![mstimberg](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/mstimberg/32/11_2.png) [@mstimberg](https://brian.discourse.group/u/mstimberg)\
**Post date:** [12 June 2023 12:51 UTC](https://brian.discourse.group/t/voltage-membrane-issue/1005/2 "2023-06-12T12:51:29Z")

</div>

Hi @Haydar. I think you are most likely seeing the result of the fact that the `StateMonitor` records the first value at each time step. If your input is strong enough to go from the reset value to above the threshold within a single time step, a recording with the `StateMonitor` will only show the reset value. A quick fix is to use `StateMonitor` with e.g. `when='before_thresholds'` to record the value before it is compared against the threshold.

For a detailed explanation of this issue, please have a look at this blog post/video: [Getting the timing right (scheduling&nbsp;1) | The Brian spiking neural network simulator](https://briansimulator.org/posts/2020/video-scheduling-1/)

---

<div class="post-metadata">

**Author:** ![Haydar](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@Haydar](https://brian.discourse.group/u/Haydar)\
**Post date:** [12 June 2023 13:35 UTC](https://brian.discourse.group/t/voltage-membrane-issue/1005/3 "2023-06-12T13:35:20Z")

</div>

Super !  
Thank you so much @mstimberg
