[Back]
New Arrival display

Re^3: MULTとB、Qの差 Name:Kentaro Harada Date:2016/08/02(Tue) 19:03:33 No.124

やっぱりそんなことない。エミッタンス2倍、チューンが0.1の桁で違うように見えます……
何が間違っているのか、謎かけでなくて人の言葉でアドバイスをお願いします……済みません……

Re^2: MULTとB、Qの差 Name:Kentaro Harada Date:2016/08/02(Tue) 19:01:28 No.123

エッジ角の差ですね。解決しました。どうもすみませんでした。

MULT BEND B1 =(L =1 ANGLE =.0923998 E1 =.5 E2 =.5 K1 =-.20118933448704163 )
;
QUAD Q1 =(L =1 K1 =.2921992690089326 )
;

! BEND B1 =(L =1 ANGLE =.0923998 E1 =.5 E2 =.5 K1 =-.20118933448704163 )
! ;
! QUAD Q1 =(L =1 K1 =.2921992690089326 )
! ;

E1=E2=0.5でマッチングすれば同一になりました。

Re^2: MULTとB、Qの差 Name:Kentaro Harada Date:2016/08/02(Tue) 17:26:16 No.122

afsad1上で計算。

<MULTで計算>

Design momentum P0 = 3.0000000 GeV Revolution freq. f0 = 551089.06 Hz
Energy loss per turn U0 = .6620894 MV Effective voltage Vc = 2.0000000 MV
Equilibrium position dz = 30.686027 mm Momentum compact. alpha = .0028778
Orbit dilation dl = .0000000 mm Effective harmonic # h = 952.00000
Bucket height dV/P0 = .0091064

Imag.tune:-0.0000000 0.0000000 -0.0000000
Real tune: 0.2442890 -0.4033132 -0.0165620

Damping per one revolution:
X : -1.078042E-04 Y : -1.103421E-04 Z : -2.231850E-04
Damping time (sec):
X : 1.683227E-02 Y : 1.644511E-02 Z : 8.130423E-03
Tune shift due to radiation:
X : -4.983764E-12 Y : 3.804721E-11 Z : 9.399624E-10
Damping partition number:
X : 0.9771 Y : 1.0001 Z : 2.0228

Emittance X = 2.20568E-8 m Emittance Y = .00000000 m
Emittance Z = 9.06653E-6 m Energy spread = 7.77043E-4
Bunch Length = 11.6693273 mm Beam tilt = .00000000 rad
Beam size xi = .59980929 mm Beam size eta = .00000000 mm

disp $$$;
AX BX NX EX EPX Element Length Value s(m) AY BY NY EY EPY DetR #
1.46511 10.1083 14.2443 .47404 -.07092 $$$ .00000 0 544.000000 -1.9346 13.2985 4.59668 .00000 .00000 .0000 411

<BQで計算>
Design momentum P0 = 3.0000000 GeV Revolution freq. f0 = 551089.06 Hz
Energy loss per turn U0 = .6620894 MV Effective voltage Vc = 2.0000000 MV
Equilibrium position dz = 30.686026 mm Momentum compact. alpha = .0029051
Orbit dilation dl = .0000000 mm Effective harmonic # h = 952.00000
Bucket height dV/P0 = .0090636

Imag.tune: 0.0000000 -0.0000000 -0.0000000
Real tune: 0.1999894 0.3000016 -0.0166402

Damping per one revolution:
X : -2.333794E-04 Y : -1.103421E-04 Z : -9.762856E-05
Damping time (sec):
X : 7.775274E-03 Y : 1.644511E-02 Z : 1.858666E-02
Tune shift due to radiation:
X : -5.418697E-08 Y : 4.260046E-07 Z : 3.810530E-10
Damping partition number:
X : 2.1151 Y : 1.0000 Z : 0.8848

Emittance X = 1.03172E-8 m Emittance Y = .00000000 m
Emittance Z = 2.08264E-5 m Energy spread = .00117495
Bunch Length = 17.7278053 mm Beam tilt = .00000000 rad
Beam size xi = .65085960 mm Beam size eta = .00000000 mm

disp $$$;
AX BX NX EX EPX Element Length Value s(m) AY BY NY EY EPY DetR #
1.46979 10.1386 14.2000 .47740 -.07142 $$$ .00000 0 544.000000 -2.0668 14.2453 4.30000 .00000 .00000 .0000 411

全然違うように見えるのですが……

Re: MULTとB、Qの差 Name:Akio Morita Date:2016/08/02(Tue) 15:46:19 No.121

>  MULTで計算した時とB、Qで計算した時でチューンとエミッタンスが変わります。どちらのケースが正しいでしょうか?
> ラティス台本は以下の通り;
>
> MOMENTUM = 3GEV;
> DRIFT DR5 =(L =3 ) DR1 =(L =3 );
> MULT B1 =(L =1 ANGLE =.0923998 K1 =-.2093146596126 K2 =-.8626506449502389 )
> Q1 =(L =1 K1 =.2919049030684 K2 =.5903671762708573 )
> ;
> ! BEND B1 =(L =1 ANGLE =.0923998 K1 =-.2093146596126 )
> ! ;
> ! QUAD Q1 =(L =1 K1 =.2919049030684 )
> ;
> CAVI RFC =(VOLT =2000000 HARM =952 )
> ;
> MARK MKS =()
> MKNS =()
> MKNE =()
> ;
> LINE
> NCELL =(MKNS DR5 B1 DR1 Q1 MKNE )
> RING =(MKS 34*NCELL RFC 34*NCELL)
> ;
> どうぞよろしくお願い申し上げます。
定義の異なる2種のモデルが物理的に同一であるか否かを別にすれば、実装バグで無い限り、
実装上の精度限界の範囲で、定義モデルに対する正しいチューンとエミッタンスだと思います

