visiannot.visiannot.ViSiAnnoTLongRecFromConfigFile

Summary

Module defining ViSiAnnoTLongRecFromConfigFile

Classes

visiannot.visiannot.ViSiAnnoTLongRecFromConfigFile.ViSiAnnoTLongRecFromConfigFile(…)

Subclass of ViSiAnnoT for managing a long recording with several files

API

Class ViSiAnnoTLongRecFromConfigFile

class visiannot.visiannot.ViSiAnnoTLongRecFromConfigFile.ViSiAnnoTLongRecFromConfigFile(path_config)[source]

Bases: visiannot.visiannot.ViSiAnnoTLongRec.ViSiAnnoTLongRec

Subclass of ViSiAnnoT for managing a long recording with several files

First, it searches the list of paths to the video/signal files. It creates temporary files with info for synchronization. TODOTODO

Parameters
  • video_dict (dict) –

    video configuration, each item corresponds to one camera. Key is the camera ID (string). Value is a configuration list of length 5:

    • (str) Directory where to find the video files,

    • (str) Pattern to find video files (e.g. "*.mp4"),

    • (str) Delimiter to get beginning datetime in the video file name,

    • (int) Position of the beginning datetime in the video file name, according to the delimiter,

    • (str) Format of the beginning datetime in the video file name (either "posix" or a format compliant with datetime.strptime()).

  • signal_dict (dict) –

    signal configuration, each item corresponds to one signal widget. Key is the widget ID (Y axis label, string). Value is a nested list of signal configurations. Each element of the nested list corresponds to one signal plot and is a configuration list of 8 elements:

    • (str) Directory where to find the signal files, see positional argument signal_dict of ViSiAnnoT constructor for detail about data storing format,

    • (str) Pattern to find signal files,

    • (str) Delimiter to get beginning datetime in the signal file name,

    • (int) Position of the beginning datetime in the signal file name, according to the delimiter,

    • (str) Format of the beginning datetime in the signal file name (either "posix" or a format compliant with datetime.strptime()),

    • (str) Key to access the data (in case of .mat or .h5 file),

    • (int or float or str) Signal frequency, set it to 0 if signal non regularly sampled, set it to -1 if same frequency as ViSiAnnoT.fps, it may be a string with the path to the frequency attribute in a .h5 file - in case of 2D data with several value columns, then the column index must be specified, e.g. "key - 1" or "key - colName" if there is an attribute at key named columns with columns name being comma-separated (first column is always the timestamps),

    • (dict) Plot style, see https://pyqtgraph.readthedocs.io/en/latest/graphicsItems/plotdataitem.html for details, set it to None for default.

    See Management of long recording for details.

  • interval_dict (dict) –

    interval configuration. Each item corresponds to a signal widget on which to plot intervals. The key must be the same as in signal_dict. Value is a nested list of interval configurations. Each element of the nested list corresponds to a type of interval to be plotted in the same signal widget and is a configuration list of 8 elements:

    • (str) Directory where to find interval files, see positional argument interval_dict of ViSiAnnoT constructor for detail about data storing format,

    • (str) Pattern to find interval files,

    • (str) Delimiter to get beginning datetime in the interval file name,

    • (int) Position of the beginning datetime in the interval file name, according to the delimiter,

    • (str) Format of the beginning datetime in the interval file name (either "posix" or a format compliant with datetime.strptime()),

    • (str) Key to access the data (in case of .mat or .h5 file),

    • (int) Signal frequency, set it to -1 if same frequency as ViSiAnnoT.fps, it may be a string with the path to the frequency attribute in a .h5 file,

    • (tuple or list) Plot color (RGBA).

  • temporal_range (tuple) – temporal range duration used to split the long recording into several files, 2 elements: (minutes, seconds)

  • layout_mode (int) –

    organization of widgets positioning in the window layout (ignored if custom layout organization provided with keyword argument poswid_dict), one of the following:

    • 1 (focus on video, works better with a big screen),

    • 2 (focus on signal, suitable for a laptop screen),

    • 3 (compact display with some features disabled),

    • 4 (adapted to portrait screen orientation).

  • poswid_dict (dict) –

    custom organization of widgets positioning in the window layout. Value is a tuple of length 2 (row, col) or 4 (row, col, rowspan, colspan). Key identifies the widget:

    • "video"

    • "select_manual"

    • "select_from_cursor"

    • "annot_event"

    • "annot_image"

    • "visi"

    • "zoomin"

    • "zoomout"

    • "previous"

    • "next"

    • "file_selection"

    • "progress"

    The signal widgets are automatically positioned below the progress bar.

  • kwargs – keyword arguments of ViSiAnnoT constructor