diff --git a/bmad/modules/complex_taylor_mod.f90 b/bmad/modules/complex_taylor_mod.f90 index fa528154ac..82edcdb8a8 100644 --- a/bmad/modules/complex_taylor_mod.f90 +++ b/bmad/modules/complex_taylor_mod.f90 @@ -263,7 +263,8 @@ function complex_taylor_coef2 (complex_taylor, i1, i2, i3, & ! out_type -- character(*), optional: Determins the string to be used for the output type column. ! '' (default) -> '1', '2', '3', etc. ! 'PHASE' -> 'X', 'Px, 'Y', 'Py', 'Z', 'Pz' -! 'SPIN' -> 'S1', 'Sx', 'Sy', 'Sz' (quaternion representation) +! 'SPIN' -> 'S1', 'Sx', 'Sy', 'Sz' ! If size = 4: quaternion representation +! 'SPIN' -> 'Sx', 'Sy', 'Sz' ! If size = 3: ! 'NONE' -> No out column ! Anything else -> Use this for the output column. ! clean -- logical, optional: If True then do not include terms whose coefficients @@ -352,7 +353,11 @@ subroutine type_complex_taylors (complex_taylor, max_order, lines, n_lines, file case ('PHASE') if (i <=6) out_str = ' ' // phase_out(i) // ':' case ('SPIN') - if (i <=4) out_str = ' ' // spin_out(i) // ':' + if (nt == 4) then + out_str = ' ' // spin_out(i) // ':' + elseif (nt == 3) then + out_str = ' ' // spin_out(i+1) // ':' + endif case default out_str = o_type // ':' end select diff --git a/tao/code/tao_show_this.f90 b/tao/code/tao_show_this.f90 index 326943578d..9fbdbec538 100644 --- a/tao/code/tao_show_this.f90 +++ b/tao/code/tao_show_this.f90 @@ -4539,7 +4539,8 @@ subroutine tao_show_this (what, result_id, lines, nl) do i = 1, 3 ctaylor(i) = ptc_nf%isf%x(i) enddo - call type_complex_taylors(ctaylor) + + call type_complex_taylors(ctaylor, out_type = 'SPIN') return endif diff --git a/tao/doc/command-list.tex b/tao/doc/command-list.tex index 1d93508ee1..9e0e6cf661 100644 --- a/tao/doc/command-list.tex +++ b/tao/doc/command-list.tex @@ -3013,8 +3013,8 @@ \subsection{show spin} Syntax: \begin{example} show spin \{-element \{\} \} \{-flip_n_axis\} \{-g_map\} - \{-n_axis , , \} \{-l_axis , , \} - \{-ignore_kinetic \} + \{-ignore_kinetic \} \{-isf\} + \{-l_axis , , \} \{-n_axis , , \} \{-x_zero \} \{-y_zero \} \{-z_zero \} \end{example} @@ -3063,6 +3063,10 @@ \subsection{show spin} The \vn{-flip_n_axis} switch, if present, will flip the direction of the displayed $n$-axis. +The \vn{-isf} switch, if present, will print the invariant spin field which are three taylor series +for the three components of the spin $(S_x, S_y, S_z)$. The independent variables are the six orbital +phase space coordinates $(x, p_x, y, p_y, z, p_z)$. + The \vn{-x_zero}, \vn{-y_zero}, and \vn{-z_zero} options are for testing if supressing certain terms in the linear part of the spin transport map for a set of elements selected by the user will significantly affect the polarization. This is discussed in the section ``\vn{Linear dn/dpz diff --git a/tao/doc/cover-page.tex b/tao/doc/cover-page.tex index bb1ed7c377..5ee535a859 100644 --- a/tao/doc/cover-page.tex +++ b/tao/doc/cover-page.tex @@ -2,7 +2,7 @@ \begin{flushright} \large -Revision: May 7, 2024 \\ +Revision: June 28, 2024 \\ \end{flushright} \vfill