acquire-python

Acquire: a multi-camera video streaming software focusing on microscopy

https://github.com/acquire-project/acquire-python

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Acquire: a multi-camera video streaming software focusing on microscopy

Basic Info
  • Host: GitHub
  • Owner: acquire-project
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 323 KB
Statistics
  • Stars: 21
  • Watchers: 6
  • Forks: 9
  • Open Issues: 27
  • Releases: 25
Created almost 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Build Test DOI Chat

Acquire

bash python -m pip install acquire-imaging

Acquire (acquire-imaging on PyPI) provides high-speed, multi-camera, video streaming for up to 2 cameras and image acquisition with a programming interface for streaming video data directly to Python, cloud-friendly file formats, and visualization platforms, such as napari.

Note This is an early stage project. If you find it interesting, please reach out!

Acquire supports the following cameras (currently only on Windows):

Acquire also supports the following output file formats:

For testing and demonstration purposes, Acquire provides a few simulated video sources.

Usage

Check out our documentation here.

The provided napari plugin (code here) is a good example of how to stream for visualization.

Development

We welcome contributors. The following will help you get started building the code.

Environment

Requires

It's strongly recommended you create a python environment for development

bash conda create --name acquire python=3.11 conda activate acquire

Build

bash conda activate acquire git submodule update --init --recursive pip install maturin maturin build -i python

Important When updating the 'acquire-video-runtime' (the c api), you need to manually trigger a rebuild by touching wrapper.h.

bash git submodule update # updates acquire-video-runtime touch wrapper.h # will trigger a rebuild python -m build

This package depends on a submodule (acquire-common) and binaries from the following Acquire drivers:

The build script will automatically try to fetch the binaries from GitHub releases. In order to configure which release of each driver to use, you can set the value in drivers.json:

json { "acquire-driver-hdcam": "0.1.0", "acquire-driver-egrabber": "0.1.0", "acquire-driver-zarr": "0.1.0", "acquire-driver-spinnaker": "0.1.0", "acquire-driver-pvcam": "0.1.0" }

These values can be set to a specific version, or to nightly for nightly builds.

Develop

bash pip install -e ".[testing]" pytest -s --tb=short --log-cli-level=0

This project uses pre-commit to run required checks as git hooks.

bash pip install pre-commit pre-commit install

Troubleshooting

Maturin can't find a python interpreter

Maturin is a command line tool associated with pyo3. It helps automate the build and packaging process. It's invoked by setuptools during a build.

  1. Double-check you've activated the right conda environment.
  2. Try maturin build -i python

This seems to happen on windows in anaconda environments when multiple python interpreters are available on the path.

It seems to happen less frequently when invoked via pip - pip install -e . will end up invoking maturin.

Working with an editable install, how do I update the build?

It depends on what you changed:

  • acquire-video-runtime (c/c++ code): touch wrapper.h; maturin develop
  • rust code: maturin develop

Zarr V3 tests are failing

You should make sure that the following environment variables are set:

ZARR_V3_EXPERIMENTAL_API: 1 ZARR_V3_SHARDING: 1

Owner

  • Name: Acquire Project
  • Login: acquire-project
  • Kind: organization
  • Location: United States of America

Focusing on multicamera video streaming for microscopy

Citation (CITATION.cff)

cff-version: 1.2.0
title: Acquire: a multi-camera video streaming software focusing on microscopy
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Nathan
    family-names: Clack
    email: nclack@chanzuckerberg.com
    affiliation: Chan-Zuckerberg Initiative Foundation
    orcid: 'https://orcid.org/0000-0001-6236-9282'
  - given-names: Alan
    family-names: Liddell
    email: aliddell@chanzuckerberg.com
    affiliation: Chan-Zuckerberg Initiative Foundation
  - given-names: Andrew
    family-names: Sweet
    email: andrewdsweet@gmail.com
    affiliation: Chan-Zuckerberg Initiative Foundation
repository-code: 'https://github.com/acquire-project/acquire-python'
repository-artifact: 'https://pypi.org/project/acquire-imaging/'
abstract: >-
  acquire-imaging is a library focusing on multi-camera video
  streaming for microscopy.
license: Apache-2.0

GitHub Events

Total
  • Watch event: 3
  • Push event: 1
  • Pull request event: 2
  • Pull request review event: 2
  • Pull request review comment event: 1
  • Create event: 1
Last Year
  • Watch event: 3
  • Push event: 1
  • Pull request event: 2
  • Pull request review event: 2
  • Pull request review comment event: 1
  • Create event: 1

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • messense/maturin-action v1 composite
.github/workflows/test_pr.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • styfle/cancel-workflow-action 0.11.0 composite
pyproject.toml pypi
  • numpy >=1.22
.github/workflows/nightly-tag.yml actions
  • actions/checkout v3 composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • marvinpinto/action-automatic-releases latest composite
  • messense/maturin-action v1 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • styfle/cancel-workflow-action 0.11.0 composite
Cargo.toml cargo