stimpyp.camlog.LabCamlog#
- final class stimpyp.camlog.LabCamlog#
Bases:
AbstractCamlogLabcam log
- __init__(root, frame_id, timestamp, comment_info, time_info=None)#
- Parameters:
root (Path)
frame_id (ndarray)
timestamp (ndarray)
comment_info (dict[str, Any])
time_info (list[str] | None)
Methods
__init__(root, frame_id, timestamp, comment_info)get_camera_time(log[, cam_name, interpolate])Interpolate camera log frames to those recorded by pyvstim.
load(root[, suffix])load/parse the camera log file
Attributes
number of frames
tif root path
frame index
time stamp of each frame
# information
i.e., # [21-03-02 15:23:08].
- __init__(root, frame_id, timestamp, comment_info, time_info=None)#
- Parameters:
root (Path)
frame_id (ndarray)
timestamp (ndarray)
comment_info (dict[str, Any])
time_info (list[str] | None)
- property nframes: int#
number of frames
- root: Path#
tif root path
- frame_id: ndarray#
frame index
- timestamp: ndarray#
time stamp of each frame
- comment_info: dict[str, Any]#
# information
- time_info: list[str]#
i.e., # [21-03-02 15:23:08]. Note that time could be duplicated
- classmethod load(root, suffix='.camlog')#
load/parse the camera log file
- Parameters:
root (Path | str) – directory with camera log file
suffix (str) – file suffix
- Returns:
- Return type:
Self
- get_camera_time(log, cam_name='1P_cam', interpolate=True)#
Interpolate camera log frames to those recorded by pyvstim.
- Parameters:
log (AbstractLog) –
AbstractLogcam_name (Literal['facecam', 'eyecam', '1P_cam']) – camera name
interpolate (bool) – Whether do the interpolation according to the number of log event
- Returns:
1D camera time array in sec
- Return type:
ndarray