[Back]
Block display

SAD Update V1.1.1k64pre Name:K. Oide Date:2017/07/20(Thu) 12:52:41 No.530

Experimental:
1. Now keywords for MULT can take a list to represent the longitudinal
profile of the parameters. Usage:
LINE[“L”, “Q1”]={0.2, 0.6, 0.2];
LINE[“K1”, “Q1”]={0.01, 0.05, 0.01};
Remarks:
- The keyword “L” must be given as a List to define the length of each
segment. Other keywords are either a Real or a List with the same
number of components as “L”.
- If a key is a list, the value corresponding to the segment for “L” is
taken. Otherwise the Real value is used commonly for all segments.
- For a matching, the sum of the segments are used, and the resulting
value is distributed to all segments, keeping the same profile.
- Commands SAVE and RESET should work as expected.
- In commands VAR, DISP, and element-value commands (such as Q1 K1
0.02), the summation of parameters are displayed.
- TYPE shows the Listed parameters as List, but it is not readable by
MAIN yet.
- For LINE and Element functions, keyword$SUM returns the sum of the
List if the value of keyword is a List. Otherwise, it returns the same
value as the keyword. Example: LINE[“K1$SUM”, ”Q1”]. Setting to keyword$SUM
is not yet implemented as expected.
- Currently, the List keyword works only for MULT. However, it is not
inhibited to set to other elements, which will cause unpredictable
results.
- OpticsPlot and GeometryPlot should work properly.

2. Functions Module and With now accept more than 2 arguments. In such
a case, Module[l_, f__] means Module[l, Module[f]]. Same for With. This
makes it convenient to define local symbols cumulatively.

Re: SAD Update V1.1.1k64pre Name:Akio Morita Date:2017/07/20(Thu) 17:16:55 No.535

> Experimental:
> 1. Now keywords for MULT can take a list to represent the longitudinal
> profile of the parameters. Usage:
> LINE[“L”, “Q1”]={0.2, 0.6, 0.2];
> LINE[“K1”, “Q1”]={0.01, 0.05, 0.01};
> Remarks:
> - The keyword “L” must be given as a List to define the length of each
> segment. Other keywords are either a Real or a List with the same
> number of components as “L”.
> - If a key is a list, the value corresponding to the segment for “L” is
> taken. Otherwise the Real value is used commonly for all segments.
> - For a matching, the sum of the segments are used, and the resulting
> value is distributed to all segments, keeping the same profile.
> - Commands SAVE and RESET should work as expected.
> - In commands VAR, DISP, and element-value commands (such as Q1 K1
> 0.02), the summation of parameters are displayed.
> - TYPE shows the Listed parameters as List, but it is not readable by
> MAIN yet.
> - For LINE and Element functions, keyword$SUM returns the sum of the
> List if the value of keyword is a List. Otherwise, it returns the same
> value as the keyword. Example: LINE[“K1$SUM”, ”Q1”]. Setting to keyword$SUM
> is not yet implemented as expected.
> - Currently, the List keyword works only for MULT. However, it is not
> inhibited to set to other elements, which will cause unpredictable
> results.
> - OpticsPlot and GeometryPlot should work properly.
>
仕様レベルでのコメント

* 後方互換性を考慮するとGetter/Setter界面では、K1や L等の既設の変数は Master Variableとして振る舞わせ、分布等を設定する変数を接頭辞・接尾辞付きで新設する方が素直かと思います

* 暗に、積分値が non-zeroであることを想定してるようですが、wigglerの類や hericalなdeviceを考えると、master variableと form factorの概念は分離すべきだと思います

* herical deviceで、ROTATEに分布を持たせる場合、外部から指定するROTATEに対しては、加算的に振る舞って欲しいとか、Kn分布は乗算的に振る舞って欲しい等が有るので、パラメータ展開をframework側で行う場合、パラメータ毎にframeworkの振る舞いをカスタマイズできるべきです

* element内部のパラメータ分布のみを導入するなら、分布のハンドリングや計算時の展開処理は、tturn/ttruneレベルの driver framework側で行い、element実装コード側はパラメータ毎の振る舞い属性等の定義のみを行うようにすると、実装が一般化できると思います

** ある程度のelement interfaceの標準化が前提となりますが...

Re^2: SAD Update V1.1.1k64pre Name:K. Oide Date:2017/07/22(Sat) 13:33:12 No.553

