SDDS file conversion

Moderators: cyao, michael_borland

Post Reply
amal
Posts: 13
Joined: 04 May 2011, 23:30

SDDS file conversion

Post by amal » 10 Aug 2011, 12:42

Hello,

I have a plain data file (generated from my own C program with .dat format) which consists of 6 columns separated by spaces for the phase space data of many particles (column wise: x px y py t dp/p). I want to run elegant using SDDS_BEAM command. For this I tried to convert this plain data file (3000 particles) using SDDS conversion utility with following command:

csv2sdds initial_temp.dat initial_temp.sdds -columnData=name=x,type=double,unit=m -columnData=name=xp,type=double -columnData=name=y,type=double,unit=m -columnData=name=yp,type=double -columnData=name=t,type=double,unit=s -columnData=name=p,type=double,unit=m$be$nc -maxRows=2999 -separator=" "

But this conversion is not correct. I could found a message like this (in any editor):

"initial_temp.sdds" [Incomplete last line][converted] 219 lines, 249153 characters

Please let me know where I am doing wrong?

Thanks and regards,
Amal.

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

Re: SDDS file conversion

Post by michael_borland » 10 Aug 2011, 12:47

Amal,

I don't see an obvious problem with the command. Can you post the input file?

--Michael

amal
Posts: 13
Joined: 04 May 2011, 23:30

Re: SDDS file conversion

Post by amal » 10 Aug 2011, 12:56

Michael !!

Here is the attached file of data......

Regards,
Amal.
Attachments
initial_temp.tar
(240 KiB) Downloaded 2665 times

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

Re: SDDS file conversion

Post by soliday » 10 Aug 2011, 13:12

Try this:

plaindata2sdds initial_temp.dat initial_temp.sdds -column=x,double,unit=m -column=xp,double -column=y,double,unit=m -column=yp,double -column=t,double,unit=s -column=p,double,unit=m -noRowCount

I don't think the csv2sdds program works well with variable length whitespace.

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

Re: SDDS file conversion

Post by michael_borland » 10 Aug 2011, 13:14

Amal,

Bob is correct. The problem is that csv2sdds is kind of restrictive in the format. Using plaindata2sdds worked for me.

--Michael

amal
Posts: 13
Joined: 04 May 2011, 23:30

Re: SDDS file conversion

Post by amal » 10 Aug 2011, 13:18

Thanks Bob & Michael......It worked nicely.......

Regards,
Amal.

Post Reply