Skip to main content

A package to read and write to the brim file format, containing spectral data and metadata from Brillouin microscopy

Reason this release was yanked:

Not compatible with brim v0.1

Project description

brimfile package

Documentation

What is it?

brimfile is a package to read and write to brim (Brillouin imaging) files, containing spectral data and metadata from Brillouin microscopy.

The detailed specs of the brim file format can be found here.

How to install it

We recommend installing brimfile in a virtual environment.

After activating the environment, brimfile can be installed from PyPI using pip:

pip install brimfile

How to use it

The full documentation of the package can be found here.

To quickly start reading an existing .brim file, the following code shows how to:

  • open a .brim file
  • get an image for the Brillouin shift
  • get the spectrum at a specific pixel
  • get the metadata.
from brimfile import File, Data, Metadata
Quantity = Data.AnalysisResults.Quantity
PeakType = Data.AnalysisResults.PeakType

filename = 'path/to/your/file.brim.zarr' 
f = File(filename)

# get the first data group in the file
d = f.get_data()

# get the first analysis results in the data group
ar = d.get_analysis_results()

# get the image for the shift
img, px_size = ar.get_image(Quantity.Shift, PeakType.average)

# get the spectrum at the pixel (pz,py,px)
(pz,py,px) = (0,0,0)
PSD, frequency, PSD_units, frequency_units = d.get_spectrum_in_image((pz,py,px))

# get the metadata 
md = d.get_metadata()
all_metadata = md.all_to_dict()

# close the file
f.close()

Matlab support

You can download the Matlab toolbox, which is basically a wrapper around the Python brimfile package, so you can refer to the same documentation. We only support Matlab >= R2023b, as brimfile needs Python 3.11.

Note that the current version of the Matlab toolbox is not supporting all the functions defined in brimfile and it has not been tested extensively yet.

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

brimfile-1.3.3.tar.gz (84.4 kB view details)

Uploaded Source

Built Distribution

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

brimfile-1.3.3-py2.py3-none-any.whl (43.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file brimfile-1.3.3.tar.gz.

File metadata

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

File hashes

Hashes for brimfile-1.3.3.tar.gz
Algorithm Hash digest
SHA256 aee09c1d0bc553433a9cd86a0c8d87dd415e3ff39daa2b396e722caf16f732c2
MD5 95a7e687c314a833e3a05e0e412da265
BLAKE2b-256 7014338555cf2d75e5fa29aae7159baf4c5d74550071c973a1a6f12c31e4ce68

See more details on using hashes here.

Provenance

The following attestation bundles were made for brimfile-1.3.3.tar.gz:

Publisher: publish_to_pypi.yml on prevedel-lab/brimfile

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

File details

Details for the file brimfile-1.3.3-py2.py3-none-any.whl.

File metadata

  • Download URL: brimfile-1.3.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brimfile-1.3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3b8125bc3ca18e3ccba309552d46c0b440369ad51498f91f65ac89c5c5d312e8
MD5 19b747a4c5e1a24f316417340e2d45a7
BLAKE2b-256 00974c2fed07fa442024c30c26f9f55edc8f3905aa6f4f70b757da01e9ec0d43

See more details on using hashes here.

Provenance

The following attestation bundles were made for brimfile-1.3.3-py2.py3-none-any.whl:

Publisher: publish_to_pypi.yml on prevedel-lab/brimfile

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