manoharan-lab / holopy

Hologram processing and light scattering in python
GNU General Public License v3.0
131 stars 50 forks source link

[question] Question for parameters of zstack #395

Closed funs closed 3 years ago

funs commented 3 years ago

Hello,

Please help me to define the parameter of zstack.

The definition in example code: zstack = np.arange(1.08e-3, 1.18e-3, 0.01e-3) # distances from camera to reconstruct

The definition in ps_propagate method: d = distance from pinhole to reconstructed image, in meters (this is z in Jericho and Kreuzer). Can be a scalar or a 1D list or array.

Thank you very much.

briandleahy commented 3 years ago

Hi @funs , can you clarify your question? Are you asking about whether d can be an array or if it can only be a scalar?

If so, ps_propagate accepts d as a scalar or a 1D list or array; however, L can only be scalar.

If you are asking something else, can you please clarify your question?

funs commented 3 years ago

Hi @briandleahy ,

Thank you for your reply.

What I asking about is the meaning of d. Whether distances from camera to reconstruct or distance from pinhole to reconstructed image ?

briandleahy commented 3 years ago

The docstring for ps_propagate says:

d = distance from pinhole to reconstructed image, in meters (this is z in Jericho and Kreuzer). Can be a scalar or a 1D list or array.

So dis the distance from the pinhole to the reconstructed image. The distance from the pinhole to the camera is L, from the docstring:

L = distance from screen to pinhole, in meters

You can see the docstring by typing

from holopy.propagation import ps_propagate
help(ps_propagate)
funs commented 3 years ago

Dear @briandleahy ,

Thank you very much !