IBM to IEEE floating point?
Posted: Fri Oct 01, 2010 11:00 pm
Hi All,
I have a SEG-Y I/O library that I wrote in Python to do some data processing, but it fails on SEG-Y files that use IBM floating point instead of IEEE. Python's struct.unpack and struct.pack don't support IBM floating point, and I'd rather stay pure Python for simplicity and cross-platform reasons.
SEG-Y on Wikipedia, Another reference
Does anyone have experience with bitwise arithmetic in Python, and particularly how to do this conversion?
Many thanks!
Edit: Still interested in a solution, but I found a way to work around the problem (by converting to a different format outside Python). Thanks for reading.
I have a SEG-Y I/O library that I wrote in Python to do some data processing, but it fails on SEG-Y files that use IBM floating point instead of IEEE. Python's struct.unpack and struct.pack don't support IBM floating point, and I'd rather stay pure Python for simplicity and cross-platform reasons.
SEG-Y on Wikipedia, Another reference
Does anyone have experience with bitwise arithmetic in Python, and particularly how to do this conversion?
Many thanks!
Edit: Still interested in a solution, but I found a way to work around the problem (by converting to a different format outside Python). Thanks for reading.