phase flipped in slm.write() #68
-
In the documentation for the slm.write() function, it's mentioned that the sign of the phase is flipped due to the convention where an "increasing value corresponds to increasing voltage, leading to a decrease in phase delay" commonly found in most Spatial Light Modulators (SLMs). This convention appears counterintuitive to my understanding, especially with SLMs from manufacturers like Hamamatsu, where phase modulation directly correlates with the input signal level. Traditionally, after calculating the phase distribution (e.g., using the Gerchberg–Saxton algorithm), we scale the phase to fit a 0-255 grayscale range by multiplying it by 255/(2π) to generate a bitmap. This bitmap is then used directly in the SLM software without altering the phase sign. This process seems to contradict the approach mentioned in your documentation. Could you please clarify the reasoning behind the phase sign inversion in the slm.write() function? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Shuyun1247 , Thanks much for this question. Admittedly, I'm not sure if Hamamatsu shares this convention with the manufacturers that we tested. The idea is if we are writing some phase, then the SLM should actually deliver that phase to the optical wavefront, with correct sign. However, it seems that many SLMs actually deliver the opposite phase. This doesn't matter as much for most applications (because it corresponds to a mirroring of the pattern which can be compensated by convention), but for some applications such as when the SLM is part of an interferometer we feel that accuracy is important. There are two easy ways to test this: you can use the On the other hand, this is the second time that this has caused confusion, and we had some extensive discussion about whether to implement this in the first place. So we welcome feedback on whether this makes sense to keep in the package. Best, |
Beta Was this translation helpful? Give feedback.
Hi @Shuyun1247 ,
Thanks much for this question. Admittedly, I'm not sure if Hamamatsu shares this convention with the manufacturers that we tested.
The idea is if we are writing some phase, then the SLM should actually deliver that phase to the optical wavefront, with correct sign. However, it seems that many SLMs actually deliver the opposite phase. This doesn't matter as much for most applications (because it corresponds to a mirroring of the pattern which can be compensated by convention), but for some applications such as when the SLM is part of an interferometer we feel that accuracy is important. There are two easy ways to test this: you can use the
blaze
andlens
functions builtin …