| Name | mbo_utilities JSON |
| Version |
2.0.4
JSON |
| download |
| home_page | None |
| Summary | Various utilities for the Miller Brain Observatory |
| upload_time | 2025-10-21 15:52:08 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | <3.12.10,>=3.12.7 |
| license | None |
| keywords |
microscopy
scanimage
multiroi
tiff
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# MBO Utilities
General Python and shell utilities developed for the Miller Brain Observatory (MBO) workflows.
This package is still in a *late-beta* stage of development. As such, you may encounter bugs or unexpected behavior.
Please report any issues on the [GitHub Issues page](This package is still in a *late-beta* stage of development.)
[](https://millerbrainobservatory.github.io/mbo_utilities/)
Most functions have examples in docstrings.
Converting scanimage tiffs into intermediate filetypes for preprocessing or to use with Suite2p is covered [here](https://millerbrainobservatory.github.io/mbo_utilities/assembly.html).
Function examples [here](https://millerbrainobservatory.github.io/mbo_utilities/api/usage.html) are a work in progress.
---
## Installation
This package is fully installable with `pip`.
`conda` can still be used for the virtual environment, but be mindful to only install packages with `conda install` when absolutely necessary.
Make sure your environment is activated, be that conda, venv, or uv.
See our documentation on virtual environments [here](https://millerbrainobservatory.github.io/mbo_utilities/venvs.html).
To get the latest stable version:
```bash
# make a new environment in a location of your choosing
# preferably on your C: drive. e.g. C:\Users\YourName\project
uv venv --python 3.12.9
uv pip install mbo_utilities
```
To get the latest version from github:
```bash
uv venv --python 3.12.9
uv pip install git+https://github.com/MillerBrainObservatory/mbo_utilities.git@master
```
Using `UV` to install from github allows us to specify dependencies that are not yet released to `pypi`.
If *not* using `uv`, simply replace `uv pip` with `pip`, and install the latest pygfx (this is likely to change in the future).
``` bash
# into an environment with python 3.12.7-3.12.9 (tested)
pip install mbo_utilities
pip install git+https://github.com/pygfx/pygfx.git@main
```
To utilize the GPU, you will need CUDA and an appropriate [cupy](https://docs.cupy.dev/en/stable/install.html) installation.
By default, cupy for `CUDA 12.x` is installed.
Check which version of CUDA you have with `nvcc --version`.
```bash
nvcc --version
PS C:\Users\MBO-User\code> nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Wed_Jul_16_20:06:48_Pacific_Daylight_Time_2025
Cuda compilation tools, release 13.0, V13.0.48
Build cuda_13.0.r13.0/compiler.36260728_0
```
For CUDA 11.x and 13.x, you first need to uninstall 12x:
`uv pip uninstall cupy-cuda12x`
And replace `12` with the major CUDA version number, in this case `13`:
`uv pip install cupy-cuda13x`
## Troubleshooting
### Wrong PyTorch or CuPy version
The below error means you have the wrong version of pytorch install for your CUDA version.
``` bash
OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed.
Error loading "path\to\.venv\Lib\site-packages\torch\lib\c10.dll" or one of its dependencies.
```
You can run `uv pip uninstall torch` and `uv pip install torch --torch-backend=auto`.
If not using `uv`, follow instructions here: https://pytorch.org/get-started/locally/.
Having the wrong `cupy` version will lead to the following error message.
``` bash
RuntimeError: CuPy failed to load nvrtc64_120_0.dll: FileNotFoundError: Could not find module 'nvrtc64_120_0.dll' (or one of its dependencies). Try using the full path with constructor syntax.
```
Uninstall cupy and reinstall the correct version for your CUDA version. Find your CUDA version with `nvcc --version` and replace `12` with your major CUDA version number:
```bash
uv pip uninstall cupy-cuda12x
uv pip install cupy-cuda13x
```
---
## Acknowledgements
This pipeline makes use of several open-source libraries:
- [suite2p](https://github.com/MouseLand/suite2p)
- [rastermap](https://github.com/MouseLand/rastermap)
- [Suite3D](https://github.com/alihaydaroglu/suite3d)
- [scanreader](https://github.com/atlab/scanreader)
Raw data
{
"_id": null,
"home_page": null,
"name": "mbo_utilities",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.12.10,>=3.12.7",
"maintainer_email": null,
"keywords": "Microscopy, ScanImage, multiROI, Tiff",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/d9/e2/8bff701096ddc4e49487dc5e9364d48d2cb7ff42321a58a7b475525210e9/mbo_utilities-2.0.4.tar.gz",
"platform": null,
"description": "# MBO Utilities\r\n\r\nGeneral Python and shell utilities developed for the Miller Brain Observatory (MBO) workflows.\r\n\r\nThis package is still in a *late-beta* stage of development. As such, you may encounter bugs or unexpected behavior.\r\n\r\nPlease report any issues on the [GitHub Issues page](This package is still in a *late-beta* stage of development.)\r\n\r\n[](https://millerbrainobservatory.github.io/mbo_utilities/)\r\n\r\nMost functions have examples in docstrings.\r\n\r\nConverting scanimage tiffs into intermediate filetypes for preprocessing or to use with Suite2p is covered [here](https://millerbrainobservatory.github.io/mbo_utilities/assembly.html).\r\n\r\nFunction examples [here](https://millerbrainobservatory.github.io/mbo_utilities/api/usage.html) are a work in progress.\r\n\r\n---\r\n\r\n## Installation\r\n\r\nThis package is fully installable with `pip`.\r\n\r\n`conda` can still be used for the virtual environment, but be mindful to only install packages with `conda install` when absolutely necessary.\r\n\r\nMake sure your environment is activated, be that conda, venv, or uv.\r\n\r\nSee our documentation on virtual environments [here](https://millerbrainobservatory.github.io/mbo_utilities/venvs.html).\r\n\r\nTo get the latest stable version:\r\n\r\n```bash\r\n# make a new environment in a location of your choosing\r\n# preferably on your C: drive. e.g. C:\\Users\\YourName\\project\r\n\r\nuv venv --python 3.12.9 \r\nuv pip install mbo_utilities\r\n```\r\n\r\nTo get the latest version from github:\r\n\r\n```bash\r\nuv venv --python 3.12.9 \r\nuv pip install git+https://github.com/MillerBrainObservatory/mbo_utilities.git@master\r\n```\r\n\r\nUsing `UV` to install from github allows us to specify dependencies that are not yet released to `pypi`.\r\nIf *not* using `uv`, simply replace `uv pip` with `pip`, and install the latest pygfx (this is likely to change in the future).\r\n\r\n``` bash\r\n# into an environment with python 3.12.7-3.12.9 (tested)\r\npip install mbo_utilities\r\npip install git+https://github.com/pygfx/pygfx.git@main\r\n```\r\n\r\nTo utilize the GPU, you will need CUDA and an appropriate [cupy](https://docs.cupy.dev/en/stable/install.html) installation.\r\n\r\nBy default, cupy for `CUDA 12.x` is installed.\r\n\r\nCheck which version of CUDA you have with `nvcc --version`.\r\n\r\n```bash\r\nnvcc --version\r\nPS C:\\Users\\MBO-User\\code> nvcc --version\r\nnvcc: NVIDIA (R) Cuda compiler driver\r\nCopyright (c) 2005-2025 NVIDIA Corporation\r\nBuilt on Wed_Jul_16_20:06:48_Pacific_Daylight_Time_2025\r\nCuda compilation tools, release 13.0, V13.0.48\r\nBuild cuda_13.0.r13.0/compiler.36260728_0\r\n```\r\n\r\nFor CUDA 11.x and 13.x, you first need to uninstall 12x:\r\n\r\n`uv pip uninstall cupy-cuda12x`\r\n\r\nAnd replace `12` with the major CUDA version number, in this case `13`:\r\n\r\n`uv pip install cupy-cuda13x`\r\n\r\n## Troubleshooting\r\n\r\n### Wrong PyTorch or CuPy version\r\n\r\nThe below error means you have the wrong version of pytorch install for your CUDA version.\r\n\r\n``` bash\r\nOSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed.\r\nError loading \"path\\to\\.venv\\Lib\\site-packages\\torch\\lib\\c10.dll\" or one of its dependencies.\r\n```\r\n\r\nYou can run `uv pip uninstall torch` and `uv pip install torch --torch-backend=auto`.\r\n\r\nIf not using `uv`, follow instructions here: https://pytorch.org/get-started/locally/.\r\n\r\nHaving the wrong `cupy` version will lead to the following error message.\r\n\r\n``` bash\r\nRuntimeError: CuPy failed to load nvrtc64_120_0.dll: FileNotFoundError: Could not find module 'nvrtc64_120_0.dll' (or one of its dependencies). Try using the full path with constructor syntax.\r\n```\r\n\r\nUninstall cupy and reinstall the correct version for your CUDA version. Find your CUDA version with `nvcc --version` and replace `12` with your major CUDA version number:\r\n\r\n```bash\r\nuv pip uninstall cupy-cuda12x\r\nuv pip install cupy-cuda13x\r\n```\r\n\r\n---\r\n\r\n## Acknowledgements\r\n\r\nThis pipeline makes use of several open-source libraries:\r\n\r\n- [suite2p](https://github.com/MouseLand/suite2p)\r\n- [rastermap](https://github.com/MouseLand/rastermap)\r\n- [Suite3D](https://github.com/alihaydaroglu/suite3d)\r\n- [scanreader](https://github.com/atlab/scanreader)\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Various utilities for the Miller Brain Observatory",
"version": "2.0.4",
"project_urls": {
"Documentation": "https://millerbrainobservatory.github.io/mbo_utilities/index.html",
"Homepage": "https://github.com/millerbrainobservatory/mbo_utilities",
"Issues": "https://github.com/MillerBrainObservatory/mbo_utilities/issues",
"Repository": "https://github.com/millerbrainobservatory/mbo_utilities"
},
"split_keywords": [
"microscopy",
" scanimage",
" multiroi",
" tiff"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "47abac8b3246427b704622f0b387449fcd54dc2ff1018901be8d24fccf513994",
"md5": "1312b119ba008edc100b7abdd10cbbe4",
"sha256": "2525de472b8018352f72ee08782f5825628c40f5048356f174df542913997cf6"
},
"downloads": -1,
"filename": "mbo_utilities-2.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1312b119ba008edc100b7abdd10cbbe4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.12.10,>=3.12.7",
"size": 120979,
"upload_time": "2025-10-21T15:52:07",
"upload_time_iso_8601": "2025-10-21T15:52:07.434625Z",
"url": "https://files.pythonhosted.org/packages/47/ab/ac8b3246427b704622f0b387449fcd54dc2ff1018901be8d24fccf513994/mbo_utilities-2.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d9e28bff701096ddc4e49487dc5e9364d48d2cb7ff42321a58a7b475525210e9",
"md5": "40d29cc4e2f119490b2a5b3e042ae437",
"sha256": "e2dd049b57569bd5d6331992273ccc21111a61bd4258d2983f6090b0b451f208"
},
"downloads": -1,
"filename": "mbo_utilities-2.0.4.tar.gz",
"has_sig": false,
"md5_digest": "40d29cc4e2f119490b2a5b3e042ae437",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.12.10,>=3.12.7",
"size": 110921,
"upload_time": "2025-10-21T15:52:08",
"upload_time_iso_8601": "2025-10-21T15:52:08.419915Z",
"url": "https://files.pythonhosted.org/packages/d9/e2/8bff701096ddc4e49487dc5e9364d48d2cb7ff42321a58a7b475525210e9/mbo_utilities-2.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-21 15:52:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "millerbrainobservatory",
"github_project": "mbo_utilities",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mbo_utilities"
}