Page 1 of 1

SDDS file conversion

Posted: 10 Aug 2011, 12:42
by amal
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.

Re: SDDS file conversion

Posted: 10 Aug 2011, 12:47
by michael_borland
Amal,

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

--Michael

Re: SDDS file conversion

Posted: 10 Aug 2011, 12:56
by amal
Michael !!

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

Regards,
Amal.

Re: SDDS file conversion

Posted: 10 Aug 2011, 13:12
by soliday
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.

Re: SDDS file conversion

Posted: 10 Aug 2011, 13:14
by michael_borland
Amal,

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

--Michael

Re: SDDS file conversion

Posted: 10 Aug 2011, 13:18
by amal
Thanks Bob & Michael......It worked nicely.......

Regards,
Amal.