MULTとB、Qの差 Name:Kentaro Harada Date:2016/08/02(Tue) 14:29:51 No.120

 MULTで計算した時とB、Qで計算した時でチューンとエミッタンスが変わります。どちらのケースが正しいでしょうか?
ラティス台本は以下の通り;

MOMENTUM = 3GEV;
DRIFT DR5 =(L =3 ) DR1 =(L =3 );
MULT B1 =(L =1 ANGLE =.0923998 K1 =-.2093146596126 K2 =-.8626506449502389 )
Q1 =(L =1 K1 =.2919049030684 K2 =.5903671762708573 )
;
! BEND B1 =(L =1 ANGLE =.0923998 K1 =-.2093146596126 )
! ;
! QUAD Q1 =(L =1 K1 =.2919049030684 )
;
CAVI RFC =(VOLT =2000000 HARM =952 )
;
MARK MKS =()
MKNS =()
MKNE =()
;
LINE
NCELL =(MKNS DR5 B1 DR1 Q1 MKNE )
RING =(MKS 34*NCELL RFC 34*NCELL)
;
どうぞよろしくお願い申し上げます。

Re^3: Fedora23/intel corei5 へのインストール Name:栗木雅夫 Date:2016/06/29(Wed) 19:08:54 No.114

皆様、

sampleの実行結果をみて、計算に不具合があるように早合点してしまいましたが、htmlにあるsamplの実行結果と同じように見えます。
実際にDeckを用意してみて、動作を確認してみます。

> 情報どうもありがとうございます。
>
> コンパイラーのオプション、バージョン等を変えてみて、
> 様子が変わるかどうか試してみます。
>
> > > エキスパートの皆様に質問です。
> > >
> > > Intel core i5にFedora23を入れて、SADを走らせようとしています。
> > > コンパイルが終わり、サンプルプログラムも終了しているのですが、ちゃんと計算されていないようです。実行中につぎのようなエラーを吐いています。
> > >
> > > Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
> > >
> > > 下記がサンプルプログラムの出力です。途中から主な数値がゼロをしめしています。どこかで数値の受け渡しに失敗しているようです。どこらからみたらいいでしょうか。
> > >
> > 付属のサンプルが正しく演算出来ない状況であれば、調査すべき主なポイントは以下の3つだと思われます
> >
> > 1. コンパイルオプションに依存した不具合の可能性
> > 過度な最適化オプションを適用している場合は、コードの不具合(ill-formed code)やコンパイラの最適化バグの可能性が疑われます
> >
> > 2. 実行環境の不具合
> > ポインタ・オフセット演算(64bit環境の場合)や浮動小数点演算(libm)の環境依存の不具合の可能性が考えられます
> >
> > 3. ソースコードへのエラッタ混入
> > コードの改変に伴いエラッタが混入するケースは、割と多いです
> >
> > 実務的には、core dumpを伴わない不具合なので、正常に動作する組み合わせ(OS/コンパイラ/ソースリビジョン)と
> > 不具合が発生する組み合わせの間で二分法を繰り返し原因部位を特定してゆく地道な作業が
> > 一番確実です

Re^2: Fedora23/intel corei5 へのインストール Name:栗木雅夫 Date:2016/06/27(Mon) 17:33:50 No.113

情報どうもありがとうございます。

コンパイラーのオプション、バージョン等を変えてみて、
様子が変わるかどうか試してみます。

> > エキスパートの皆様に質問です。
> >
> > Intel core i5にFedora23を入れて、SADを走らせようとしています。
> > コンパイルが終わり、サンプルプログラムも終了しているのですが、ちゃんと計算されていないようです。実行中につぎのようなエラーを吐いています。
> >
> > Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
> >
> > 下記がサンプルプログラムの出力です。途中から主な数値がゼロをしめしています。どこかで数値の受け渡しに失敗しているようです。どこらからみたらいいでしょうか。
> >
> 付属のサンプルが正しく演算出来ない状況であれば、調査すべき主なポイントは以下の3つだと思われます
>
> 1. コンパイルオプションに依存した不具合の可能性
> 過度な最適化オプションを適用している場合は、コードの不具合(ill-formed code)やコンパイラの最適化バグの可能性が疑われます
>
> 2. 実行環境の不具合
> ポインタ・オフセット演算(64bit環境の場合)や浮動小数点演算(libm)の環境依存の不具合の可能性が考えられます
>
> 3. ソースコードへのエラッタ混入
> コードの改変に伴いエラッタが混入するケースは、割と多いです
>
> 実務的には、core dumpを伴わない不具合なので、正常に動作する組み合わせ(OS/コンパイラ/ソースリビジョン)と
> 不具合が発生する組み合わせの間で二分法を繰り返し原因部位を特定してゆく地道な作業が
> 一番確実です

Re: Fedora23/intel corei5 へのインストール Name:Akio Morita Date:2016/06/27(Mon) 11:21:40 No.112