> > Experimental:
> > 1. Now keywords for MULT can take a list to represent the longitudinal
> > profile of the parameters. Usage:
> > LINE[“L”, “Q1”]={0.2, 0.6, 0.2];
> > LINE[“K1”, “Q1”]={0.01, 0.05, 0.01};
> > Remarks:
> > - The keyword “L” must be given as a List to define the length of each
> > segment. Other keywords are either a Real or a List with the same
> > number of components as “L”.
> > - If a key is a list, the value corresponding to the segment for “L” is
> > taken. Otherwise the Real value is used commonly for all segments.
> > - For a matching, the sum of the segments are used, and the resulting
> > value is distributed to all segments, keeping the same profile.
> > - Commands SAVE and RESET should work as expected.
> > - In commands VAR, DISP, and element-value commands (such as Q1 K1
> > 0.02), the summation of parameters are displayed.
> > - TYPE shows the Listed parameters as List, but it is not readable by
> > MAIN yet.
> > - For LINE and Element functions, keyword$SUM returns the sum of the
> > List if the value of keyword is a List. Otherwise, it returns the same
> > value as the keyword. Example: LINE[“K1$SUM”, ”Q1”]. Setting to keyword$SUM
> > is not yet implemented as expected.
> > - Currently, the List keyword works only for MULT. However, it is not
> > inhibited to set to other elements, which will cause unpredictable
> > results.
> > - OpticsPlot and GeometryPlot should work properly.
> >
> 仕様レベルでのコメント
>
> * 後方互換性を考慮するとGetter/Setter界面では、K1や L等の既設の変数は Master Variableとして振る舞わせ、分布等を設定する変数を接頭辞・接尾辞付きで新設する方が素直かと思います

そのように変更したいと思いますが、パラメータを数値で与える限りは現状でも後方互換です。それとも「後方」の方もそのように仕様追加されるのでしょうか。
>
> * 暗に、積分値が non-zeroであることを想定してるようですが、wigglerの類や hericalなdeviceを考えると、master variableと form factorの概念は分離すべきだと思います
>
そのように変更したいと思います。

> * herical deviceで、ROTATEに分布を持たせる場合、外部から指定するROTATEに対しては、加算的に振る舞って欲しいとか、Kn分布は乗算的に振る舞って欲しい等が有るので、パラメータ展開をframework側で行う場合、パラメータ毎にframeworkの振る舞いをカスタマイズできるべきです
>

上記を変更した上で、ElementValuesとかで設定できるのではないでしょうか。

> * element内部のパラメータ分布のみを導入するなら、分布のハンドリングや計算時の展開処理は、tturn/ttruneレベルの driver framework側で行い、element実装コード側はパラメータ毎の振る舞い属性等の定義のみを行うようにすると、実装が一般化できると思います
>
> ** ある程度のelement interfaceの標準化が前提となりますが...

具体的な変更点がわかりません。現状はそう遠くないと思いますが。

SAD Update V1.1.1k64_pre01 Name:K. Oide Date:2017/07/23(Sun) 20:08:48 No.556

Bug fixes:
1. A potential glitch in FitFunction to cause a memory destruction.

2. The FFS command WRITE LAT has been restored.

3. Evaluation of VariableRange and VariableWeight was not correct when
values have been assigned to them.

The experimental longitudinal profile of MUL is subject to change according to Morita-san's suggestion, but not yet completed.

Re: SAD Update V1.1.1k64pre Name:K. Oide Date:2017/07/25(Tue) 11:08:15 No.558

Bug fixes:
1. The module reference in tffs.f was wrong (use before definition), as
pointed out by Yamamoto-san.

Changes:
2. The closed orbit finding in CAL for off-momentum matching was
modified for the initial guess.

SAD Update V1.1.1k64_pre05 Name:K. Oide Date:2017/07/26(Wed) 01:44:12 No.560

Bug fixes:
1. The functions ResponseMatrix (pgrmat.f) and CalculateOptics
(tfoptics.f) have not been ported to k64 correctly until now. Also
tracez was not set for CALC4D to cause an unpredictable consequences.

SAD Update V1.1.1k64_pre07 Name:K. Oide Date:2017/08/03(Thu) 10:15:00 No.571

Experimental:
1. The way of longitudinal profiling of MULT has been changed. Now a
new keyword PROFILE is defined and the profile of all keywords are
stored under PROFILE. The value is a list of the form:

