correct "bpm_output" is reported as "unknown variable"

Moderators: cyao, michael_borland

Post Reply
richtmann
Posts: 9
Joined: 25 Jun 2019, 07:53

correct "bpm_output" is reported as "unknown variable"

Post by richtmann » 01 Jul 2019, 15:29

Hello,
I tried to use the "bpm_output" option of the correct function. However I get the error "unknown variable bpm_output used in namelist correct" and then a list of "known" variables (as from what I see this list includes all the other variables of the "correct" function).
I was also surprised, that in the user's manual there is no recommended value for this output, as usually a recommended value is given for output files. Is this somehow related? Does this variable still exist and if yes how can I use it correctly? Or does it not exist anymore and the user's manual is outdated?

Furthermore, I read in the forum that there is (or maybe was?) an issue with the trajectory output of the correct function. Do you know if this was already fixed? I tried to convert a trajectory sdds file with sddsprintout to a csv file and I'm not able to handle this csv file in Python while all other csv files created in this way always worked perfectly. So I was also wondering, if this is related to this trajectory variable.

Thank you very much for your help!
Best,
Lea
Last edited by richtmann on 08 Jul 2019, 13:46, edited 1 time in total.

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: correct "beam_output" is reported as "unknown variable"

Post by michael_borland » 02 Jul 2019, 12:19

Lea,

Are you referring to the "bpm_output" variable of the &correct command? (The subject line says "beam_output".) I tried it just now and it worked as expected. Please check the spelling.

I'm not sure why you had trouble with the CSV conversion for the trajectory file. Is there an error message from python that gives more information?

--Michael

richtmann
Posts: 9
Joined: 25 Jun 2019, 07:53

Re: correct "bpm_output" is reported as "unknown variable"

Post by richtmann » 08 Jul 2019, 14:08

Hello Michael,
thank you for your answer and I'm sorry that I didn't reply earlier.
Yes, I meant the "bpm_output" variable, I also had used it like this with the &correct command I just had reported it wrong here, I'm sorry (I corrected my post). I just tried it again and got the same error. Maybe I'm using it somehow wrong. Can you tell me if there is a "recommended value" for the output file?

Regarding the trajectory file: when I load the csv file into python using pandas dataframes all the elements are of type "object" and even if in other cases I'm able to recast "object" type elements to floats, in this case this didn't work. Furthermore, all the other csv files that I got with sddsprintout had the numerical values directly stored as floats, there was no need to recast them.

I'm also not sure if I understand the difference between the "trajectory" and the "centroids" variable: Is the trajectory the beam position as seen from the (0,0) of the BPMs and the centroid the beam position as seen from the (0,0) of the lattice (or for example the geometrical starting point)?

Thank you very much again!
Best,
Lea

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: correct "bpm_output" is reported as "unknown variable"

Post by michael_borland » 09 Jul 2019, 08:33

Lea,

There's no "official" recommended value for the bpm_output parameter, but %s.bpm is probably a good choice.

I've attached a set of files that use bpm_output and trajectory output (both from &correct), and centroid output (from &run_setup). The differences among these are as follows:
  • bpm_output --- residual errors at the BPMs after trajectory or orbit correction. The BPM offsets, setpoints, and tilts are included.
  • trajectory --- centroid from single-particle tracking before and after correction, as labeled by the Stage parameter.
  • centroid --- centroid from tracking of the beam defined by sdds_beam or bunched_beams, after correction.
Since SDDS provides equivalent functionality, I don't use python much nor do I use the pandas dataframes package you mention, so it is hard for me to help you figure out why python reads some files differently than others. Perhaps it has to do with the number of pages in the files (sdds2stream -npages <filename> tells you how many), or the presence of parameters in addition to columns? Another method of converting SDDS files to a format that python may be able to read is to use sdds2plaindata. Better yet, we provide a python module for SDDS files on our software download page, which should work more uniformly and give access to all the features of the SDDS files.

--Michael
Attachments
run.ele
(4.73 KiB) Downloaded 133 times
lattice.lte
(18.73 KiB) Downloaded 124 times

richtmann
Posts: 9
Joined: 25 Jun 2019, 07:53

Re: correct "bpm_output" is reported as "unknown variable"

Post by richtmann » 09 Jul 2019, 11:11

Dear Michael,

thank you very much for your answer and the files. I tried to run what you attached and I get the same error. My only guess is that I would need to install something in addition... Do you think that that is possible?

Thank you also for the explanation of the different variables. That means if I'm working with a beam that is constituted by a particle ensemble I should use centroid instead of trajectory as trajectory applies to single-particle tracking. Is that correct?

I tried to use the python module for SDDS files, however I did not manage to use it correctly, this is why I opted to transform the files to csv with sddsprintout. Can you tell me if there is somewhere a documentation/manual on how to use the python sdds module? I could't find a description on how to use it but I would happily try to use it again.

Thank you again!
Best,
Lea

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: correct "bpm_output" is reported as "unknown variable"

Post by michael_borland » 09 Jul 2019, 11:27

Lea,

Do you mean that elegant gives you an error when you try to use those files? That is odd. Please check that you are using the latest version (2019.1.1).

Yes, if you are tracking a multi-particle beam, looking at the centroid output is best. It should be very close to the trajectory output, but not identical.

I don't think we have a manual for the python package. Unfortunately, the person who handles that package is away until July 15. Perhaps searching for "python" on the forum will yield something helpful.

--Michael

richtmann
Posts: 9
Joined: 25 Jun 2019, 07:53

Re: correct "bpm_output" is reported as "unknown variable"

Post by richtmann » 10 Jul 2019, 11:36

Dear Michael,

yes, this error is given by elegant. I had understood, that we have the latest version installed, but I just saw that we have elegant 26.0.2, so that is not the latest version... Unfortunately I cannot update that myself but I will try to request it.

Thank you also for your other answers. Unfortunately I couldn't solve the sddds to python problems with the forum for now. Maybe I can ask the person you are mentioning after July 15...

Thank you!
Best,
Lea

Post Reply