> エキスパートの皆様に質問です。
>
> Intel core i5にFedora23を入れて、SADを走らせようとしています。
> コンパイルが終わり、サンプルプログラムも終了しているのですが、ちゃんと計算されていないようです。実行中につぎのようなエラーを吐いています。
>
> Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
>
> 下記がサンプルプログラムの出力です。途中から主な数値がゼロをしめしています。どこかで数値の受け渡しに失敗しているようです。どこらからみたらいいでしょうか。
>
付属のサンプルが正しく演算出来ない状況であれば、調査すべき主なポイントは以下の3つだと思われます

1. コンパイルオプションに依存した不具合の可能性
過度な最適化オプションを適用している場合は、コードの不具合(ill-formed code)やコンパイラの最適化バグの可能性が疑われます

2. 実行環境の不具合
ポインタ・オフセット演算(64bit環境の場合)や浮動小数点演算(libm)の環境依存の不具合の可能性が考えられます

3. ソースコードへのエラッタ混入
コードの改変に伴いエラッタが混入するケースは、割と多いです

実務的には、core dumpを伴わない不具合なので、正常に動作する組み合わせ(OS/コンパイラ/ソースリビジョン)と
不具合が発生する組み合わせの間で二分法を繰り返し原因部位を特定してゆく地道な作業が
一番確実です

Re: Fedora23/intel corei5 へのインストール Name:Akio Morita Date:2016/06/27(Mon) 11:08:00 No.111

> エキスパートの皆様に質問です。
>
> Intel core i5にFedora23を入れて、SADを走らせようとしています。
> コンパイルが終わり、サンプルプログラムも終了しているのですが、ちゃんと計算されていないようです。実行中につぎのようなエラーを吐いています。
>
> Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
>
このメッセージはGNU Fortran runtimeが出力しているもので実行途中の浮動小数点演算例外発生を知らせているだけで、SADによる出力ではありません

詳しくは、GNU Fortranのコンパイルオプションに関するマニュアルを参照のこと
https://gcc.gnu.org/gcc-4.9/changes.html
https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gfortran/Debugging-Options.html

Fedora23/intel corei5 へのインストール Name:栗木雅夫 Date:2016/06/24(Fri) 18:40:56 No.110

エキスパートの皆様に質問です。

Intel core i5にFedora23を入れて、SADを走らせようとしています。
コンパイルが終わり、サンプルプログラムも終了しているのですが、ちゃんと計算されていないようです。実行中につぎのようなエラーを吐いています。

Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO

下記がサンプルプログラムの出力です。途中から主な数値がゼロをしめしています。どこかで数値の受け渡しに失敗しているようです。どこらからみたらいいでしょうか。

