Page 1 of 1

pass number as an argument for SCRIPT

Posted: 15 Dec 2017, 19:18
by Philippe Piot
Hello,
Is there a way to pass the number of to a SCRIPT element can have this info (I have a SCRIPT element in a ring and wants it to be on only for certain pass). Likewise in a ring how could I turn off the SCRIPT command when the &closed_orbit is used.

Thank you, -- Philippe.

Re: pass number as an argument for SCRIPT

Posted: 15 Dec 2017, 20:41
by michael_borland
Philippe,

To pass the pass number to a SCRIPT, use the "%p" sequence in the COMMAND, e.g.,

Code: Select all

s1: script,command="myScript %i %o %p"
In this case, the script will get the input filename, output filename, and pass number, in that order, in its arguments.

To turn off the script for closed orbits (and other operations involving the transport matrix), add the DRIFT_MATRIX=1 qualifier.

--Michael

Re: varying a parameter on a turn-by-turn basis

Posted: 25 Aug 2021, 22:18
by Philippe Piot
All,
Is there a way to vary a parameter on a turn-by-turn basis in a ring? (e.g. changing the strength of a quadruple as a function of pass number). I thought vary_element could do that but it seems not to be the case. Thank you, -- Philippe.

Re: pass number as an argument for SCRIPT

Posted: 26 Aug 2021, 09:21
by michael_borland
Philippe,

You can do this with the ramp_elements or modulate_elements command. See the attached files for an example.

--Michael