{{key1, {v11,..,v1n}, {key2, {v21,...,v2n}}, ...}

where key1, key2, ... are the keywords of MULT. The keyword "L" must be
one of them. The values of profiles v11,.. vmn are real numbers. All
keys must have an equal length of the values.
The actual value of each segment is given by the product of profile
values and the corresponding values of each key, ie., the "master
value". There is no automatic normalization of the values of profile.

Example:
Element["PROFILE","Q1"]={{"L",{0.1,0.7,0.2}},{"K1",{0.15,0.6,0.25}}};
TYPE Q1;
;
MULT Q1 =(L =1 K1 =.1 PROFILE = {{"L", {.1, .7, .2}},
{"K1", {.15, .6, .25}}} )
;

2. A few utilities are defined for Element for handling the profile:

Element["PROFILE"[key], e] returns the list of profile values for key.
Element["PROFILE"[key], e] = {v1,...,vn} sets the value of profile for
key, keeping the profiles for other keys.
Element["PROFILE", e]={key, {v1,..., vn}} is same as above.

Remarks:
a. The master values of each key must be a Real.
b. The geometry and path lengths are calculated based on the master
values.
c. The output by TYPE cannot be read by MAIN yet.
d. The treatment of fringes for intermediate points is not correct yet.
e. Further customizations of the way to determine the segment values
from the master values and the profile will be made depending on
demands.
===========

Changes:
1. ListContourPlot and ListDensityPlot now take a grid with unequal
spacings. it is specified by MeshRange -> {x_List, y_List} , where x
and y can be lists to specify the values at each grid. Their lengths
must be equal to the Dimensions of the data.

2. A new color function Green is defined for ListContourPlot and
ListDensityPlot, invoked by ColorFunction -> Green.

3. Fine adjustments are done for the alignment of FrameLabels.

SAD Update V1.1.1k64_pre11 More on PROFILE, closed orbit with RADTAPER, etc. Name:K. Oide Date:2017/08/24(Thu) 15:30:18 No.601

Experimental:
1. PROFILE of MULT now accepts a combination of {key, master} as the
specification of a key. key_String and {key_String} is equivalent to
{key, key}. The value of each segment is given by the value of master
times the value of the corresponding segment of the profile. If the key
has profiles with multiple masters, all contributions are added.

2. If the key of MULT is a integrated quantity, and the PROFILE is
given, the value of the key is given by the value of the key * (the
segment of PROFILE of “L”), unless the profile with {key, key} is
defined. The contributions from the profiles of the key are added. The
integrated keys are “L”, “ANGLE”, “VOLT, “DVOLT”, “K0” to “K21”, and
“SK0” to “SK21”.

Bug fixes:
Fixes:
1. The algorithm to find a closed orbit with RADTAPER was changed to
find the longitudinal parameters first. It had been failed with
RADTAPER and transverse orbit.

2. The RADTAPER with nonzero DP0 now tapers all magnets according to
the difference between the local energy and DP0.

3. A behavior of element-value-command, such as ‘QF DX 0.001’, had
expanded all vaules of all elements. Now it is confined to the element
and keyword touched by the command.

4. Pattern matching with duplicated pattern symbols could cause wrong
results in some cases.

5. The tag of the right vertical frame line of a plot has been incorrect.

Changes:
1. Element now accepts setting to elements specified by wildcards.

2. Internal routines for BEND, QUAD, MULT without BZ have been updated
for more efficiency.

3. The internal coding has been changed in many places.

4. Eliminated internal type sad_list.

5. Reduced “type mismatch” compiler warnings.

SAD Update V1.1.1k64_pre15 Name:K. Oide Date:2017/09/15(Fri) 15:19:21 No.644

Fixes:
1. Judgment whether to do a parallel processing in TrackParticles was
wrong when the number of particles or the length of the lattice was
very wrong.

2. Expansion of values of elements changed by Element or LINE functions
have been wrong, since 1.1.1k64_pre11.

Changes:
1. A new flag K64 has been created. If it is OFF, TYPE tries to omit
keywords which are not accepted by the legacy version. The default is
ON.

2. The initialization of internal databases LINE$P and Element$P was
changed for speed in the most of cases.

3. The restriction of transverse phase advance in CALC6D has been
relaxed from -1e-9 to -0.1 (radian). It has caused occasional jump of
tunes by 1 in some cases.

SAD Update V1.1.1k64 Name:K. Oide Date:2017/11/20(Mon) 22:31:31 No.681

Bug fixes:
1. The transfer matrix of BEND and MULT with nonzero ANGLE and nonzero K1 has been wrong since 1.0.10.9.1k64, on around Mar. 14, 2016. The amount of error was usually not large unless the horizontal focusing (1/rhob + K1) is too weak.

2. DynamicApertureSurvey with artificial damping has not been working for a while, probably within a half year.

Changes:
1. New functions FitGaussian and FitEmit are implemented:
FitGaussian performs Gaussian fit of 1D list data:

FitGaussian[data, [opt, ...]]

returns a list

{sigma, mean, {sigma_conf, mean_conf}, chisq} ,

where sigma_conf and mean_conf are the confidence interval of the results sigma and mean, respectively.
opt is options to Fit. If Plot->True is specified, a plot of the fitting will be made.

FitEmit obtains the emittance, beta, alpha, etc. from data of particles x and px using FitGaussian.

FitEmit[x, px] ,

where x and px are the lists of data of the particles in the phase space, returns a list

{{xmean, pxmean, alpha, beta, emittance},
{xmean, pxmean, alpha, beta, emittance}_conf},

where the second component is the confidence interval of the first.

2. The character "\m" (RETURN) is added to WordSeparators to read a file generated by Windows more easily. Now the default WordSeparators are " ,\t\m".

- WebForum -