jjhelmus / nmrglue

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

Read from binary stream #153

Closed j-brady closed 2 years ago

j-brady commented 2 years ago

Hi Jonathan, Thanks for making nmrglue! It's such a wonderful contribution to the NMR community. I have been using it for my work ever since you published your JBNMR paper and it has really empowered my NMR data analyses.

I have a use case whereby I need (want) to read NMRPipe data stored in memory rather than directly from disk. I've added this capability to the nmrglue.pipe.read function which can now accept io.BytesIO and bytes objects containing NMRPipe data. I have written tests which are passing. I think this change should remain entirely compatible with previous versions. Would you be willing to incorporate it? I'm also open to suggestions.

kaustubhmote commented 2 years ago

@j-brady thanks! This works as advertised and will be a nice addition to nmrglue. I will still wait for a comment from @jjhelmus on type annotations before merging this.