Page 1 of 1

Possible bug in vary_element

Posted: 25 Dec 2023, 05:47
by Skamarokha
Hello

I was trying to run custom ray tracking DX vs DP using MALIGN element and vary_element function. Values fo MALIGN are supposed to be taken from SDDS file. For some reason simulation ends prematurely with message "index 1 has a limit of <= 0".
Is it me, or is there a bug with vary_element and taking values from file feature?

I've added archive with files:
run-test.ele - elegant script
log - terminal log
ring.new - lattice
EA_tracking_points.sdds - file with values for MALIGN element.

P.S. I want to propose a feature to elegant. Would be nice to have function similar to find_aperture but for X/Y vs deltaP.

Re: Possible bug in vary_element

Posted: 25 Jan 2024, 10:07
by michael_borland
The problem is that you've specified 19 indices (a 19-dimensional scan!) but only one vary_element command. You need at least one vary_element command per index. For example,

Code: Select all

&run_control
	n_indices = 2
&end
&vary_element index_number=0, index_limit=11, ... &end
&vary_element index_number=1, index_limit=17, ... &end
would perform a two-dimensional 11x17 scan.

Thanks for the new-feature suggestion. You can kind of get that from the tune_footprint command, at least for rings.

--Michael

Re: Possible bug in vary_element

Posted: 01 Mar 2024, 03:43
by Skamarokha
Thank you, got confused.

I've created file of particles with coordinates according to n-line search pattern, tracked them and used WATCH file to extract data about survived particles, which gave me X vs dP/P aperture.
In this topic is my detailed request to modify find_aperture function.