opal AT lists.psi.ch
Subject: The OPAL Discussion Forum
List archive
- From: "Snuverink Jochem (PSI)" <jochem.snuverink AT psi.ch>
- To: "Adelmann Andreas (PSI)" <andreas.adelmann AT psi.ch>, Simon Friederich <sifriede AT uni-mainz.de>
- Cc: "opal AT lists.psi.ch" <opal AT lists.psi.ch>
- Subject: RE: [Opal] Arrays and tables
- Date: Fri, 7 Aug 2020 13:40:02 +0000
- Accept-language: en-US, de-CH
Dear Simon,
As Christof wrote in the bug report, the correct syntax is “REAL VECTOR= {}; I am not aware of the option of 2D-arrays.
So perhaps then:
REAL VECTOR volts = {7.5, 8.0, 8.5, 9.0, 9.5}; REAL VECTOR lags = {239.32815,... }; pb1: RFCAVITY, ...., VOLT = volts[0] * 1e-3, LAG = lags[0] * PI / 180, ...;
Note that you can also do:
REAL VECTOR volts = {7.5, 8.0, 8.5, 9.0, 9.5} * 1e-3; // in MV REAL VECTOR lags = {239.32815,... } * PI / 180; // in rads
pb1: RFCAVITY, ...., VOLT = volts[0], LAG = lags[0], ...;
Best wishes, Jochem
From: opal-request AT lists.psi.ch <opal-request AT lists.psi.ch>
On Behalf Of Adelmann Andreas (PSI)
Dear Simon, indeed it seams that he array feature is broken. Even a one dimensional real array does not work. I will file a bug report. Thanks for reporting!
Cheers A ------
|
- [Opal] Arrays and tables, Simon Friederich, 08/05/2020
- Re: [Opal] Arrays and tables, Adelmann Andreas (PSI), 08/07/2020
- RE: [Opal] Arrays and tables, Snuverink Jochem (PSI), 08/07/2020
- Re: [Opal] Arrays and tables, Simon Friederich, 08/08/2020
- Re: [Opal] Arrays and tables, Adelmann Andreas (PSI), 08/08/2020
- Re: [Opal] Arrays and tables, Simon Friederich, 08/08/2020
- RE: [Opal] Arrays and tables, Snuverink Jochem (PSI), 08/07/2020
- Re: [Opal] Arrays and tables, Adelmann Andreas (PSI), 08/07/2020
Archive powered by MHonArc 2.6.19.