SDDS5 and SDDSjava from sources

Moderators: cyao, soliday

Post Reply
blanco-garcia
Posts: 68
Joined: 29 Oct 2021, 10:41

SDDS5 and SDDSjava from sources

Post by blanco-garcia » 03 Feb 2023, 08:21

Dear all,

I have an SDDS5 .los file with particle losses from the function touschek_scatter.

When reading the file in matlab with EPICS base 7.0.7 and SDDSjava compiled from sources, and the flag
USR_JAVACFLAGS=" -source 1.8 -target 1.8 "
I get the following error in matlab:

Code: Select all

>> sddsload('touschekScatteringOut.1.500.los')
Error using sddsload (line 30)
SDDS version of file is unrecognized by this version of SDDS/Java (parseHeaders)
Is there any extra flag that I should use during the SDDSjava compilation to support SDDS5 file reading ?

Best regards,
o

I'm attaching the file to this message.
Please remove the .txt extension at the end of the filename
Attachments
touschekScatteringOut.1.500.los.txt
(11.13 KiB) Downloaded 61 times

blanco-garcia
Posts: 68
Joined: 29 Oct 2021, 10:41

Re: SDDS5 and SDDSjava from sources

Post by blanco-garcia » 03 Feb 2023, 09:19

it seems that there was a change in the touschek_scatter function since elegant version 2022:
https://ops.aps.anl.gov/manuals/elegant ... 200013.1.2

this might explain why the output file format is SDDS5, while, in elegant 2021 it returns an SDDS1 file.

On top of that, the file SDDSFile.java from the SDDSjava sources, in epics/extensions/src/SDDS/java/SDDS, contains the following lines of code:

Code: Select all

SDDSFile.java:692:            if ((layoutVersion != 1) && (layoutVersion != 2) && (layoutVersion != 3)) {
SDDSFile.java:693:               setError("SDDS version of file is unrecognized by this version of SDDS/Java (parseHeaders)");
So, they do not support SDDS5 files.

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: SDDS5 and SDDSjava from sources

Post by soliday » 03 Feb 2023, 10:30

I have a newer version of the SDDSjava that I will try to post to the website today.
A workaround till then would be to run sddscast to recast any long64 or longdouble columns and parameters in the SDDS file to long and double. This will reset the version level to 3 or lower.

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: SDDS5 and SDDSjava from sources

Post by soliday » 03 Feb 2023, 10:53

I posted the updated SDDSjava source code.

https://ops.aps.anl.gov/downloads/SDDSjava.tar.gz

nadolski
Posts: 24
Joined: 20 Mar 2013, 05:03
Location: Synchrotron SOLEIL, Gif-sur-Yvette, France
Contact:

Re: SDDS5 and SDDSjava from sources

Post by nadolski » 03 Feb 2023, 12:12

soliday wrote:
03 Feb 2023, 10:30
I have a newer version of the SDDSjava that I will try to post to the website today.
A workaround till then would be to run sddscast to recast any long64 or longdouble columns and parameters in the SDDS file to long and double. This will reset the version level to 3 or lower.
Thanks it works with
sddscast touschekScatteringOut.2.50000.los -cast=param,*,ulong64,long
sddscast touschekScatteringOut.2.50000.los -cast=column,*,ulong64,long

blanco-garcia
Posts: 68
Joined: 29 Oct 2021, 10:41

Re: SDDS5 and SDDSjava from sources

Post by blanco-garcia » 03 Feb 2023, 13:26

soliday wrote:
03 Feb 2023, 10:53
I posted the updated SDDSjava source code.

https://ops.aps.anl.gov/downloads/SDDSjava.tar.gz

Dear Soliday, it works, thank you very much !
o

nadolski
Posts: 24
Joined: 20 Mar 2013, 05:03
Location: Synchrotron SOLEIL, Gif-sur-Yvette, France
Contact:

Re: SDDS5 and SDDSjava from sources

Post by nadolski » 03 Feb 2023, 15:50

Same problem with bunch file
touschekScatteringOut-002.bun

Post Reply