Dear all,
the implementation in #839 includes the possibility to store the sequence of random numbers used in WHITENOISE mode of a VariableThinMultipole element. For example in pyat, and using the development branch for #839
>>> elewhitenoise = at.VariableThinMultipole('ELEWHITENOISE',1,AmplitudeA=0.001,BufferSizeA=5)
>>> print(elewhitenoise)
VariableThinMultipole:
FamName: ELEWHITENOISE
Length: 0.0
PassMethod: VariableThinMPolePass
AmplitudeA: [0.001]
BufferA: [-0.83140061 0. 0. 0. 0. ]
BufferSizeA: 5
MaxOrder: 0
Mode: 1.0
PolynomA: [0.]
PolynomB: [0.]
After enclosing the element in a single element lattice I check the tracking using the parameter 'seed' and I expected to get the same sequence on every call. However, I get the same cycle every two calls to track. I show the track call and the BufferA content.
>>> zout,*_ = thering.track(zin[:,0], nturns=5, seed=3)
>>> elewhitenoise.BufferA
array([-0.83140061, 1.45306833, -0.23518121, 1.0137116 , 0.78605775])
>>> zout,*_ = thering.track(zin[:,0], nturns=5, seed=3)
>>> elewhitenoise.BufferA
array([ 1.45306833, -0.23518121, 1.0137116 , 0.78605775, 1.14049689])
>>> zout,*_ = thering.track(zin[:,0], nturns=5, seed=3)
>>> elewhitenoise.BufferA
array([-0.83140061, 1.45306833, -0.23518121, 1.0137116 , 0.78605775])
>>> zout,*_ = thering.track(zin[:,0], nturns=5, seed=3)
>>> elewhitenoise.BufferA
array([ 1.45306833, -0.23518121, 1.0137116 , 0.78605775, 1.14049689])
From the discussion in #879 about the random number generator I know there are two numbers to control the sequence: initstate amd initsequence.
Is this the behavior due to missing initstate or initsequence ? if that is the case, How should I pass them ? How could I make it compatible with the VariableThinMultipole element ?
Dear all,
the implementation in #839 includes the possibility to store the sequence of random numbers used in WHITENOISE mode of a VariableThinMultipole element. For example in pyat, and using the development branch for #839
After enclosing the element in a single element lattice I check the tracking using the parameter 'seed' and I expected to get the same sequence on every call. However, I get the same cycle every two calls to track. I show the track call and the BufferA content.
From the discussion in #879 about the random number generator I know there are two numbers to control the sequence: initstate amd initsequence.
Is this the behavior due to missing initstate or initsequence ? if that is the case, How should I pass them ? How could I make it compatible with the VariableThinMultipole element ?