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 between SLEAP file formats.

  • slp to yml conversion
  • yml to slp conversion
  • Coming soon

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.1.0.tar.gz (11.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.1.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vibing-0.1.0.tar.gz
  • Upload date:
  • Size: 11.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.1.0.tar.gz
Algorithm Hash digest
SHA256 7eaeedc11690a7e63a2dec45b1c58298d58dbe6ba2ab7b26df942ef4b4b1b8e4
MD5 7483763c475cc4f854e4d600b7725ed2
BLAKE2b-256 113aa6c7a007918f1257b13b9a6b585f3a3b9d90b50696834bfce12e5f6e99de

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibing-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: vibing-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.0 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d321fb13dfe91e56c3fca3e62259145f711944af6b5bb81c43a675a8e2daaf4
MD5 8bc810594ed06c44bbc4da2a9555b1be
BLAKE2b-256 4753cf6ddbb8ffd7292c6fb328b95458321960436c12e9785585d61d482085f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibing-0.1.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