Skip to Content.
Sympa Menu

opal - Re: [Opal] Generation of .lattice file

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Generation of .lattice file


Chronological Thread 
  • From: Christof Metzger-Kraus <christof.j.kraus AT gmail.com>
  • To: "Thomas, Sebastian" <sthomas AT uni-mainz.de>
  • Cc: opal <opal AT lists.psi.ch>
  • Subject: Re: [Opal] Generation of .lattice file
  • Date: Tue, 18 Feb 2020 22:27:18 +0100
  • Authentication-results: localhost; iprev=pass (mail-io1-f44.google.com) smtp.remote-ip=209.85.166.44; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com

Hi Sebastian,

I've added a small example showing how you could use the file <input>_ElementPositions.sdds to https://gitlab.psi.ch/OPAL/manual-master/blob/master/opalt.asciidoc . The fix that was needed to make the file readable has been approved and pushed to the master.

Cheers
Christof

On Tue, Feb 18, 2020 at 11:16 AM Christof Metzger-Kraus <christof.j.kraus AT gmail.com> wrote:
Hi Sebastian, 

the information about the type is written to the header. For almost every type there is a separate column (but not all e.g. for drifts there isn't a column since usually they are given implicitly). 

There was a bug in the implementation which I fixed last night, but the changes aren't approved yet. 

Christof 

Thomas, Sebastian <sthomas AT uni-mainz.de> schrieb am Di., 18. Feb. 2020, 11:06:

Dear all, 


The _ElementPositions.sdds file is more or less exactly what I need, but unfortunately for me it returns gibberish. Further, for convenience, is it possible to add the "Type" of an element (like "QUADRUPOLE", "DRIFT"...) to the .sdds file? But, of course,  this information is also deducible from the values of the fields and/or clever name giving, so it's not urgent.


Thanks for all the help so far! 

Cheers

Sebastian


PS: Ultimately, I want to make a graph just like you sent, Jochem.


From: Christof Metzger-Kraus <christof.j.kraus AT gmail.com>
Sent: 17 February 2020 21:58:05
To: Snuverink Jochem (PSI)
Cc: Thomas, Sebastian; Ganz Philippe
Subject: Re: [Opal] Generation of .lattice file
 
Hi Jochem,

in addition to the two file you've mentioned there is also a file ending with .sdds. Sofar I've always used gnuplot to plot my results, but it should be straight forward to implement a parser based based on a parser for sdds files.

christof

On Mon, Feb 17, 2020 at 8:54 PM Snuverink Jochem (PSI) <jochem.snuverink AT psi.ch> wrote:

Hi Christof,


The "data/<inputname>_ElementPositions.txt" is generated in the OPAL-t. There is a corresponding <inputname>_ElementPositions.py file copied to data to go with it. I am not sure about the status, have never used it. I tested it briefly today, but it didn't work for me.


The .lattice file in the original question is another file / format, meant for making the plots as shown. But this file is afaik no generated by OPAL. It was added by Philippe, possibly these two schemes can be combined.


Cheers, Jochem


From: Christof Metzger-Kraus <christof.j.kraus AT gmail.com>
Sent: Monday, February 17, 2020 8:44 PM
To: Snuverink Jochem (PSI)
Cc: Thomas, Sebastian; opal
Subject: Re: [Opal] Generation of .lattice file
 
ps: something is wrong with the generator of this code. I'll try to find the reason.

On Mon, Feb 17, 2020 at 7:33 PM Christof Metzger-Kraus <christof.j.kraus AT gmail.com> wrote:
Hi,

OPAL-T writes an SDDS file containing all the information. It is written to data/<inputname>_ElementPositions.sdds (I think). 

Christof 

Snuverink Jochem (PSI) <jochem.snuverink AT psi.ch> schrieb am Mo., 17. Feb. 2020, 18:07:

Hi Sebastian,

 

Unfortunately, I don’t think there is a tool to generate these “.lattice” files that can be read in by the LatticeParser. You would have to write them yourself by hand or with a script I think.

 

@Philippe: do you remember perhaps how you generated the .lattice files for these kind of plots:

 

 

 

The LatticeParser can certainly be made more generic. Please let us know in case you would like to help improving it.

 

Cheers, Jochem

 

From: opal-request AT lists.psi.ch <opal-request AT lists.psi.ch> On Behalf Of Thomas, Sebastian
Sent: Montag, 17. Februar 2020 13:33
To: opal AT lists.psi.ch
Subject: [Opal] Generation of .lattice file

 

Hey OPALers,

 

Quick question: Can OPAL create a "MyProject.lattice" file, that can be read by the opal/paser/LatticeParser in pyOPALtools? Somehow I can't find anything about that. There is an example called "Gantry2", which has a "70MeV_G2.lattice" file. I would like to generate this for my own lattice.

 

Cheers

Sebastian




Archive powered by MHonArc 2.6.19.

Top of Page