columns to arrays conversion

Moderators: cyao, michael_borland

Post Reply
Max
Posts: 50
Joined: 31 Jul 2008, 12:16

columns to arrays conversion

Post by Max » 21 May 2010, 09:23

Hi Michael,
the correction_matrix_output instruction is described in the elegant manual to provide an
array, but if fact, is a sequence of SDDS columns. I have never used the array format, so I may be
wrong. Is it possible to convert a sequence of SDDS columns (in the example the response matrix terms)
into an array in order to do matrix operations with it ? In the case I am studying, multiplying the Elegant .hirm response
matrix by the measured (not Elegant) BPM data to obtain the correction column.
An alternative would be to replace the Cx,Cxp,Cy,Cyp terms in the .cen file with the experimental data (beam positions
at the BPMs) and then apply the Elegant "correct" procedure. Which is more straightforward ?
Regards, Max

LouisEmery
Posts: 4
Joined: 12 Jun 2008, 09:20

Re: columns to arrays conversion

Post by LouisEmery » 21 May 2010, 15:26

Hi Max,
Mike asked me to respond to this question. There aren't many SDDS tools that use the array data type. The response matrix output of elegant, which is a sequence of SDDS columns is actually used in orbit correction at APS (after inverting with sddspseudoinverse). If you want to do a numerical calculation, you can use the sddsmatrixmult tool (http://www.aps.anl.gov/Accelerator_Syst ... ode76.html). This allows the multiplication of two SDDS files. You would use it as follows:
sddsmatrixmult inverseMatrix BPMdata correctorDelta
The number of columns in inverseMatrix must match the number of rows in BPMdata (i.e. number of bpms). You may have more than one column for BPMdata; then you'll multiple columns in output correctorDelta. I believe sddsmatrixmult ignores string columns, so you don't have to remove them in advance.

Louis Emery

Post Reply