Email-запись: Theory for the optimal detection of time-varying signals in cellular sensing systems