sixty-north / segpy

A Python package for reading and writing SEG Y files.
Other
102 stars 54 forks source link

Question about TRACE_HEADER_DEF and TraceIdentificationCode #7

Closed abingham closed 10 years ago

abingham commented 10 years ago

I'm just perusing the code right now so I may be off-base here, but the type for "TraceIdentificationCode" in TRACE_HEADER_DEF is uint16. But in the SEGY_REVISION_1 description map you use -1 as one of the keys. Are these keys supposed to be of the same type as the "type" field in the header def? If so, it looks like there's a mismatch.

rob-smallshire commented 10 years ago

Well spotted!

According to the Revision 1 standard http://www.seg.org/documents/10161/77915/seg_y_rev1.pdf negative one is a legitimate value for the two-byte integer in positions 29-30 (1-based) or 28-29 (our code). The maximum is given as 32767 which indicated they're expecting a signed integer here.