Visualization toolkit for marmoset homecage behavioral data (marm_behavior outputs).
Project description
marm_viz
Visualization toolkit for marmoset homecage behavioral data. Designed to work with outputs from marm_behavior.
Installation
pip install marm-viz
Quick Start
Point marm_viz at a folder containing marm_behavior outputs (hlabel, hcoord, edges, depths files):
# Generate all 10 plot types (default: JPG output)
python -m marm_viz /path/to/recording_folder
# Single plot type
python -m marm_viz /path/to/recording_folder --plot ethogram
# Vector output for Illustrator
python -m marm_viz /path/to/recording_folder --format svg
Plot Types
| Flag | Output | Description |
|---|---|---|
qc |
QC panels | 8-panel overview: head XY colored by depth/distance/angle/behavior + histograms |
heatmaps |
Category heatmaps | Per-category spatial occupancy + near-stimulus + overall occupancy + P(move) |
timeseries |
Stim proximity | Fraction near stimulus across time chunks + per-chunk heatmaps + pooled XY |
density |
2D density | Smoothed occupancy density with contours |
behavior |
State usage + t-SNE | 80-state bar chart grouped by category + t-SNE centroid bubble plot |
ethogram |
Ethogram | Per-category binary raster for each animal across time |
transitions |
Transition matrix | 5x5 category transition probabilities (diagonal NaN'd) |
polar |
Head direction | Polar histogram of head angle relative to stimulus (near vs far) |
track |
Head tracks | Per-animal + merged XY trajectory line plots |
correlation |
Cagemate correlation | Pairwise Spearman correlation of 80-state usage vectors across time chunks |
CLI Options
--plot TYPE Which plot to generate (default: all)
--format FMT Output format: jpg (default), svg, png, pdf
--output-dir DIR Output directory (default: <input>/marm_viz_output/)
--video STEM Only process this video stem
--type-to-use STR Only process videos whose filename contains STR (case-insensitive)
--verbose Print detailed diagnostic information
--fps N Frames per second (default: 60)
--chunk-minutes N Chunk size in minutes for time series (default: 5)
--radius-px N Near-stimulus radius in pixels (default: 120)
--augment Enable left/right flip augmentation
Python API
from marm_viz import build_recording_set, plot_ethogram
data = build_recording_set("/path/to/folder")
fig = plot_ethogram(data, fps=60)
fig.savefig("ethogram.svg")
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
marm_viz-0.1.0.tar.gz
(59.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
marm_viz-0.1.0-py3-none-any.whl
(73.4 kB
view details)
File details
Details for the file marm_viz-0.1.0.tar.gz.
File metadata
- Download URL: marm_viz-0.1.0.tar.gz
- Upload date:
- Size: 59.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf68ae850d231901521739330f6f1f9270b2640fdc3405c010cd199724fa52d6
|
|
| MD5 |
07eab955b594db9315fd07e75d20df5d
|
|
| BLAKE2b-256 |
fe0e7663077a4d43a35bac42cc0cea0cadc494d6b56610903634bad930716316
|
File details
Details for the file marm_viz-0.1.0-py3-none-any.whl.
File metadata
- Download URL: marm_viz-0.1.0-py3-none-any.whl
- Upload date:
- Size: 73.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db274a4bfb56d62eda96031cf9eb5df3dad7764ce073e3f19bfc0119608a7111
|
|
| MD5 |
73f530d7e7b9607dac5e42764f821c75
|
|
| BLAKE2b-256 |
b942eb31817541ef2d042ae315b14cf4b59f9a2100f49a0a131d866f70bfa078
|