pyvisor package
Subpackages
- pyvisor.GUI package
- Subpackages
- pyvisor.GUI.icon_gallery package
- pyvisor.GUI.model package
- pyvisor.GUI.tab_behaviours package
- Submodules
- pyvisor.GUI.tab_behaviours.animal_tab module
- pyvisor.GUI.tab_behaviours.behaviour_checkbox module
- pyvisor.GUI.tab_behaviours.behaviour_widget module
- pyvisor.GUI.tab_behaviours.compatible_behaviour_widget module
- pyvisor.GUI.tab_behaviours.single_animal_tab module
- pyvisor.GUI.tab_behaviours.tab_behaviours module
- Module contents
- pyvisor.GUI.tab_buttons package
- Submodules
- pyvisor.GUI.main_gui module
- pyvisor.GUI.run_gui module
- pyvisor.GUI.styles module
- pyvisor.GUI.tab_analysis module
TabAnalysisTabAnalysis.checkingInputs()TabAnalysis.clearLayout()TabAnalysis.close_event()TabAnalysis.exportData()TabAnalysis.exportFrame()TabAnalysis.exportMovie()TabAnalysis.getFileName()TabAnalysis.init_UI()TabAnalysis.loadData()TabAnalysis.loadMedia()TabAnalysis.makeAutosaveRow()TabAnalysis.makeBehavInfoBox()TabAnalysis.makeBehaviourSummary()TabAnalysis.makeCommandoRow()TabAnalysis.makeMovieControlInfoBox()TabAnalysis.makeMovieFileIO()TabAnalysis.resizeEvent()TabAnalysis.runScorer()TabAnalysis.saveData()
- pyvisor.GUI.tab_results module
- Module contents
- Subpackages
- pyvisor.analysis package
- Submodules
- pyvisor.analysis.analysis_offline module
analysisOffLineanalysisOffLine.calculateSequenceIDX()analysisOffLine.calculateTransProbs()analysisOffLine.computeExclusiveModulator()analysisOffLine.computeInclusiveModulator()analysisOffLine.computeNegativeModulator()analysisOffLine.createAnaOnObj()analysisOffLine.readData()analysisOffLine.readDataSingle()analysisOffLine.reduceSequenceIDX()analysisOffLine.retrieveAnaOnResults()analysisOffLine.runAnaOnAnalysis()analysisOffLine.runAnalysis()analysisOffLine.saveDataMultiple()analysisOffLine.saveDataSingle()analysisOffLine.saveDataSingleMat()analysisOffLine.saveDataSinglePkl()analysisOffLine.saveDataSingleTxt()analysisOffLine.saveDataSingleXlsx()analysisOffLine.setAnalysisWindow()analysisOffLine.subtractBehav()
- pyvisor.analysis.analysis_online module
analysisanalysis.anaBoutDur()analysis.anaFrequency()analysis.anaPercentage()analysis.calcAllSequenceChanges()analysis.getDataFromScorer()analysis.getFPS()analysis.getSequenceChanges()analysis.mean_confidence_interval()analysis.plotBoutDur()analysis.plotFrequency()analysis.plotPercentage()analysis.runAnalysis()
- pyvisor.analysis.ethogram_analysis module
- Module contents
- pyvisor.exception package
- pyvisor.resources package
Submodules
pyvisor.MediaHandler module
Created on Wed May 25 08:40:38 2016
@author: bgeurten
- class pyvisor.MediaHandler.MediaHandler(filename, mode, bufferSize=2000)[source]
Bases:
objectVideo and image sequence playback handler.
Wraps
pimsto provide frame-accurate access to movies, Norpix SEQ files, and image sequences. Manages playback state (play/pause, forward/reverse, FPS) and an in-memory frame buffer.- Parameters:
pyvisor.animal_ethogram_2 module
- class pyvisor.animal_ethogram_2.AnimalEthogram2(animal: Animal, n_frames: int)[source]
Bases:
objectFrame-level ethogram for a single animal.
Stores a boolean DataFrame where each column is a behaviour and each row is a video frame. Provides methods to assign, delete, and query behaviour states at individual frames.
pyvisor.dataIO module
Created on Wed Jun 1 13:42:07 2016
@author: bgeurten
- class pyvisor.dataIO.dataIO(parent)[source]
Bases:
objectData input/output handler for ethogram data.
Supports saving annotations as plain text, Excel, MATLAB, and pickle formats. Also handles autosave with periodic background snapshots and overlay frame/video export.
- autosave()[source]
Start, update, or stop the autosave worker.
Autosave parameters are provided by the parent scorer via the
autosave_settingsattribute. The expected schema is:{ "enabled": bool, "interval_seconds": int, "directory": str, }
The worker writes
autosave_latest.pklandautosave_latest.txtinto the configured directory at the given interval. When autosave is disabled any existing worker is shut down gracefully.
- saveOverlayMovie(fPos, prefix='frame', extension='mp4')[source]
Export the scored video as an actual video file with icon overlays.
If extension is ‘mp4’ or ‘avi’, a proper video file is written using PyAV. For image formats (‘png’, ‘jpeg’, ‘bmp’, ‘tga’) a numbered image sequence is written instead.
pyvisor.ethogram module
- class pyvisor.ethogram.Ethogram(animals: Dict[int, Animal], n_frames: int, lock: RLock = None)[source]
Bases:
objectContainer linking all per-animal ethograms with shared state.
Manages the live toggle states (which behaviours the user is currently pressing) and delegates frame-level recording to
AnimalEthogram2instances.
pyvisor.icon module
Created on Thu Jun 16 13:19:47 2016
@author: bgeurten
- class pyvisor.icon.Icon(size=(96, 96), color=(144, 21, 222), alpha=255)[source]
Bases:
objectRecolourable icon for behaviour display in the scorer window.
Loads a decal image, tints it to the behaviour’s assigned colour, and converts it to a pygame surface for blitting.
pyvisor.manual_ethology_scorer_2 module
- class pyvisor.manual_ethology_scorer_2.ManualEthologyScorer2(animals: Dict[int, Animal], movie_bindings: MovieBindings, selected_device: str, autosave_settings: Dict[str, bool | int | str] | None = None)[source]
Bases:
objectReal-time video annotation engine.
Opens a pygame window showing the video with behaviour icon overlays. Processes gamepad/keyboard input to toggle behaviour states and records them frame-by-frame into an
Ethogram.Supports:
Sidecar-based session persistence (auto-save/resume)
Autosave to a configurable directory
F1-toggleable key binding overlay
Visual distinction between live and recorded annotations
- property autosave_settings
pyvisor.paths module
Utility helpers for locating user-specific data directories.
This module centralizes the logic for determining where pyVISOR should
store user data such as cached icons, serialized GUI state, and autosave
artifacts. It relies on appdirs so that the chosen locations
respect platform conventions (~/Library on macOS, %APPDATA% on
Windows, etc.).
- pyvisor.paths.ensure_autosave_dir() Path[source]
Ensure and return the directory for autosave data.
- pyvisor.paths.ensure_tmp_icon_dir() Path[source]
Ensure and return the directory for cached, recoloured icons.
pyvisor.user_input_control module
- class pyvisor.user_input_control.UserInputControl2(animals: Dict[int, Animal], movie_bindings: MovieBindings, selected_device: str, movie: MediaHandler, ethogram: Ethogram)[source]
Bases:
objectMaps gamepad/keyboard input codes to scorer actions.
Reads the button-to-behaviour assignments from the GUI model and builds a dispatch dictionary. Called from the scorer’s main loop on every pygame input event.
Module contents
pyVISOR — Desktop toolkit for manual ethology scoring.
This package provides a PyQt5-based GUI for annotating animal behaviours in video recordings using gamepads or keyboards, with built-in analysis and export capabilities.