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.
pass number as an argument for SCRIPT
Moderators: cyao, michael_borland
-
- Posts: 83
- Joined: 20 Aug 2008, 13:18
- Location: Northern Illinois University & Argonne National Laboratory
- Contact:
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: pass number as an argument for SCRIPT
Philippe,
To pass the pass number to a SCRIPT, use the "%p" sequence in the COMMAND, e.g.,
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
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"
To turn off the script for closed orbits (and other operations involving the transport matrix), add the DRIFT_MATRIX=1 qualifier.
--Michael
-
- Posts: 83
- Joined: 20 Aug 2008, 13:18
- Location: Northern Illinois University & Argonne National Laboratory
- Contact:
Re: varying a parameter on a turn-by-turn basis
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.
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.
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: pass number as an argument for SCRIPT
Philippe,
You can do this with the ramp_elements or modulate_elements command. See the attached files for an example.
--Michael
You can do this with the ramp_elements or modulate_elements command. See the attached files for an example.
--Michael
- Attachments
-
- scriptVaryWithTurn.zip
- (5.94 KiB) Downloaded 187 times