Skip to Content.
Sympa Menu

opal - Re: [Opal] Python: Return particle charges from H5-file [nosign]

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Python: Return particle charges from H5-file [nosign]


Chronological Thread  
  • From: Christof Metzger-Kraus <christof.j.kraus AT gmail.com>
  • To: "Snuverink Jochem (PSI)" <jochem.snuverink AT psi.ch>
  • Cc: "opal AT lists.psi.ch" <opal AT lists.psi.ch>, "Dr. Simon Friederich" <s.friederich AT uni-mainz.de>
  • Subject: Re: [Opal] Python: Return particle charges from H5-file [nosign]
  • Date: Mon, 22 Feb 2021 17:42:14 +0100
  • Authentication-results: localhost; iprev=pass (mail-il1-f176.google.com) smtp.remote-ip=209.85.166.176; 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 Simon,

did you use the HDF5 file from a monitor? In this case the charge isn't written to the file (yet). A feature request for adding more information to HDF5 files from monitors has already been submitted.

Christof

On Mon, Feb 22, 2021 at 5:34 PM Snuverink Jochem (PSI) <jochem.snuverink AT psi.ch> wrote:

Dear Simon,


Yes, that should be possible with pyOPALTools if the H5-file contains the charge information which, from what I can see in the code, it should have.


Can you share a minimal example of how you created the H5 file with OPAL? What OPAL version do you use?


Best regards,

Jochem


From: opal-request AT lists.psi.ch <opal-request AT lists.psi.ch> on behalf of Dr. Simon Friederich <s.friederich AT uni-mainz.de>
Sent: Monday, February 22, 2021 12:59:19 PM
To: opal AT lists.psi.ch
Subject: [Opal] Python: Return particle charges from H5-file
 

Dear OPAL-Team,

Is it possible to return the particle charges from an H5-file using python?

Unfortunately, the parser dataset does not contain the information whereby

mon = load_dataset(".", fname="tmp.h5")
mon._H5Dataset__parser.getStepDatasets()
>> ['bunchNumber', 'id', 'px', 'py', 'pz', 'time', 'turn', 'x', 'y', 'z']

Whereby

mon.getData("q")

consistently does not work.

Best regards
Simon

-- 
Dr. Simon Friederich
Helmholtz-Institut Mainz | Insitut für Kernphysik
Kollaboration ACID       | B
Johannes Gutenberg-Universität Mainz
Staudingerweg 18         | Johann-Joachim-Becherweg 45
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