Skip to main content

A Python library for implementing Fourier ptychography algorithms to enhance captured images

Project description

fpm-py

Fourier ptychography is a computational image reconstruction technique that allows one high-resolution microscopic image to be acquired by combining multiple lower-resolution images captured at differing optical illumination angles.

More information about Fourier ptychography can be found here.

Instalation

pip install fpm-py

Usage

The library exposes the ImageCapture data class and the reconstruct function for running the algorithm. Data should be provided through the Stack (somewhat analogous to a DataLoader in pytorch). The Stack is a list of ImageCapture objects, following the signature:

class ImageCapture:
    image: np.ndarray # the image to be fed into the algorithm.
    k_vector: np.ndarray # k-space vector of the form [k_x, k_y] associated with this image capture.

To built the high-resolution image, simply run the reconstruct function. The only required parameter is effective_magnification, which is a property of the hardware used. It is the ratio of the image magnification (determined by the lens) and the physical size of each pixel on the imaging sensor, in microns (determined by the sensor).

import fpm_py as fpm

output = fpm.reconstruct(stack, effective_magnification)

Upcoming

  1. More optimizer and iteration_terminators
  2. Complete documentation
  3. Public 10k+ image dataset
  4. Performance metrics, to assess how well the resulting reconstruction worked.
  5. Full testing

For access to experimental features, simply:

import experimental from fpm-py as fpm

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

fpm_py-0.0.5.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

fpm_py-0.0.5-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file fpm_py-0.0.5.tar.gz.

File metadata

  • Download URL: fpm_py-0.0.5.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for fpm_py-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b0308fe6ca2f0577438b3d33cbcc9f6fc434a3b6dd8e4d2b0934afa41cdc123e
MD5 c785bc5da4df3de0fe987fafd98902c8
BLAKE2b-256 2b01842e67f88b57f5df8a4a748c143e28ab2ea9705c48b940a0c871853e0890

See more details on using hashes here.

File details

Details for the file fpm_py-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: fpm_py-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for fpm_py-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6a1e580930e846a68feec101b7636d346bb45e9bbbd1c053a1e5fc450317029c
MD5 a259b9a1b623fc2b3393cd11583fb427
BLAKE2b-256 2a1eab8074dadedf4c5094bf15ca1c85620a251510706f2c819b6c1e4ba341ea

See more details on using hashes here.

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