Skip to main content

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 board
  • check_image - Analyze single image for distortion
  • check_batch - Batch process directory of videos
  • CharucoBoardConfig - Configure charuco board parameters
  • DistortionMetrics - 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 optimization
  • minimize_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 styling
  • save_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 YAML
  • convert_batch - Batch convert directory of SLP files
  • extract_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

vibing-0.3.0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vibing-0.3.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file vibing-0.3.0.tar.gz.

File metadata

  • Download URL: vibing-0.3.0.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vibing-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c0971d06f977d281f2f1c31d52de59c35ffba4bd1afa876c695cd9bc90b5f001
MD5 aee00d4a213918c961df02ccec268231
BLAKE2b-256 ad9e8ef2afec45e58174d533fb6019b60edcce1dc4c592c90afb2a4664b946e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibing-0.3.0.tar.gz:

Publisher: publish.yml on LeoMeow123/vibes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vibing-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: vibing-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vibing-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9d8460f74d68eb01232d5872e138a29bca76ab314434acfe0c9b4141f5fa8bb
MD5 5b5d3bffad1b4a079b5504953be57e35
BLAKE2b-256 efa765b78c9ce1e613ee33187d0a3caa282ee638d6d08a838d24a9987f5cc9df

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibing-0.3.0-py3-none-any.whl:

Publisher: publish.yml on LeoMeow123/vibes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page