Revision history [back]
click to hide/show revision 1
initial version

posted Jan 14 '10 at 10:59

anglican's gravatar image

anglican
66

A simple way to do this is with the "od" (octal dump) command which is standard on Linux (and may be available under Cygwin for Windows). Use, in the directory containing the fid: od -An -i -v -w4 fid > fid.txt which will create a file fid.txt containing the data in readable form, one number per line. If you're doing this on an ser file the result may be quite large! This can also be used on 1r, 2rr etc... Note that you will not have the time/frequency that corresponds to each point, just the intensity of each fid point. Occasionally, with old data, you may run into problems with the byte order, in which case you can use the "dd" command to swap bytes prior to using "od". H
click to hide/show revision 2
No.1 Revision

posted Jan 15 '10 at 00:28

anglican's gravatar image

anglican
66

A simple way to do this is with the "od" (octal dump) command which is standard on Linux (and may be available under Cygwin for Windows). Use, in the directory containing the fid:

od -An -i -v -w4 fid > fid.txt

which will create a file fid.txt containing the data in readable form, one number per line. If you're doing this on an ser file the result may be quite large! This can also be used on 1r, 2rr etc... Note that you will not have the time/frequency that corresponds to each point, just the intensity of each fid point. Occasionally, with old data, you may run into problems with the byte order, in which case you can use the "dd" command to swap bytes prior to using "od".

I should add that you need to convert digital data to analogue first with "convdta" in Topspin before running this. On older systems e.g. RHEL4 the syntax is slightly different:

od -An -t dI -v -w4 fid > fid.txt

H

click to hide/show revision 3
No.2 Revision

posted Jan 20 '10 at 02:10

anglican's gravatar image

anglican
66

A simple way to do this is with the "od" (octal dump) command which is standard on Linux (and may be available under Cygwin for Windows). Use, in the directory containing the fid:

od -An -i -v -w4 fid > fid.txt

which will create a file fid.txt containing the data in readable form, one number per line. If you're doing this on an ser file the result may be quite large! This can also be used on 1r, 2rr etc... Note that you will not have the time/frequency that corresponds to each point, just the intensity of each fid point. Occasionally, with old data, you may run into problems with the byte order, in which case you can use the "dd" command to swap bytes prior to using "od".

I should add that you probably need to convert digital data to analogue first with "convdta" in Topspin before running this. On older systems e.g. RHEL4 the syntax is slightly different:

od -An -t dI -v -w4 fid > fid.txt

added: 20 Jan 2010

To tell if byte swapping (converting from one endianness to another) is necessary look at the BYTORDA parameter in the acqus file. If it is 1 (on a Linux system) then you need to swap the byte order of the data for od to work correctly. A command to do this is:

ls fid | cpio -o | cpio -i --swap -u

Once run you will need to edit the acqus file so that BYTORDA = 0 or Topspin will not be able to process the fid correctly.

Finally, if the data is floating point rather than integer, od probably wont work (check parameter DTYPA in acqus - should be 0 for integer).

H

powered by CNPROG