Skip to Content.
Sympa Menu

opal - [Opal] String variable for aperture

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

[Opal] String variable for aperture


Chronological Thread 
  • From: Simon Friederich <s.friederich AT uni-mainz.de>
  • To: <opal AT lists.psi.ch>
  • Subject: [Opal] String variable for aperture
  • Date: Wed, 1 Apr 2020 13:26:27 +0200
  • Authentication-results: localhost; iprev=pass (ironport-2.zdv.net) smtp.remote-ip=134.93.178.242; spf=pass smtp.mailfrom=uni-mainz.de; dkim=pass header.d=uni-mainz.de header.s=20190702 header.a=rsa-sha256; dmarc=pass header.from=uni-mainz.de
  • Ironport-phdr: 9a23:b7+S5RXrxQnCzUcJVptPFNwsaFTV8LGtZVwlr6E/grcLSJyIuqrYbReBt8tkgFKBZ4jH8fUM07OQ7/m9HzRaqs3Q+DBaKdoQDkND0Z1X1yUbQ+e7SmTDZMbwaCI7GMkQHHRExFqcdXZvJcDlelfJqWez5zNBUj/2NA5yO/inUtWK15f/2O+94YDcbBtVjzShf7xyMA+2rQLMvcUKnIduMKk8xgbJr3dSZ+ha22xkKFyXkh3h4su84INv/z5ftv48+MNMS7n2c7g9QbdFEDkoLmc56dHkuhXEUQaB/GYXXH8MkhpPDQjF7RX6UYn0vyDnqOdz2zSUMNPvQ7wsVjus86lkSBnziCcaLDE5633YitZxjK1Avh2soQF0zpPOb4GUMPp+eb7dfc8fSGFcUMtdSzBND4WhZIYJEuEPP/tXr5PlqlUQrRWwGA6sCuDhxDBGiXD5waw63v87Hg3axgEtBc4CvXrWodjzKawcUfq1zK7NzTjbcv1W2DL96I/Ochs8of+MR7NwftTMxkYxDQPFj0mfqYz4ND6SzeQBqWab7/BhVe2xlmEotRtxojmzyccskYTJm4QVylHd+SV82ok1JNu4SU9hbdG5DpRdrieXPJZ1TMM6W2xotjs1x7IYtZO+cyUHxooryhDaZvGEb4eH/w/sWeOQLDtkhX9ofbayiAyu/UWuz+DxUtK70FhEridAnNnDqG4B2AfW58ecVvdw8Vqt1S6L2g3T8O1JJV04mbDFJ5I8w7M8jJQevEfFEyTrgkv5lrWWeV8h+uWw7uTnZajpqYGEOo9vjwH+LrwumsuiAeQkKgQOX3aU+eC71LD740L4T6hGguArnqXEqZzaIN8bqrO2AwNMzIou6QyzDja739QGh3UIIlRFeBOeg4buIV7OIfb4DPalj1qinzln3/HGPrv/DZXRNnXDnqrucLlj50NZxwc+w85T6pxRB7wCPP38R1L+udnZAxMlMgG5xuLqB89h2o4QXG+CBrSWMK3csVKN6OIgPfeAa5QQtTnmN/Qo6OPigWc8mVAHfKmp2ZUXaGq/HvRjO0iZenvsgtkbEWcLoAUxUfLlhUafUT5VZna+Rqc86Ss6CIKgDIbPXJ2ij6KZ0CehApJWfnxGCkyLEXrwcIWEQ+0DaCaJL89lkzwETqShS5Q72RG2rw/6yqBrIfbU+n5QiZW2gN9t7un7kRAp6ScyF9+clWqNGTJahGQNEgQ32ad56WJny1qP3LJ5iPwQQccV6elIXws3L5/Xz8RnDdG3XwvAeMXPRFvwEYbuOi04Ut9km4xGWE16Adj31h0=
  • Ironport-sdr: SRc8xroRmaXCdxUOfSdUDa2ZI2mMrK0VhwLBEqpdfN+NGZjFUTBS+dyHrJ5QdVoHOZlhGVyEOU sFTP1uLbMfE/mHI4Nd8cC/Lhfuq032/qhxJKK56bwJ/OidRJtg85DJOBIIndanTkYrU+qBtOKG 91O+O1tPgBtCyI97/Nkrg8WrP9sRSEex/6paIqsiV8q1vSh72IR+7vBy2ml9aQAQYakLZftfWq 8a1Ir1K4m1l7F4KnR2aj4nFzcKAo/TafOktjBTTK+hA+LtV4drtJUsURopcsw2c4D5bv9i3EfZ 6aE=
  • Organization: Institut für Kernphysik Mainz

Dear all,

As we have changing apertures throughout our beamline I'd really like to use string variables but I don't get the correct syntax. I want something like:

STRING apert1 = "circle(0.015)"
STRING apert2 = "circle(0.030)"

drift1: DRIFT, ELEMEDGE=0.5, APERTURE=apert1, L=0.5;
drift2: DRIFT, ELEMEDGE=1, APERTURE=apert2, L=0.5;

But the error appears
Error> *** User error detected by function "OpalElement::getApert()"
Error>     Unknown aperture type 'APERT1'.
Error>     Unknown aperture type 'APERT1'.

Do I miss something?

Best regards
Simon

P.S.: I know this workaround does it
REAL napert1 = 0.015;

REAL napert2 = 0.030;

drift1: DRIFT, ELEMEDGE=0.5, APERTURE="circle(" & STRING(napert1) & ")", L=0.5;
drift1: DRIFT, ELEMEDGE=1, APERTURE="circle(" & STRING(napert2) & ")", L=0.5;

But maybe there is a better way to do it.

-- 
------------------------------------
Dr. Simon Friederich
Helmholtz-Institut Mainz
Kollaboration B / ACID
Johannes Gutenberg-Universität Mainz
Staudingerweg 18
55128 Mainz, Deutschland

Tel.: +49 (0)6131 39-23160
E-Mail: s.friederich AT uni-mainz.de
------------------------------------



Archive powered by MHonArc 2.6.19.

Top of Page