GithubHelp home page GithubHelp logo

catrujilla / pydhm Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 4.0 51.51 MB

A Python library to numerically recover the complex wavefield information of samples from Digital Holographic Microscopy (DHM) recordings. Phase compensation, phase-shifting methods, and numerical propagators for different configurations and types of recordings in DHM are provided.

License: MIT License

Python 99.40% MATLAB 0.60%
dhm holography microscopy numerical-methods phase

pydhm's People

Contributors

catrujilla avatar oirl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pydhm's Issues

Trouble recreating numerical propagation results from other DHM tools

Problem

I've been using ImageJ's numerical propagation plugin written in Java, The visual results from running Angular spectrum using the same parameters/measurements differ substantially between pyDHM and ImageJ Numerical Prop. The ImageJ output appears to be qualitatively more accurate.

Input Image:

20230110_15_44_54

ImageJ Numerical Propagation (Angular Spectrum) Results

Input Parameters:

wavelength:  409 [nm]  
distance:  1.1  [mm]  
input width:  3.85 [mm]
input height:  2.76 [mm]  

Visual Output

image

pyDHM Numerical Propagation(Angular Spectrum) Results

Input Parameters

wavelength:  409 [nm]  
distance:  1.1  [mm]  
input width:  3.85 [mm]
input height:  2.76 [mm]  

Note: All mm parameters are divided by 1000 to bring to meters.
Note: wavelength is divided by 10^9 (otherwise no visual results) So 409 --> 409/(10.0^9)

Visual Output

image

Code:

mm_to_m = lambda x: x/(10.0**3)
nm_to_m = lambda x: x/(10.0**9)
params = dict(wavelength = nm_to_m(409), 
                       z = mm_to_m(1.01), 
                      dx = mm_to_m(3.85), 
                      dy = mm_to_m(2.76))

image = utilities.imageRead("test_data/plankton.jpg")   

# filter is not applied (Nor is it applied in other Numerical prop tools)  
output = angularSpectrum(image, **params)    

enhanced_output = utilities.intensity(output, False)     

General Question about filters

If I did not wish to apply a visual filter or restrict the ROI and wanted numerical propagation on the full image, Are there any transforms within the sfr, or sfmr that I'm missing outside of it?

Thresholding and summation metric issue

The criterium must be checked and improved in the thresholding-and-summation metric (the function that allows quantifying the degree of compensation of a phase map).

Need clarification on units for Numerical Propagation

Angular spectrum is described as:

angularSpectrum(field, z, wavelength, dx, dy)

Function to propagate a complex distribution using the angular spectrum approach. field is the input complex wavefield to be propagated. The distance to propagate the input wavefield is represented by z. wavelength is the wavelength of the illumination source used to record the hologram. Finally, dx and dy are the pixel size for the input and output planes along the x- and y- directions.

Is this z, dx and dy distance in meters? millimeters?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.