rpn_load to set several quads
Posted: 04 Nov 2016, 05:29
Hi,
I have a long FODO lattice. I fit once fodo cell to find the quad strength needed for a specified phase advance and then I would like to set all the quad in the FODO lattice given the value I found for one cell.
I tried to do something like this:
# load the quad associated to one cell
&rpn_load
tag = QUAD450,
filename = fodo.param,
match_column = ElementName,
match_column_value = Q450,
matching_row_number = 1
&end
# set the quad Q470 to same value match as Q450
&alter_elements
name = Q470
item = K1
value = "QUAD450.ParameterValue"
&end
This does not work and I am not sure how to do this. Also is there a way in the rpn_load to actually access the parameter
(now I do it by end using the matching_row_number). Thank you, -- Philippe.
I have a long FODO lattice. I fit once fodo cell to find the quad strength needed for a specified phase advance and then I would like to set all the quad in the FODO lattice given the value I found for one cell.
I tried to do something like this:
# load the quad associated to one cell
&rpn_load
tag = QUAD450,
filename = fodo.param,
match_column = ElementName,
match_column_value = Q450,
matching_row_number = 1
&end
# set the quad Q470 to same value match as Q450
&alter_elements
name = Q470
item = K1
value = "QUAD450.ParameterValue"
&end
This does not work and I am not sure how to do this. Also is there a way in the rpn_load to actually access the parameter
(now I do it by end using the matching_row_number). Thank you, -- Philippe.