*** Welcome to SAD Ver.1.0.10.9.5k64 built at 2016-06-24 18:13:34 +0900 ***
*** Today: 18:18:31 Friday 06/24/2016 ***
OFF LOG ECHO;READ 77 ; 23
!
! ***** DEFINITION OF ELEMENTS IN MAIN LEVEL *****
!
;
DRIFT L1 = (L = 1)
;
BEND B = (L = 2)
;
QUAD QF = (L = 1 K1 = 0.1 )
QD = (L = 1 K1 = -0.1 )
QSF = (L = 1 K1 = 0.1 )
QSD = (L = 1 K1 = -0.1 )
QRF = (L = 1 K1 = 0.1 )
QRD = (L = 1 K1 = -0.1 )
;
SEXT SF =(L = 1 K2 = 0.1)
SD =(L = 1 K2 = -0.1)
;
MARK IP1 =(BETAX = 10 BETAY =10 EMIX = 4.0E-7
EMIY = 4.0E-7 DP = 0.01 )
;
CAVI CA1 = (L = 1 VOLT=1 MV HARM=100)
;
!
! ***** DEFINITION OF UNIT CELL IN MAIN LEVEL *****
!
! You need at least one LINE to start FFS, but
! other lines can be created in FFS.
!
;
LINE CELL = (IP1 QF L1 SF L1 B 3*L1 QD L1 SD L1 B 3*L1)
;
FFS USE=CELL;
*** SADScript Initialization: /home/mkuriki/SAD-master/Packages/init.n ***
*** Run time Environment: /home/mkuriki/SAD-master/Packages/init.local.n **
*
RFSW RADCOD RAD FLUC INTRA POL COD DAPER EMIOU CMPLO FOURI SMEAR
F F F T F F T F F F F T
Print[TimeUsed[]];! CPU Time used so far.
.030489999800920486
!
! Defining parameters:
!
nbends=24; ! number of bends per ring
nxcell=0.25; ! horizontal tune/cell
nycell=0.25; ! vertical tune/cell
Print[TimeUsed[]];! CPU Time used so far.
.030579999089241028
!
! ***** UNIT CELL MATCHING *****
!
CELL; ! peridic condition
B 2*Pi/nbends; ! settin bending angle to the BEND B
FIT; ! set fit point at end of line
NX nxcell; ! set fit condition NX
NY nycell; ! set fit condition NY
FREE Q*; ! set Q* (in this case QF and QD) as the matching
! variable
GO; ! start matching
Iterations Residual Method Reduction Variables
2 4.3472E-03 (NEWTON) 1.000 2
3 1.6466E-07 (NEWTON) 1.000 2
Matched. ( 1.6175E-15) DP = 0.01000 DP0 = 0.00000 ExponentOfResidual = 2.0 O
ffMomentumWeight = 1.000
$$$ f AX ####### # -1.496566 $$$ f BX ####### # 23.647704
$$$ f NX .25 1 .250000
$$$ f AY ####### # .467389 $$$ f BY ####### # 6.097759
$$$ f NY .25 1 .250000
$$$ f LENG ####### # 18.000000
! define dr as the drawing command (needs X-Window)
dr:=FFS["OUT 'a' DRAW BX BY & EX EY {BQ}*; TERM OUT; TDR 'a';"];
dr; ! draw optics of unit cell
SAVE; ! save the matching result (values of QF, QD) to
! keep them after swtch the beam line.
Print[TimeUsed[]];! CPU Time used so far.
.2547670006752014
!
! ***** DISPERSION SUPPRESSOR *****
!
unitcell=ExtractBeamLine[]; ! get the current BeamLine
! define a dispersion suppressor to insert rf
supp=BeamLine[QSF, 8*L1, QSD, 3*L1, B, 3*L1, QRF, 3*L1, CA1, 3*L1, QRD];
USE Join[unitcell, supp]; ! switch the beam line with suppressor
INS; ! now nonperiodic (a transport line)
QRD L 0.5; ! set the thickness of QD
FIT;
AX 0; ! set the end of line to be a symmetry point
AY 0;
EX 0; ! and dispersion-free
EPX 0;
Q*F MIN 0; ! set the lower limit of K1 of QRF, QSF
Q*D MAX 0; ! set the upper limit of K1 of QRD, QSD
FREE QS* QR*;
GO;
Iterations Residual Method Reduction Variables
3 258.4 (NEWTON) 6.2500E-02 4
4 118.5 (NEWTON) 0.2500 4
5 36.05 (NEWTON) 1.000 3
7 22.82 (NEWTON) 0.2044 3
8 4.008 (NEWTON) 0.8176 2
9 2.705 (NEWTON) 1.000 4
13 2.465 (NEWTON) 1.5625E-02 4
14 2.096 (NEWTON) 6.2500E-02 4
15 0.4112 (NEWTON) 0.2500 4
17 0.2073 (NEWTON) 0.2077 4
18 1.5378E-03 (NEWTON) 0.8306 4
19 1.4651E-06 (NEWTON) 1.000 4
Matched. ( 2.7823E-13) DP = 0.01000 DP0 = 0.00000 ExponentOfResidual = 2.0 O
ffMomentumWeight = 1.000
$$$ f AX 0 1 1.9485E-9 $$$ f BX ####### # 1.784152
$$$ f NX ####### # .716798
$$$ f AY 0 1 -5.273E-7 $$$ f BY ####### # 110.11073
$$$ f NY ####### # .792207
$$$ f EX 0 1 -2.011E-9 $$$ f EPX 0 1 -1.89E-10
$$$ f LENG ####### # 44.500000
dr; ! draw suppressor
SAVE;
Print[TimeUsed[]];! CPU Time used so far.
.2854500114917755
!
! ***** TOTAL RING *****
!
ncell=(nbends/2-2)/2; ! number of unitcells per half ring.
! Defining a half ring, removing the
! first QF and IP1 markers in unitcell
hring=BeamLine[IP1,-supp,Rest[ncell*Rest[unitcell]],supp];
USE Join[hring,-hring]; ! switch to full ring
CELL; ! now periodic condition again
CAL NX NY; ! set to display NX and NY after CAL
CAL ! calculate the optics of ring
Matched. ( 0.000 ) DP = 0.01000 DP0 = 0.00000 ExponentOfResidual = 2.0 O
ffMomentumWeight = 1.000
$$$ f AX ####### # -3.25E-15 $$$ f BX ####### # 1.784152
$$$ f NX ####### # 4.354010
$$$ f AY ####### # 3.553E-15 $$$ f BY ####### # 110.11071
$$$ f NY ####### # 4.615261
$$$ f LENG ####### # 284.00000
dr; ! draw ring
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Print[TimeUsed[]];! CPU Time used so far.
.33870500326156616
!
! ***** CHROMATICITY CORRECTION *****
!
! get the current tunes
{nx0, ny0}=Twiss[{"NX","NY"},"***"]/2/Pi;
FIT;
NX nx0 5; ! set the offmomentum tunes for 5 points
NY ny0 5; ! in -DP < dp/p0 < DP
DP=0.01; ! set the bandwidth |dp/p0|max = DP = 0.01
FREE S*; ! set S* (SF and SD) sextupoles as variable
GO;
Iterations Residual Method Reduction Variables
2 3.8142E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
19 3.8110E-04 (NEWTON) 1.000 2
*****qcod---> Overflow & closed orbit not found
***qmdiag---> Sum resonance: (TrA-TrB)^2 = NaN
Residual = 3.8110E-04 DP = 0.01000 DP0 = 0.00000 ExponentOfResidual = 2.0 O
ffMomentumWeight = 1.000
DP -.010000 -.005000 .000000 .005000 .010000
Res. 2.1016E-4 1.4048E-5 8.323E-29 8.4830E-6 1.4841E-4
$$$ f AX ####### # 1.786E-13 6.412E-15 -3.25E-15 3.691E-15 -4.88E-14
$$$ f BX ####### # 1.441761 1.605653 1.784152 1.987500 2.229826
$$$ f NX 4.35401 5 4.362037 4.356146 4.354010 4.355570 4.360806
$$$ f AY ####### # -1.94E-13 1.776E-15 3.553E-15 1.776E-15 3.020E-14
$$$ f BY ####### # 120.28086 114.82778 110.11071 105.30067 99.771916
$$$ f NY 4.61526 5 4.623219 4.617256 4.615261 4.616912 4.621898
$$$ f LENG ####### # 284.00000
FITP 1; ! set the off-momentum points to 1 (on-momentum only).
!
! Define Functions to display tunes as functions of dp/p0
nx[dp_]:=(DP0=dp;FFS["CALC"];Twiss["NX","***"]/2/Pi);
ny[dp_]:=(DP0=dp;FFS["CALC"];Twiss["NY","***"]/2/Pi);
!
! Plot tunes -3% < dp/p0 < 3%.
Plot[{nx[dp],ny[dp]}, {dp, -0.03, 0.03},
PlotLabel->"Tune Chromaticity",
FrameLabel->{{"`fD`np/p`d0`n","F X X"},{"`fn`n`dx`n, `fn`n`dy`n","GX X G
X X"}}];
! draw chromaticity
If[$DisplayFunction === CanvasDrawer, Update[]];
TYPE; ! print out all elements
;
DRIFT L1 =(L =1 )
;
BEND B =(L =2 ANGLE =.2617993877991494 )
;
QUAD QRD =(L =.5 K1 =-.10786211799536638 )
QRF =(L =1 K1 =.1945786529110958 )
QSD =(L =1 K1 =-.21812755206494053 )
QSF =(L =1 K1 =.15519425429347902 )
QD =(L =1 K1 =-.15606240584804387 )
QF =(L =1 K1 =.12696257666020425 )
;
SEXT SF =(L =1 K2 =.12077486557515338 )
SD =(L =1 K2 =-.2011189579437624 )
;
CAVI CA1 =(L =1 VOLT =1e+06 HARM =100 )
;
MARK IP1 =(AX =-8.574938606266326e-16 BX =2.1332114948917886 AY =-4.87
6713425966236e-16 BY =101.95488815812298
EX =-.14915073094352782 EPX =-6.386658675581085e-18 DX =-.00061712
54766648309 DPX =-3.394908253619185e-16
DDP =.008125 DP =.01 EMITX =4e-07 EMITY =4e-07 )
;
PrintBeamLine[ExtractBeamLine[]]; ! print out all beam line
BeamLine[
IP1, -QRD, -L1, -L1, -L1, -CA1,
-L1, -L1, -L1, -QRF, -L1, -L1,
-L1, -B, -L1, -L1, -L1, -QSD,
-L1, -L1, -L1, -L1, -L1, -L1,
-L1, -L1, -QSF, L1, SF, L1,
B, L1, L1, L1, QD, L1,
SD, L1, B, L1, L1, L1,
QF, L1, SF, L1, B, L1,
L1, L1, QD, L1, SD, L1,
B, L1, L1, L1, QF, L1,
SF, L1, B, L1, L1, L1,
QD, L1, SD, L1, B, L1,
L1, L1, QF, L1, SF, L1,
B, L1, L1, L1, QD, L1,
SD, L1, B, L1, L1, L1,
QF, L1, SF, L1, B, L1,
L1, L1, QD, L1, SD, L1,
B, L1, L1, L1, QSF, L1,
L1, L1, L1, L1, L1, L1,
L1, QSD, L1, L1, L1, B,
L1, L1, L1, QRF, L1, L1,
L1, CA1, L1, L1, L1, QRD,
-QRD, -L1, -L1, -L1, -CA1, -L1,
-L1, -L1, -QRF, -L1, -L1, -L1,
-B, -L1, -L1, -L1, -QSD, -L1,
-L1, -L1, -L1, -L1, -L1, -L1,
-L1, -QSF, -L1, -L1, -L1, -B,
-L1, -SD, -L1, -QD, -L1, -L1,
-L1, -B, -L1, -SF, -L1, -QF,
-L1, -L1, -L1, -B, -L1, -SD,
-L1, -QD, -L1, -L1, -L1, -B,
-L1, -SF, -L1, -QF, -L1, -L1,
-L1, -B, -L1, -SD, -L1, -QD,
-L1, -L1, -L1, -B, -L1, -SF,
-L1, -QF, -L1, -L1, -L1, -B,
-L1, -SD, -L1, -QD, -L1, -L1,
-L1, -B, -L1, -SF, -L1, -QF,
-L1, -L1, -L1, -B, -L1, -SD,
-L1, -QD, -L1, -L1, -L1, -B,
-L1, -SF, -L1, QSF, L1, L1,
L1, L1, L1, L1, L1, L1,
QSD, L1, L1, L1, B, L1,
L1, L1, QRF, L1, L1, L1,
CA1, L1, L1, L1, QRD, -IP1
];
Print[TimeUsed[]];! CPU Time used so far.
.45032501220703125
!
! ***** EMITTANCE CALCULATION *****
!
EMIOUT; ! turn on the output of matrices by EMIT.
EMIT; ! This (or Emittance[]) is necessary before tracking

Closed orbit:
x px/p0 y py/p0 z dp/p0
Entrance : .000000 .000000 .000000 .000000 .000000 .000000
Exit : .000000 .000000 .000000 .000000 .000000 .000000

Symplectic part of the transfer matrix:
x px/p0 y py/p0 z dp/p0
x : 1.000000 .000000 .000000 .000000 .000000 .000000
px/p0 : .000000 1.000000 .000000 .000000 .000000 .000000
y : .000000 .000000 1.000000 .000000 .000000 .000000
py/p0 : .000000 .000000 .000000 1.000000 .000000 .000000
z : .000000 .000000 .000000 .000000 1.000000 .000000
dp/p0 : .000000 .000000 .000000 .000000 .000000 1.000000

x px/p0 y py/p0 z dp/p0
x : 1.000000 .000000 .000000 .000000 .000000 .000000
px/p0 : .000000 1.000000 .000000 .000000 .000000 .000000
y : .000000 .000000 1.000000 .000000 .000000 .000000
py/p0 : .000000 .000000 .000000 1.000000 .000000 .000000
z : .000000 .000000 .000000 .000000 1.000000 .000000
dp/p0 : .000000 .000000 .000000 .000000 .000000 1.000000

X Px Y Py Z Pz
X : 1.000000 .000000 .000000 .000000 .000000 .000000
Px : .000000 1.000000 .000000 .000000 .000000 .000000
Y : .000000 .000000 1.000000 .000000 .000000 .000000
Py : .000000 .000000 .000000 1.000000 .000000 .000000
Z : .000000 .000000 .000000 .000000 1.000000 .000000
Pz : .000000 .000000 .000000 .000000 .000000 1.000000

Extended Twiss Parameters:
AX: .000000 BX: 1.000000 ZX: .000000 EX: .000000
PSIX: .000000 ZPX: .000000 EPX: .000000
R1: .000000 R2: .000000 AY: .000000 BY: 1.000000 ZY: .000000 EY: .000000
R3: .000000 R4: .000000 PSIY: .000000 ZPY: .000000 EPY: .000000
AZ: .000000 BZ: 1.000000
PSIZ: .000000
Units: B(X,Y,Z), E(X,Y), R2: m | PSI(X,Y,Z): radian | ZP(X,Y), R3: 1/m

Design momentum P0 = 1.0000000 GeV Revolution freq. f0 = 1055607.1 Hz
Energy loss per turn U0 = .0000000 MV Effective voltage Vc = NaN MV
Equilibrium position dz = NaN mm Momentum compact. alpha = .0000000
Orbit dilation dl = .0000000 mm Effective harmonic # h = NaN
Bucket height dV/P0 = NaN

Eigen values and eigen vectors:

Real: 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
Imaginary: 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
Imag.tune: 0.0000000 0.0000000 0.0000000
Real tune: 0.0000000 0.0000000 0.0000000

X Px Y Py Z Pz
x : 1.000000 .000000 .000000 .000000 .000000 .000000
px/p0 : .000000 1.000000 .000000 .000000 .000000 .000000
y : .000000 .000000 1.000000 .000000 .000000 .000000
py/p0 : .000000 .000000 .000000 1.000000 .000000 .000000
z : .000000 .000000 .000000 .000000 1.000000 .000000
dp/p0 : .000000 .000000 .000000 .000000 .000000 1.000000

x px/p0 y py/p0 z dp/p0
X : 1.000000 .000000 .000000 .000000 .000000 .000000
Px : .000000 1.000000 .000000 .000000 .000000 .000000
Y : .000000 .000000 1.000000 .000000 .000000 .000000
Py : .000000 .000000 .000000 1.000000 .000000 .000000
Z : .000000 .000000 .000000 .000000 1.000000 .000000
Pz : .000000 .000000 .000000 .000000 .000000 1.000000

x px/p0 y py/p0 z dp/p0
x : 1.000000 .000000 .000000 .000000 .000000 .000000
px/p0 : .000000 1.000000 .000000 .000000 .000000 .000000
y : .000000 .000000 1.000000 .000000 .000000 .000000
py/p0 : .000000 .000000 .000000 1.000000 .000000 .000000
z : .000000 .000000 .000000 .000000 1.000000 .000000
dp/p0 : .000000 .000000 .000000 .000000 .000000 1.000000

Radiation part of the transfer matrix:
x px/p0 y py/p0 z dp/p0
x : NaN NaN NaN NaN NaN NaN
px/p0 : NaN NaN NaN NaN NaN NaN
y : NaN NaN NaN NaN NaN NaN
py/p0 : NaN NaN NaN NaN NaN NaN
z : NaN NaN NaN NaN NaN NaN
dp/p0 : NaN NaN NaN NaN NaN NaN

X Px Y Py Z Pz
X : NaN NaN NaN NaN NaN NaN
Px : NaN NaN NaN NaN NaN NaN
Y : NaN NaN NaN NaN NaN NaN
Py : NaN NaN NaN NaN NaN NaN
Z : NaN NaN NaN NaN NaN NaN
Pz : NaN NaN NaN NaN NaN NaN

Damping per one revolution:
X : NaN Y : NaN Z : NaN
Damping time (sec):
X : NaN Y : NaN Z : NaN
Tune shift due to radiation:
X : NaN Y : NaN Z : NaN
Damping partition number:
X : NaN Y : NaN Z : NaN

Beam matrix by radiation fluctuation:
x px/p0 y py/p0 z dp/p0
x NaN
px/p0 NaN NaN
y NaN NaN NaN
py/p0 NaN NaN NaN NaN
z NaN NaN NaN NaN NaN
dp/p0 NaN NaN NaN NaN NaN NaN

X Px Y Py Z Pz
X NaN
Px NaN NaN
Y NaN NaN NaN
Py NaN NaN NaN NaN
Z NaN NaN NaN NaN NaN
Pz NaN NaN NaN NaN NaN NaN

Equiliblium beam matrix:
X Px Y Py Z Pz
X .0000000
Px NaN .0000000
Y NaN NaN .0000000
Py NaN NaN NaN .0000000
Z NaN NaN NaN NaN .0000000
Pz NaN NaN NaN NaN NaN .0000000

x px/p0 y py/p0 z dp/p0
x NaN
px/p0 NaN NaN
y NaN NaN NaN
py/p0 NaN NaN NaN NaN
z NaN NaN NaN NaN NaN
dp/p0 NaN NaN NaN NaN NaN NaN

Emittance X = NaN m Emittance Y = NaN m
Emittance Z = NaN m Energy spread = NaN
Bunch Length = NaN mm Beam tilt = NaN rad
Beam size xi = NaN mm Beam size eta = NaN mm

Print[TimeUsed[]];! CPU Time used so far.
.45147401094436646
!
! ***** DYNAMIC APERTURE *****
!
! Dynamic aperture for 1000 turns,
DynamicApertureSurvey[{{0,100},{0,100},Range[-30,30,4]},
1000,Output->6];
Turns =1000 Maximum number of particles =224
Range Xmin: 0.000 Xmax: 100.000
(Ymin: 0.000 Ymax: 100.000)
Zmin: -30.000 Zmax: 30.000
Display: 100 turns/character
NZ 0----|----1----|----2----|----3----|----4----|----5
-30.00 0 . . . . .
-26.00 0 . . . . .
-22.00 0 . . . . .
-18.00 0 . . . . .
-14.00 0 . . . . .
-10.00 0 . . . . .
-6.00 0 . . . . .
-2.00 0 . . . . .
2.00 0 . . . . .
6.00 0 . . . . .
10.00 0 . . . . .
14.00 0 . . . . .
18.00 0 . . . . .
22.00 0 . . . . .
26.00 0 . . . . .
30.00 0 . . . . .
NZ 0----|----1----|----2----|----3----|----4----|----5
Score: 0
!
Print[TimeUsed[]];! CPU Time used so far.
.45451200008392334
ABORT ! stop SAD.

SAD Update V1.0.10.9.5k64 F1 of BEND, etc. Name:K. Oide Date:2016/06/06(Mon) 10:22:07 No.109

Dear Users,

1. The effect of F1 on the emittance calculation of BEND and QUAD has been changed. Now it the end of magnet touches to the other BEND or QUAD with separation of zero thickness, the F1 of that end is ignored on the emittance calculation. The effect on focusing remains. MULT has not been taking F1 into account for the emittance calculation.

2. A bug to crash SAD of afsad in expln has been fixed.

3. TMACRO.inc has been changed to a module tmacro.

4. Modules ffs, ffs_pointer, ffs_flag, ffs_fit have been defined to simplify the interface to several optics/matching functions.

5. The closed orbit calculation in emittance has been modified.

Re^2: ファイル読み込み速度 Name:Y. Seimiya Date:2016/05/19(Thu) 14:12:10 No.108

> > SADで10M程度のテーブルファイルを読み込む際、以下のように書いているのですが、読み込みに5分から10分程度かかってしまいます。早く読み込む方法をご存知でしたら教えていただけますと幸いです。
> >
> > While[((v=Read[f,Real])<=>EndOfFile),AppendTo[tbl,v]];
>
> 1. 長いリストに対するAppendToの効率は極めて悪い
> While + AppendTo Table + Breakに置き換える
> Table[With[{v = Read[f, Real]}, If[v === EndOfFile,Break[], v]], {Infinity}]
> 但し、長すぎると SAD Stackがあふれるので、長さが不定なら適当な長さでTableを止めて外部のループでFlatte[*, {1}]かJoinでつなぐ
>
> 2. Whileで繰り返しReadを呼び出すのが効率が悪い
> File Formatが既知であれば、OpenRead時に shell commandを渡して、SAD Listに整形してしまう
> f = OpenRead["!(echo '{'; sed <some-replace-commands> <file>; echo 'Null[]}' )"];
> tbl = Read[f];
> Close[f];


ご回答ありがとうございます。おかげで問題が解決いたしました。

Re: ファイル読み込み速度 Name:Anonymous Date:2016/05/18(Wed) 13:23:29 No.107

> SADで10M程度のテーブルファイルを読み込む際、以下のように書いているのですが、読み込みに5分から10分程度かかってしまいます。早く読み込む方法をご存知でしたら教えていただけますと幸いです。
>
> While[((v=Read[f,Real])<=>EndOfFile),AppendTo[tbl,v]];

1. 長いリストに対するAppendToの効率は極めて悪い
While + AppendTo Table + Breakに置き換える
Table[With[{v = Read[f, Real]}, If[v === EndOfFile,Break[], v]], {Infinity}]
但し、長すぎると SAD Stackがあふれるので、長さが不定なら適当な長さでTableを止めて外部のループでFlatte[*, {1}]かJoinでつなぐ

2. Whileで繰り返しReadを呼び出すのが効率が悪い
File Formatが既知であれば、OpenRead時に shell commandを渡して、SAD Listに整形してしまう
f = OpenRead["!(echo '{'; sed <some-replace-commands> <file>; echo 'Null[]}' )"];
tbl = Read[f];
Close[f];

ファイル読み込み速度 Name:Y. Seimiya Date:2016/05/18(Wed) 10:31:29 No.106

SADで10M程度のテーブルファイルを読み込む際、以下のように書いているのですが、読み込みに5分から10分程度かかってしまいます。早く読み込む方法をご存知でしたら教えていただけますと幸いです。

While[((v=Read[f,Real])<=>EndOfFile),AppendTo[tbl,v]];

SAD Update V1.0.9.10.4k64 Name:K. Oide Date:2016/05/04(Wed) 14:21:30 No.105

Dear Users,

1. The way of memory allocation in the MAIN level follows that in FFS for future extention.

2. Some infinite loop at some errors in MAIN are modified to a simple exit of SAD, as there is no way to rescue it.

3. The calculation of Effective Voltage, Effective hHarmonic Number is based on V(z), dV(z)/dz, d^2V(z)/dz^2. The estimation of the equilibrium position is improved, esp. when there are many different rf frequencies in a rin.

4. The internal scaling of parameters in OYStability is modified.

(Packages only)
5. ListQ was defined. It has been used in some plots, but ineffective.

6. Positive, Negative, NonPositive, and NonNegative becomes Listable.

7. The legend box in plots becomes weaker and the level is lowered below plots.

8. ItemCGet of Canvas is implemented correctly.

9. The default size of Canvas can be specified Default$CanvasWidth and Default$CanvasHeight, The default of Default$CanvasWidth is 1024 and Default$Canvasheight Default$CanvasWidth*768/1024.

SAD Update V1.0.10.9.1k64 Name:K. Oide Date:2016/03/14(Mon) 15:17:30 No.53

Dear Users,

1. The transformation of a combined function dipole is change. It used to be alternation of flat dipole and linear and nonlinear focusing, but is replaced by a linear transformation with linear focusing + nonlinear correction. Now it is similar to quadrupoles. The new one is faster and correct in the linear part.

2. The initial condition of the orbit for off-momentum matching is changed with a better guess using the momentum dependence of the orbit instead of the dispersion.

3. A routine eigs33.f is changed to use abs(complex()) instead of hypot, which causes problems in some systems with gcc4.8, 4.9, 5.5 in real*16 .

4. An issue of ElementValues introduced in 1.0.10.9k64 is fixed. It is now completely a simple symbol.

SAD Update V1.0.10.9.0.1k64 DRAW (Package only) Name:K. Oide Date:2016/02/10(Wed) 12:34:58 No.30

Dear Users,

1. Now DRAW command accepts SIG** (beam sizes) .

SAD Update V1.0.10.9.0.1k64 TouschekLifetime (Package only) Name:K. Oide Date:2016/02/08(Mon) 15:07:59 No.29

Dear Users,

1. An error will be issued when TouschekLifetime is called without EMIT+INTRA.

Re: SAD Update V1.0.10.9.0.1k64 A bug related to CHARGE. Name:K. Oide Date:2016/02/02(Tue) 20:29:04 No.19

Dear Users,

1. A bug was found in the treatment of PHI of CAV, TCAV. This was introduced in the previous change by 1.0.10.9 .

SAD Update V1.0.10.9k64 CHARGE, R-matrix, etc. Name:K. Oide Date:2016/01/31(Sun) 18:39:28 No.18

Dear Users,

1. Now the variable CHARGE has been validated. Please try it.

2. The way to store R-matrix for x-y coupling is changed when det R is large. If det R >= 1, The transformation matrix from the physical coordinate {x,px,y,py} to
the x-y decoupled coordinate {X,Px,Y,Py} is written as

R = {{mu I, J . Transpose[r] . J}, {r, mu I}},

with the submatrix r={{R1, R2},{R3, R4}}, where mu^2 + Det[r] = 1,
I = {{1,0},{0,1}}, and J={{0, 1}, {-1, 0}}. The value of function DETR is equal
to Det[r] in this case.

Let T stand for the physical transfer matrix from location 1 to location 2, then the transformation in the decoupled coordinate is diagonalized as

R_2 . T . Inverse[R_1] = {{T_X ,0}, {0, T_Y}} .

The Twiss parameters are defined for the matrices T_X and T_Y.

If Det[r] >= 1, the above condition for mu is violated. In such a case, an
an alternative form of m is used:

R = {{J . Transpose[r] . J, mu I}, {mu I, r}},

where mu^2 + Det[r] = 1. The function DETR shows a number a-Det[r], where a = 1.375,
thus the alternative form is used when Det[r] >= 0.625.",

Now the function DETR can be used for the matching.

3. ElementValues is treated as a simple symbol, readable or changeable.

4. ElementValues, FitFunction, and FitValue are cleared at USE and BYE. In the case of VISIT, they are restored by BYE.

5. A bug in FindRoot was fixed when there is one equation.

7. Physical constants are updated using PDG 2014:
https://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0ahUKEwjHw4unsKLKAhUEoJQKHaiPCLgQFggjMAE&url=http%3A%2F%2Fpdg.lbl.gov%2F2014%2Freviews%2Frpp2014-rev-phys-constants.pdf&usg=AFQjCNGXw6APvgkpoTdIRLeC-XV651ZbJg&sig2=-wjwSn5pfl6Juvok0hFqow

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |

- WebForum -