Page 1 of 1

SDDS5 and SDDSjava from sources

Posted: 03 Feb 2023, 08:21
by blanco-garcia
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

Re: SDDS5 and SDDSjava from sources

Posted: 03 Feb 2023, 09:19
by blanco-garcia
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.

Re: SDDS5 and SDDSjava from sources

Posted: 03 Feb 2023, 10:30
by soliday
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.

Re: SDDS5 and SDDSjava from sources

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

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

Re: SDDS5 and SDDSjava from sources

Posted: 03 Feb 2023, 12:12
by nadolski
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

Re: SDDS5 and SDDSjava from sources

Posted: 03 Feb 2023, 13:26
by blanco-garcia
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

Re: SDDS5 and SDDSjava from sources

Posted: 03 Feb 2023, 15:50
by nadolski
Same problem with bunch file
touschekScatteringOut-002.bun