I need to convert a series of 2d ucsf files to pipe ft2 format. I tried and use the following script taken from the nmrglue tutorial:
-----------------------------------------------------------------
import nmrglue as ng
# read in the Sparky file
sdic, sdata = ng.sparky.read_2D('test.ucsf')
# convert to NMRPipe format
C = ng.convert.converter()
C.from_sparky(sdic, sdata)
pdic, pdata = C.to_pipe()
# write results to NMRPipe file
ng.pipe.write('test.ft2', pdic, pdata)
-----------------------------------------------------------------
Once I run the script I get:
----------------------------------------------------------------------------------------------------------------------------
Traceback (most recent call last):
File "sparky2pipe.py", line 4, in <module>
sdic, sdata = ng.sparky.read_2D('test.ucsf')
File "/usr/lib/python2.6/site-packages/nmrglue/fileio/sparky.py", line 384, in read_2D
raise IOError("Bad file size %s vs %s", (seek_pos, dic["seek_pos"]))
IOError: [Errno Bad file size %s vs %s] (1606068L, 0)
----------------------------------------------------------------------------------------------------------------------------
Any suggestion about how to sort this out?
Thanks,
Alessandro.