What does firing rate over the course of a recording look like?

Slow & Transient Firing Rate Drifts?

I discussed with Meghan, the way I calculated z-scores of events: Calculating z-score of each occurrence of an event based on that occurrence's pre-window mean and std, as opposed to combining mean and std across event occurrences

I argued that this was a more accurate method because the average firing rate at the beginning of the recording might not be the same as the firing rate by the end of the recording. Meghan asked me if I knew this was actually true or if it was a theoretical concern, and suggested I plot the firing rates over time. I was surprised by the results, because there are a few neurons that seem to have an increased firing rate at the end compared to the beginning of the recording, whether due to drift or some other reason, but there are also large minutes-long consistent changes in firing rate.

Each dashed line is 2 minutes:

Untitled

The previous image is with smoothing. With no smoothing it's almost too noisy to see, but here is a less smoothed version:

Untitled

Oh, this is a "Both_Rewarded" recording, and I just remembered and checked with Iwata,Ryo L that halfway through the recording, the environment changed from competition to the separated, but able to see each other. So the 'drift' in those orange and red units, are probably actually encoding the new environment.

Also, does the fast firing unit here suggest that our cutoff during phy curation should be closer to 15 Hz instead of 20?

2 other recordings, just for reference:

Untitled

Untitled

Timebin 1/2

Nancy asked me to check if the baseline and event firing rates are normally distributed, to see if non-parametric testing is required. A Shapiro-Wilk test said they aren't normally distributed. The main issue with them is that they're centered around zero.

Untitled

Untitled

However, while previously discussing timebin/smoothing window sizes, I never really appreciated what that means for firing rates until just now. If I look at the average firing rate for each Recording/Event/Unit (above), then it looks moderately normal besides being centered close to zero, but if you look at a histogram of the actual firing rate bins (below), there are big gaps between each number.

Untitled

I realized that this is because if you have a smoothing window of 250, each bin's firing rate can only be a multiple of 4, and with a smoothing window of 100, each bin's firing rate can only be a multiple of 10. The above histogram was made with a timebin=100 and a smoothing_window=300, so the firing rates are only in 3.33 increments. You can see that in the value counts of Firing Rate Bins here: