pst-optexp 中具有多个输入的 WDMCoupler

pst-optexp 中具有多个输入的 WDMCoupler

在 pst-optexp 中,可以使用一个名为的组件,该组件\wdmcoupler有两个输入和一个输出。对于我的项目,我需要一个类似的耦合器,但带有n>2输入。我在手册中找不到这样的构造,但是有没有办法从头开始创建这样的耦合器(或者我可以修改现有的耦合器)?

最初我尝试创建两个 WDM 耦合器并将它们放在同一位置:

\documentclass[margin=5pt]{standalone}
\usepackage[dvipsnames,svgnames,pdf]{pstricks}
\usepackage{auto-pst-pdf}
\usepackage{pst-optexp}
\usepackage{stackengine}
\begin{document}
    \begin{pspicture}(10,6)
        \psset[optexp]{fiber=none, usefiberstyle}
        \newpsstyle{Fiber}{linecolor=orange, linewidth=2\pslinewidth}
        \pnodes(1, 1) {PumpDiodeIn} (2, 1){PumpDiodeOut}
        \pnodes(1, 5) {UpperPumpDiodeIn} (2, 5){UpperPumpDiodeOut}
        \pnodes(2, 3) {SignalIsolatorIn} (3, 3) {SignalIsolatorOut}
        \pnodes(1, 3) {SignalIn} (10, 3) {SignalCombinerOut}
        \pnodes(7, 3) {FiberIn} (9, 3) {FiberOut}
        \pnode(9, 3){AmpOut}
        \optdiode[compname=PumpDiode](PumpDiodeIn)(PumpDiodeOut){Pump diode}
        \optdiode[compname=UpperPumpDiode](UpperPumpDiodeIn)(UpperPumpDiodeOut){Pump diode}
        \optisolator[compname=SignalIsolator](SignalIsolatorIn)(SignalIsolatorOut){\begin{tabular}{@{}c@{}}Signal\\Isolator\end{tabular}}
        \wdmcoupler[compname=SignalPumpCombiner, coupleralign=top](SignalIsolatorOut)(PumpDiodeOut)(FiberIn){\begin{tabular}{@{}c@{}}Signal/Pump\\light combiner\end{tabular}}
        \wdmcoupler[compname=SignalPumpCombinerII, coupleralign=top](SignalIsolatorOut)(UpperPumpDiodeOut)(FiberIn){}
        \optfiber[compname=ActiveFiber, position=start,linecolor=red](FiberIn)(FiberOut){\begin{tabular}{@{}c@{}}Active\\fiber\end{tabular}}
        \nput{75}{AmpOut}{\begin{tabular}{@{}c@{}}Amplifier\\Output\end{tabular}}
        \nput{90}{SignalIn}{\begin{tabular}{@{}c@{}}Signal\\Input\end{tabular}}         
        \drawfiber{SignalIsolator}{SignalPumpCombiner}
        \drawfiber{PumpDiode}{SignalPumpCombiner}
        \drawfiber{UpperPumpDiode}{SignalPumpCombinerII}
        \drawfiber{SignalPumpCombiner}{ActiveFiber}
        \drawfiber[ArrowInside=->](SignalIn){SignalIsolator}
        \drawfiber[arrows=->]{ActiveFiber}(AmpOut)  
    \end{pspicture}
\end{document}

结果是在此处输入图片描述 尽管如此,我们仍然希望有一个更简单的解决方案。

答案1

我刚刚发布pst-optexp 6.0 版

现在 awdmcoupler可以有任意数量的输入节点:

\documentclass[margin=5pt]{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}(4,2)
  \begin{optexp}
    \newpsstyle{Fiber}{linecolor=orange}
    \pnodes(0,2){A}(0,1.2){B}(0,0.8){C}(0,0){D}(4,1){E}
    \wdmcoupler(A)(B)(C)(D)(E){coupler}
  \end{optexp}
\end{pspicture}
\end{document}

在此处输入图片描述

同样,awdmsplitter可以有任意数量的输出节点。

因此,您的示例将变为以下内容:

\documentclass[margin=5pt]{standalone}
\usepackage{pst-optexp}
\begin{document}
\begin{pspicture}(10,6)
  \begin{optexp}
    \psset[optexp]{usefiberstyle, couplersize=0.25, couplersep=0.07}
    \newpsstyle{Fiber}{linecolor=orange, linewidth=2\pslinewidth}
    \pnodes(2,1){PumpDiode}(2,5){UpperPumpDiode}(1,3){SignalIsolatorIn}(4, 3){SignalIsolatorOut}(1,3){SignalIn}(10,3){SignalCombinerOut}
    \pnodes(7,3){FiberIn}(9,3){FiberOut}(9,3){AmpOut}
    \optdiode[compname=PumpDiode, position=start](PumpDiode)([Xnodesep=1]PumpDiode){Pump diode}
    \optdiode[compname=UpperPumpDiode, position=start](UpperPumpDiode)([Xnodesep=1]UpperPumpDiode){Pump diode}
    \optisolator[compname=SignalIsolator, fiber=none](SignalIsolatorIn)(SignalIsolatorOut)%
        {\begin{tabular}{@{}c@{}}Signal\\Isolator\end{tabular}}
    \wdmcoupler[compname=SignalPumpCombiner](UpperPumpDiode)(\oenodeOut{SignalIsolator})(PumpDiode)(FiberIn)%
        {\begin{tabular}{@{}c@{}}Signal/Pump\\light combiner\end{tabular}}
    \optfiber[
        compname=ActiveFiber,
        position=start,
        addtoFiberOut={arrows=->}](FiberIn)(FiberOut)%
        {\begin{tabular}{@{}c@{}}Active\\fiber\end{tabular}}
    \drawfiber[ArrowInside=->](SignalIn){SignalIsolator}
  \end{optexp}
  \nput{75}{AmpOut}{\begin{tabular}{@{}c@{}}Amplifier\\Output\end{tabular}}
  \nput{-90}{SignalIn}{\begin{tabular}{@{}c@{}}Signal\\Input\end{tabular}}         
\end{pspicture}
\end{document}

在此处输入图片描述

我还将其作为展示案例添加到 pst-optexp 文档中的示例。

相关内容