How can I manipulate the transmittance of mirrors in pst-optexp?

I would like to propagate the beam to the detectors near each mirror. I also would like the propagation to work as normally would (from mirror 1 to mirror 2 to the apertures).

\documentclass[pstricks,margin=12pt]{standalone}
\usepackage{pst-optexp}

\begin{document}
\begin{pspicture}[showgrid=true](13,14)
\pnodes(2,5){a}(5,5){b}(5,12){c}(8,12){d}(12,12){e}
\pnodes(7,5){duno}(3,12){ddos}
\psset{mirrortype=extended, mirrordepth=0.2}
\psset{mirrorwidth=1.1}
\begin{optexp}
\optsource[innerlabel, compname = start](a)(b){Beam}
\mirror[compname = mi, labelangle=45](a)(b)(c){$M_1$}
%\optdetector[](b)(duno)

\mirror[compname = mii, labelangle=45](b)(c)(d){$M_2$}
\optdetector[](c)(ddos)
\drawwidebeam[beamwidth=0.4, stopinside]{1-3}
\pinhole[beam](c)(d){$Ap_{2}$}
\pinhole[beam](d)(e){$Ap_{2}$}
\end{optexp}
\end{pspicture}

\end{document}

• Welcome to TeX SX! What do you mean to do exactly? This is not clear to me. – Bernard Feb 22 '18 at 23:14
• I posted the picture above. I want to have a normal beam propagation, but also send a part of the beam to the doctors next to the mirrors. – Enrique Segura Feb 22 '18 at 23:18
• If I understand well, you want to see the reflected beam from mirror M1 to mirror M2? – Bernard Feb 22 '18 at 23:40
• Yes, for my specific setup, the reflectivity of the mirrors are such that part of the beam can be observed and captured with a ccd camera. – Enrique Segura Feb 22 '18 at 23:47
• You can use mirrortype=semitrans. I can give you an example only later. – Christoph Feb 23 '18 at 6:44

pst-optexp has semitransparent mirrors (mirrortype=semitrans), which work like beamsplitters: when drawing the beams, it is automatically determined, if the transmittive or reflective path is taken, depending on the position of the next component.

You have several options to draw the partial beam. I decided to draw the main beam path first, and then the transmittive parts, skipping the previous parts with beampathskip to avoid drawing them multiple times.

\documentclass[pstricks,margin=12pt]{standalone}
\usepackage{pst-optexp}

\begin{document}
\begin{pspicture}(0,4)(12,12.5)
\pnodes(2,5){a}(5,5){b}(5,10){c}(8,10){d}(12,10){e}
\pnode([Xnodesep=2]b){duno}
\pnode([offset=2]c){ddos}
\psset{mirrordepth=0.2, mirrorwidth=1.1}
\begin{optexp}
\optsource[innerlabel, compname = start, beamwidth=0.4](a)(b){Beam}
\mirror[compname = mi, mirrortype=semitrans, n=1, labelangle=-45](a)(b)(c){$M_1$}
\optdetector[compname = duno](b)(duno)

\mirror[compname = mii, n=1, mirrortype=semitrans, labelangle=45](b)(c)(d){$M_2$}
\optdetector[compname = ddos](c)(ddos)
\pinhole[compname = phi](c)(d){$Ap_{2}$}
\pinhole[compname = phii](d)(e){$Ap_{2}$}

\drawwidebeam[useNA=false]{start}{mi}{mii}{phi}{phii}(e)
%
% draw the weak transmissions to the detectors
\newpsstyle{Beam}{linestyle=none, fillstyle=solid, fillcolor=green!20!white}
\drawwidebeam[beampathskip=1]{start}{mi}{duno}
\drawwidebeam[beampathskip=2]{start}{mi}{mii}{ddos}
\end{optexp}
\end{pspicture}

\end{document}


• Thank you very much. I am wondering: can I have the mirror be semitransparent and also with a piezo motor to move it? – Enrique Segura Feb 23 '18 at 17:18
• Not out of the box. I guess it would also look strange when the piezo overlaps with the transmitted beam. But you could use one of the numerous nodes that are created with a component to position something ( see 8.10 in the docs). Or define your own component – Christoph Feb 23 '18 at 17:37