Modeling a capacitor with DC Bias
Computing the mean of 25000 values is summing up the values and dividing by 25000.
Computing the mean of 50000 values (the original 25000 plus 25000 new values) is summing up the values and dividing by 50000.  This means (no pun intended) you are adding up the first 25000 values over and over again each time you compute the mean.  And adding up 25000 values takes time.  As the length of the list grows, the time it takes to sum it grows as well.  Total complexity: \$O(n^2)\$

You could create a running total, and compute the mean yourself.

class CAP:

    def __init__(self, ...):
        ....
        self._sum = 0
        self._count = 0

    def update_capacitance(self):
        ...
        self._sum += sum(self.timeline[self._count:])   # Only add in the new samples
        self._count = len(self.timeline)
        DC_bias = (self._sum / self._count) / 1000


Feel free to use np.sum() if it is faster, or to ensure the required precision in the sum.



Appending values one-at-a-time to timeline is itself a time consuming process.  If you know you are accumulating samples in blocks of 25000 points, you could pre-allocate a buffer of 25000 points with np.empty(), and fill that in.  When it is full, after summing this small block into the running total, you could np.concatenate() to a larger timeline array.  Or append it to a list of buffers, and created a new buffer for the next block, and concatenate all the blocks together at the end.

You could also create a list of the means of these smaller buffers, and compute the mean of that list.  This may help avoid precision issues you would encounter in totaling a few million points.