cibrrig.preprocess.extract_frame_times ====================================== .. py:module:: cibrrig.preprocess.extract_frame_times Attributes ---------- .. autoapisummary:: cibrrig.preprocess.extract_frame_times._log Functions --------- .. autoapisummary:: cibrrig.preprocess.extract_frame_times._describe_framerate cibrrig.preprocess.extract_frame_times.process_rec_ni cibrrig.preprocess.extract_frame_times.process_rec_extracted cibrrig.preprocess.extract_frame_times.get_camera_chans cibrrig.preprocess.extract_frame_times.run_session cibrrig.preprocess.extract_frame_times.run_file cibrrig.preprocess.extract_frame_times.run cibrrig.preprocess.extract_frame_times.main Module Contents --------------- .. py:data:: _log .. py:function:: _describe_framerate(frame_times) Compute some QC on the frame times and print to log. Mostly to make sure that the frame rate is not weird. :param frame_times: Times of each frame in seconds. :type frame_times: np.ndarray .. py:function:: process_rec_ni(ni_fn, trig_chan=6, verbose=True) Extract frame times from the NI data. :param ni_fn: Path to the NI data file. :type ni_fn: Path :param trig_chan: Digital channel of the frame trigger. Defaults to 6. :type trig_chan: int, optional :param verbose: If True, print additional information. Defaults to True. :type verbose: bool, optional :returns: Array of frame times in seconds. :rtype: np.ndarray .. py:function:: process_rec_extracted(ni_fn, trig_chan=6) Process extracted NI data to get frame times. :param ni_fn: Path to the NI data file. :type ni_fn: Path :param trig_chan: Digital channel of the frame trigger. Defaults to 6. :type trig_chan: int, optional :returns: Array of frame times in seconds. :rtype: np.ndarray .. py:function:: get_camera_chans(session_path) Get the camera channels from the session path. :param session_path: Path to the session data. :type session_path: Path :returns: A tuple containing: - list: Channels to extract. - list: Labels for the channels. :rtype: tuple .. py:function:: run_session(session_path) Run on an entire session and use the wiring JSON. :param session_path: Path to the session data. :type session_path: Path .. py:function:: run_file(ni_fn, chan, label='camera') Run directly on a ni data file and expected channel for frame triggers. :param ni_fn: Path to the NI data file. :type ni_fn: Path :param chan: Channel to extract. :type chan: int :param label: Label for the channel. Defaults to "camera". :type label: str, optional .. py:function:: run(input_path, trig_chan=None, label='camera') Run the extraction process on the given input path. :param input_path: Path to the input data (file or directory). :type input_path: str :param trig_chan: Digital channel of the frame trigger. Defaults to None. :type trig_chan: int, optional :param label: Label for the channel. Defaults to "camera". :type label: str, optional .. py:function:: main(input_path, trig_chan, label) Main entry point to extract frame times from NI data. :param input_path: Path to the input data (file or directory). :type input_path: str :param trig_chan: Digital channel of the frame trigger. Defaults to None. :type trig_chan: int, optional :param label: Label for the channel. Defaults to "camera". :type label: str, optional