Code Examples

The code examples make use of OTS — the Optical Trapping Software.

You can leave comments or signal bugs in the comment form below.

Chapter 2 — Ray Optics

Chapter 4 — Optical Beams and Focusing

Chapter 5 — Electromagnetic Theory

Chapter 6 — Computational Methods

Chapter 7 — Brownian Motion

Chapter 9 — Data Acquisition and Optical Tweezers Calibration*

Chapter 10 — Photonic Force Microscope

Chapter 11 — Wavefront Engineering and Holographic Optical Tweezers*

11 thoughts on “Code Examples”

    1. Hi. This sometimes happens because they are large files. I’ve sent you by email some dropbox links to download them.

  1. Hi, I cannot download the Si_trajectory.tif.zip either. I think it is due to file size. Is there a solution?!
    Regards,
    Asa

  2. Could you please give an example of how to model an arbitrary shaped particle for optical tweezing with a focused beam? I only could find examples with predefined 3D shapes that toolbox has, but I am wondering how I should model a different shape.

    1. If you want to do this within the geometrical optics package, you need to implement a new object extending “Particle” and implementing the abstract methods. In fact, the objects “ParticleSpherical”, “ParticleCylindrical” and “ParticleEllipsoidal” are examples of this process.

  3. Hello Prof. Volpe,
    I am very delighted to read the book and solve the constituting tutorial. I would like to ask a question regarding the phase mask that we project on a spatial light modulator.
    I am working with holographic tweezer and wrote a code using GS Algorithm as described in Chapter-11. I found that at every instant of time I run code, the phase mask is different as the initial random phase are different. Interestingly, the desired pattern is obtained.
    Is this obvious or It can be solved.
    Your suggestion would be helpful

    1. Hi,

      Thank you for your feedback and question.

      Yes, you are right that the GS algorithm is stochastic and will produce different phase mask each time it’s run. In fact, multiple phase mass produce the same intensity (e.g., think of a grating and its translations). Therefore, this is not a problem, just a feature of phase masks.

Leave a Reply