Ticket #5996: 12429.patch

File 12429.patch, 8.3 KB (added by jrasch, 9 months ago)
  • sage/functions/wigner.py

    # HG changeset patch
    # User Jens Rasch <jyr2000@gmail.com>
    # Date 1245512650 -3600
    # Node ID 8ae379ab614c7120d7745d16440f24f98c82d1e0
    # Parent  a3427ba1dfd0b77e1b600cc0ab8180b1408d46e4
    Removed all Latex formulas and replaced them with text formulas to
    comply with the ReST documentation system.
    
    diff -r a3427ba1dfd0 -r 8ae379ab614c sage/functions/wigner.py
    a b  
    7575 
    7676def Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3,prec=None): 
    7777    r""" 
    78     Calculate the Wigner 3j symbol 
    79  
    80     \left({j_1 \atop m_1} {j_2 \atop m_2} {j_3 \atop m_3} \right) 
     78    Calculate the Wigner 3j symbol Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3) 
    8179 
    8280 
    8381    NOTES: 
     
    8684 
    8785    - invariant under any permutation of the columns (with the 
    8886      exception of a sign change where $J:=j_1+j_2+j_3$): 
    89       \begin{eqnarray} 
    90       \left({j_1 \atop m_1} {j_2 \atop m_2} {j_3 \atop m_3}\right) 
    91       &=& 
    92       \left({j_3 \atop m_3} {j_1 \atop m_1} {j_2 \atop m_2}\right) 
    93       =\left({j_2 \atop m_2} {j_3 \atop m_3} {j_1 \atop m_1}\right) 
    94       \qquad \mbox{cyclic}  
    95       &=& 
    96        (-)^{J}\left({j_3\atop m_3} {j_2\atop m_2} {j_1\atop m_1}\right) 
    97       =(-)^{J}\left({j_1\atop m_1} {j_3\atop m_3} {j_2\atop m_2}\right) 
    98       =(-)^{J}\left({j_2\atop m_2} {j_1\atop m_1} {j_3\atop m_3}\right) 
    99       \qquad\mbox{anti-cyclic} 
    100       \end{eqnarray} 
     87      Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3) 
     88          =Wigner3j(j_3,j_1,j_2,m_3,m_1,m_2) 
     89          =Wigner3j(j_2,j_3,j_1,m_2,m_3,m_1) 
     90          =(-)^J Wigner3j(j_3,j_2,j_1,m_3,m_2,m_1) 
     91          =(-)^J Wigner3j(j_1,j_3,j_2,m_1,m_3,m_2) 
     92          =(-)^J Wigner3j(j_2,j_1,j_3,m_2,m_1,m_3) 
    10193   
    10294    - invariant under space inflection, i. e. 
    103       \begin{eqnarray} 
    104       \left({{j_1}\atop{m_1}} {{j_2}\atop{m_2}} {{j_3}\atop{m_3}}\right) 
    105       = 
    106       (-)^{J} 
    107       \left({j_1 \atop -m_1} {j_2 \atop -m_2}{j_3 \atop -m_3}\right) 
    108       \end{eqnarray} 
     95      Wigner3j(j_1,j_2,j_3,m_1,m_2,m_3) 
     96         =(-)^J Wigner3j(j_1,j_2,j_3,-m_1,-m_2,-m_3) 
    10997   
    11098    - symmetric with respect to the 72 additional symmetries based on 
    11199      the work by [Regge58] 
    112100 
    113101    - zero for $j_1$, $j_2$, $j_3$ not fulfilling triangle relation 
    114102     
    115     - zero for ${m_1}+{m_2}+{m_3}!= 0$ 
     103    - zero for $m_1+m_2+m_3!= 0$ 
    116104 
    117105    - zero for violating any one of the conditions 
    118106      $j_1\ge|m_1|$,  $j_2\ge|m_2|$,  $j_3\ge|m_3|$ 
     
    258246    r""" 
    259247    Calculates the Clebsch-Gordan coefficient 
    260248 
    261     $\left< j_1 m_1 \; j_2 m_2 | j_3 m_3 \right>$ 
     249    $< j_1 m_1 \; j_2 m_2 | j_3 m_3 >$ 
    262250 
    263251 
    264252    NOTES: 
    265253 
    266254    The Clebsch-Gordan coefficient will be evaluated via its relation 
    267255    to Wigner 3j symbols: 
    268  
    269     \begin{eqnarray} 
    270     \left< j_1 m_1 \; j_2 m_2 | j_3 m_3 \right>= 
    271     (-1)^(j_1-j_2+m_3) \sqrt(2j_3+1) 
    272     \left({j_1 \atop m_1} {j_2 \atop m_2} {j_3 \atop -m_3}\right) 
    273     \end{eqnarray} 
     256    < j_1 m_1 \; j_2 m_2 | j_3 m_3 > 
     257        =(-1)^(j_1-j_2+m_3) \sqrt(2j_3+1) Wigner3j(j_1,j_2,j_3,m_1,m_2,-m_3) 
    274258 
    275259    See also the documentation on Wigner 3j symbols which exhibit much 
    276260    higher symmetry relations that the Clebsch-Gordan coefficient. 
     
    402386    NOTES: 
    403387 
    404388    The Racah symbol is related to the Wigner 6j symbol: 
    405     \begin{eqnarray} 
    406     \left({j_1 \atop j_4} {j_2 \atop j_5} {j_3 \atop j_6} \right) 
    407     = 
    408     (-1)^{j_1+j_2+j_4+j_5} W(j_1,j_2,j_5,j_4,j_3,j_6) 
    409     \end{eqnarray} 
     389    Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) 
     390        =(-1)^(j_1+j_2+j_4+j_5) W(j_1,j_2,j_5,j_4,j_3,j_6) 
    410391 
    411392    Please see the 6j symbol for its much richer symmetries and for 
    412393    additional properties. 
     
    491472 
    492473def Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6,prec=None): 
    493474    r""" 
    494     Calculate the Wigner 6j symbol 
    495  
    496     \left({j_1 \atop j_4} {j_2 \atop j_5} {j_3 \atop j_6} \right) 
     475    Calculate the Wigner 6j symbol Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) 
    497476 
    498477 
    499478    NOTES: 
    500479 
    501480    The Wigner 6j symbol is related to the Racah symbol but exhibits 
    502481    more symmetries as detailed below. 
    503     \begin{eqnarray} 
    504     \left({j_1 \atop j_4} {j_2 \atop j_5} {j_3 \atop j_6} \right) 
    505     = 
    506     (-1)^{j_1+j_2+j_4+j_5} W(j_1,j_2,j_5,j_4,j_3,j_6) 
    507     \end{eqnarray} 
     482    Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) 
     483        =(-1)^(j_1+j_2+j_4+j_5) W(j_1,j_2,j_5,j_4,j_3,j_6) 
    508484 
    509485    The Wigner 6j symbol obeys the following symmetry rules: 
    510486 
    511487    - Wigner $6j$ symbols are left invariant under any permutation of 
    512488      the columns: 
    513       \begin{eqnarray} 
    514       \left({j_1 \atop j_4} {j_2 \atop j_5} {j_3 \atop j_6} \right) 
    515       &=& 
    516        \left({j_3 \atop j_6} {j_1 \atop j_4} {j_2 \atop j_5} \right) 
    517       =\left({j_2 \atop j_5} {j_3 \atop j_6} {j_2 \atop j_4} \right) 
    518       \qquad \mbox{cyclic} \\ 
    519       &=& 
    520        \left({j_3 \atop j_6} {j_2 \atop j_5} {j_1 \atop j_4} \right) 
    521       =\left({j_1 \atop j_4} {j_3 \atop j_6} {j_2 \atop j_5} \right) 
    522       =\left({j_2 \atop j_5} {j_1 \atop j_4} {j_3 \atop j_6} \right) 
    523       \qquad \mbox{anti-cyclic}  
    524       \end{eqnarray} 
     489      Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) 
     490          =Wigner6j(j_3,j_1,j_2,j_6,j_4,j_5) 
     491          =Wigner6j(j_2,j_3,j_1,j_5,j_6,j_4) 
     492          =Wigner6j(j_3,j_2,j_1,j_6,j_5,j_4) 
     493          =Wigner6j(j_1,j_3,j_2,j_4,j_6,j_5) 
     494          =Wigner6j(j_2,j_1,j_3,j_5,j_4,j_6) 
    525495 
    526496    - They are invariant under the exchange of the upper and lower 
    527497      arguments in each of any two columns, i. e. 
    528       \begin{eqnarray} 
    529       \left({j_1 \atop j_4} {j_2 \atop j_5} {j_3 \atop j_6} \right) 
    530       = 
    531       \left({j_1 \atop j_4} {j_5 \atop j_2} {j_6 \atop j_3} \right) 
    532       = 
    533       \left({j_4 \atop j_1} {j_2 \atop j_5} {j_6 \atop j_3} \right) 
    534       = 
    535       \left({j_4 \atop j_1} {j_5 \atop j_2} {j_3 \atop j_6} \right) 
    536       \end{eqnarray} 
     498      Wigner6j(j_1,j_2,j_3,j_4,j_5,j_6) 
     499          =Wigner6j(j_1,j_5,j_6,j_4,j_2,j_3) 
     500          =Wigner6j(j_4,j_2,j_6,j_1,j_5,j_3) 
     501          =Wigner6j(j_4,j_5,j_3,j_1,j_2,j_6) 
    537502     
    538503    - additional 6 symmetries [Regge59] giving rise to 144 symmetries 
    539504      in total 
     
    631596def Wigner9j(j_1,j_2,j_3,j_4,j_5,j_6,j_7,j_8,j_9,prec=None): 
    632597    r""" 
    633598    Calculate the Wigner 9j symbol 
    634  
    635     \left\{ 
    636       \begin{matrix} 
    637         {j_1} & {j_2} & {j_3} \\ 
    638         {j_4} & {j_5} & {j_6} \\ 
    639         {j_7} & {j_8} & {j_9}  
    640       \end{matrix}  
    641     \right\} 
     599    Wigner9j(j_1,j_2,j_3,j_4,j_5,j_6,j_7,j_8,j_9) 
    642600 
    643601 
    644602    ALGORITHM: 
     
    756714    Calculate the Gaunt coefficient which is defined as the integral 
    757715    over three spherical harmonics: 
    758716 
    759     \begin{eqnarray} 
    760     Y{j_1 \atop m_1} {j_2 \atop m_2} {j_3 \atop m_3}  
    761     &=&  
    762     \int Y_{l_1,m_1}(\Omega) 
    763     Y_{l_2,m_2}(\Omega) Y_{l_3,m_3}(\Omega)\; d\Omega \\   
    764     &=& 
    765     \sqrt{\frac{(2l_1+1)(2l_2+1)(2l_3+1)}{4\pi}} 
    766     \left({l_1 \atop 0  } {l_2 \atop 0  } {l_3 \atop   0} \right) 
    767     \left({l_1 \atop m_1} {l_2 \atop m_2} {l_3 \atop m_3} \right) 
    768     \end{eqnarray} 
     717    Y(j_1,j_2,j_3,m_1,m_2,m_3) 
     718        =\int Y_{l_1,m_1}(\Omega) 
     719         Y_{l_2,m_2}(\Omega) Y_{l_3,m_3}(\Omega) d\Omega  
     720        =\sqrt((2l_1+1)(2l_2+1)(2l_3+1)/(4\pi)) 
     721         Y(j_1,j_2,j_3,0,0,0) Y(j_1,j_2,j_3,m_1,m_2,m_3) 
    769722 
    770723 
    771724    NOTES: 
     
    773726    The Gaunt coefficient obeys the following symmetry rules: 
    774727 
    775728    - invariant under any permutation of the columns 
    776       \begin{eqnarray} 
    777       Y{j_1 \atop m_1} {j_2 \atop m_2} {j_3 \atop m_3}  
    778       &=& 
    779        Y{j_3 \atop m_3} {j_1 \atop m_1} {j_2 \atop m_2}  
    780       =Y{j_2 \atop m_2} {j_3 \atop m_3} {j_1 \atop m_1}  
    781       \qquad \mbox{cyclic} \\ 
    782       &=& 
    783        Y{j_3 \atop m_3} {j_2 \atop m_2} {j_1 \atop m_1}  
    784       =Y{j_1 \atop m_1} {j_3 \atop m_3} {j_2 \atop m_2}  
    785       =Y{j_2 \atop m_2} {j_1 \atop m_1} {j_3 \atop m_3}  
    786       \qquad\mbox{anti-cyclic}   
    787       \end{eqnarray} 
     729      Y(j_1,j_2,j_3,m_1,m_2,m_3) 
     730          =Y(j_3,j_1,j_2,m_3,m_1,m_2) 
     731          =Y(j_2,j_3,j_1,m_2,m_3,m_1) 
     732          =Y(j_3,j_2,j_1,m_3,m_2,m_1) 
     733          =Y(j_1,j_3,j_2,m_1,m_3,m_2) 
     734          =Y(j_2,j_1,j_3,m_2,m_1,m_3) 
    788735       
    789736    - invariant under space inflection, i.e. 
    790       \begin{eqnarray} 
    791       Y{j_1 \atop m_1} {j_2 \atop m_2} {j_3 \atop m_3}  
    792       = 
    793       Y{j_1 \atop -m_1} {j_2 \atop -m_2} {j_3 \atop -m_3}  
    794       \end{eqnarray} 
     737      Y(j_1,j_2,j_3,m_1,m_2,m_3) 
     738         =Y(j_1,j_2,j_3,-m_1,-m_2,-m_3) 
    795739       
    796740    - symmetric with respect to the 72 Regge symmetries as inherited 
    797741      for the $3j$ symbols [Regge58]