localCTV.py 1.0 KB

123456789101112131415161718192021222324
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. """
  4. Created on Thu Aug 13 15:50:52 2020
  5. @author: galizia
  6. """
  7. def ctv222(time_trace, first_frame, last_frame, sampling_period, stim_on_times, stim_off_times, flags, p1):
  8. """
  9. ana's method -222
  10. mean(13-16) - mean(6-9) 4 frames each
  11. <insert a brief description of the method here>
  12. :param time_trace: iterable of numbers
  13. :param first_frame: int, interpreted as a frame number, where frames are numbered 1, 2, 3...
  14. :param last_frame: int, interpreted as a frame number, where frames are numbered 1, 2, 3...
  15. :param sampling_period: float, sampling period of <time_trace>, in ms
  16. :param stim_on_times: list of floats, stimulus onset times, in ms
  17. :param stim_off_times: list of floats, stimulus offset times, in ms
  18. :param flags: FlagsManager object, is a mapping of flag names to flags values with additional functions
  19. :param p1: pandas.Series object, internal representation of data
  20. :return: float
  21. """
  22. return np.mean(time_trace[13:17]) - np.mean(time_trace[6:10])