jjhelmus / nmrglue

A module for working with NMR data in Python
BSD 3-Clause "New" or "Revised" License
209 stars 86 forks source link

Read topspin 4 data #81

Closed robbyblum closed 6 years ago

robbyblum commented 6 years ago

I've gone through and added a new parameter called isfloat to the read/write functions. It should work the same as big does. In particular, for normal operation, it should be able to find the correct data type automatically by reading the DTYPA or DTYPP parameter from the acqus or procs file.

The functions read, read_lowmem, write, write_lowmem, and read_pdata have been changed to autoread DTYPA/DTYPP, and they pass isfloat to all the lower-level read/write functions: first to read_pdata_binary, read_binary, read_binary_lowmem, write_binary, and write_binary_lowmem, and then through those to read_data, put_data, bruker_nd.__init__, get_trace, and uncomplexify_data. I think that's everything that touches the dtype of the binary file...

jjhelmus commented 6 years ago

@sargon14 This is great, thanks for putting it together. I'm excited that nmrglue will be able to read Topspin 4 data.

robbyblum commented 6 years ago

I'm glad I was able to help!