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