A collection of small but useful tools for scientific publications and projects
Project description
vibing
A collection of small but useful tools for scientific publications and projects.
Installation
From PyPI (recommended)
# Using uv
uv pip install vibing
# Using pip
pip install vibing
# With optional dependencies
uv pip install "vibing[calibration]" # Camera calibration tools (opencv)
uv pip install "vibing[sleap]" # SLEAP conversion tools
uv pip install "vibing[all]" # Everything
Run CLI without installing (uvx)
# Run distortion checker directly
uvx --from "vibing[calibration]" vibing-distortion-check video.mp4
# Or install as a tool
uv tool install "vibing[calibration]"
vibing-distortion-check video.mp4
From GitHub
# Install from git
uv pip install "git+https://github.com/LeoMeow123/vibes.git[calibration]"
# Run without installing
uv tool run --from "git+https://github.com/LeoMeow123/vibes.git[calibration]" vibing-distortion-check video.mp4
From source
git clone https://github.com/LeoMeow123/vibes.git
cd vibes
uv pip install -e ".[all]"
Tools
Calibration (vibing.calibration)
Camera calibration and distortion analysis tools.
check_video- Analyze video for lens distortion using charuco boardcheck_image- Analyze single image for distortioncheck_batch- Batch process directory of videosCharucoBoardConfig- Configure charuco board parametersDistortionMetrics- Distortion analysis results
CLI: vibing-distortion-check
# Check single video
vibing-distortion-check video.mp4
# Batch process directory
vibing-distortion-check /path/to/videos --batch --output-csv results.csv
# Custom board configuration
vibing-distortion-check video.mp4 --squares-x 10 --squares-y 7
Optimization (vibing.optimization)
Gradient-based and gradient-free optimization wrappers.
minimize_lbfgsb- L-BFGS-B optimizationminimize_gradient_free- Gradient-free methods (Nelder-Mead, Powell, COBYLA)
Plotting (vibing.plotting)
Utilities for creating publication-quality figures.
setup_figure- Set up figures with consistent stylingsave_figure- Save figures in multiple formats
Powerwell (vibing.powerwell)
Powerwell analysis tools.
- Coming soon
Undistortion (vibing.undistortion)
Video undistortion and perspective correction pipelines using OpenCV.
- spacecage-undistort - Fisheye lens distortion correction for NASA SpaceCage experiments with ROI-based calibration and SLEAP coordinate transformation
- tmaze-undistort - T-maze video processing with lens distortion removal and perspective transformation to top-down views using labeled ROIs and known physical dimensions
SLEAP Convert (vibing.sleap_convert)
Convert SLEAP predictions to ROI polygon YAML format.
slp_to_roi_yaml- Convert single SLP file to ROI YAMLconvert_batch- Batch convert directory of SLP filesextract_keypoints- Extract keypoints from SLP (low-level)ROITemplate- Define custom polygon templates for any arena
CLI: vibing-slp-to-yaml
# Convert single file
vibing-slp-to-yaml predictions.slp -o output.yml
# Batch convert directory
vibing-slp-to-yaml /path/to/slps --batch -o /path/to/yamls
# List available templates
vibing-slp-to-yaml --list-templates
Built-in templates: tmaze_horizontal (7-region T-maze with corner sharing)
Quick Start
import numpy as np
from vibing.optimization import minimize_lbfgsb
from vibing.plotting import setup_figure, save_figure
# Optimization example
def objective(x):
return (x[0] - 1) ** 2 + (x[1] - 2) ** 2
result = minimize_lbfgsb(objective, np.array([0.0, 0.0]))
print(f"Optimal x: {result['x']}")
# Plotting example
fig, ax = setup_figure(width=6, height=4)
ax.plot([1, 2, 3], [1, 4, 9])
save_figure(fig, "my_plot", formats=["png", "pdf"])
Development
# Clone and install in dev mode
git clone https://github.com/LeoMeow123/vibes.git
cd vibes
uv pip install -e ".[dev]"
# Run tests
pytest
# Run linter
ruff check src/
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file vibing-0.2.0.tar.gz.
File metadata
- Download URL: vibing-0.2.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e4d76b98f570ca70e99f394957e1e9953e13125a8afde86c8689a7426689e81
|
|
| MD5 |
a2e62913518f90fa9bb33435eff0701a
|
|
| BLAKE2b-256 |
5978495df8f710c12ff2749389f6eabf01ceddac48f565084e4a388d0e6f1a5c
|
Provenance
The following attestation bundles were made for vibing-0.2.0.tar.gz:
Publisher:
publish.yml on LeoMeow123/vibes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibing-0.2.0.tar.gz -
Subject digest:
6e4d76b98f570ca70e99f394957e1e9953e13125a8afde86c8689a7426689e81 - Sigstore transparency entry: 805618992
- Sigstore integration time:
-
Permalink:
LeoMeow123/vibes@e60bfd6eb5f0b3ccf5547ceaa662c534119abd4b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/LeoMeow123
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e60bfd6eb5f0b3ccf5547ceaa662c534119abd4b -
Trigger Event:
push
-
Statement type:
File details
Details for the file vibing-0.2.0-py3-none-any.whl.
File metadata
- Download URL: vibing-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fffc8b492f59afdcdf4ebc01536ed06d89c6075b22148799545faa552361295
|
|
| MD5 |
7d5e539aa0d82ada2bb73b036515a288
|
|
| BLAKE2b-256 |
b970a6259b1576b5af4b5da214f32ce935345737aa02ded3b344fc6966d7c0b3
|
Provenance
The following attestation bundles were made for vibing-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on LeoMeow123/vibes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibing-0.2.0-py3-none-any.whl -
Subject digest:
1fffc8b492f59afdcdf4ebc01536ed06d89c6075b22148799545faa552361295 - Sigstore transparency entry: 805619047
- Sigstore integration time:
-
Permalink:
LeoMeow123/vibes@e60bfd6eb5f0b3ccf5547ceaa662c534119abd4b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/LeoMeow123
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e60bfd6eb5f0b3ccf5547ceaa662c534119abd4b -
Trigger Event:
push
-
Statement type: