Giter VIP home page Giter VIP logo

microscpsf-imagej's People

Contributors

hijizhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

microscpsf-imagej's Issues

Born&Wolf PSF

Hi, it is a useful, and fast ij plugin! It seems that, even this plugin is based on Gibson-Lanni theory, I can use it to generate the Born&Wolf type PSF. But I have some trouble to do so, can you give me some advice about how to do this?
Many thanks!

OPD calculation does not use ng0 or ni0

I discovered that the OPD calculation is inconsistent with the MATLAB version of this library. The problem, I think, is that some of the fields of GibsonLanni.java like ng0 and ni0 are not used in the calculation.

Below is a portion of the code that I ported to another Java library and which produces an output that agrees with the MATLAB and Python versions. You might be able to use this to check or correct this library's output.

Please note that you may need to change some of the variable names because I use a slightly different notation.

// Oil thickness. I use only a single number for z (not an array),
// so you will need to change the line below.
ti = (this.ti0 + z);

double sqNA = this.NA * this.NA;
double rhoNA2;
for (int rhoi = 0; rhoi < this.numSamples; rhoi++) {
    rho = rhoi * deltaRho;
    rhoNA2 = rho * rho * sqNA;
                
    // OPD in the sample
    OPD = this.eZ * Math.sqrt(this.ns * this.ns - rhoNA2);
                
    // OPD in the immersion medium
    OPD += ti * Math.sqrt(this. ni * this.ni - rhoNA2) -
        this.ti0 * Math.sqrt(this.ni0 * this.ni0 - rhoNA2);

    // OPD in the coverslip
    OPD += this.tg * Math.sqrt(this.ng * this.ng - rhoNA2) -
        this.tg0 * Math.sqrt(this.ng0 * this.ng0 - rhoNA2);

    W = k0 * OPD;

    // You will need to change the second index back to that used in your notation
    Ffun[rhoi][0] = Math.cos(W);
    Ffun[rhoi][1] = Math.sin(W);
}

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.