ph5_validate error checking for station/event IDs needs to be updated to be more accurate with respect to limitations imposed by SEGY Rev 1 for data output. SEGY Rev 1 should be the most restrictive data format that is used for data output, so limitations imposed on station/event IDs by that standard should also be compatible with other data output formats.
In addition, a bug was discovered wrt event elevations, where ph5_validate does not register 0.0 as a valid entry in the elevation field of the event/shot table.
ph5_validate gives a WARNING for station IDs greater than 32,767 (similar to warnings below in event example)
ph5_validate gives an ERROR for stations IDs not between 0 and 65,535
Desired behavior:
ph5_validate should probably give an ERROR for station IDs not between 0 and 32,767
Event/shot tables
Current behavior:
ph5_validate gives a WARNING for event IDs greater than 32,767
ph5_validate gives an ERROR for event IDs not between 0 and 65,535
ph5_validate gives an ERROR for "No Event location/Z/value_d found" when location/Z/value_d=0.0. It is possible that location/Z/value_d=0 does not cause this error to be given, but 0.0 should also be a valid value.
Desired behavior:
ph5_validate should give an ERROR for Event IDs not between 0 and 2,147,483,647 (the limit of a signed value in 4-bytes). (While it is possible that the SEG-Y header is an unsigned value and the limit could be higher, using the more restrictive criteria still seems reasonable as 2 billion is already a ridiculous number to use as a shot identifier)
ph5_validate should not give an ERROR for location/Z/value_d=0.0. At most, it should give a WARNING similar to the one that appears for station elevations of 0: "WARNING: Channel elevation seems to be 0. Is this correct???"
ph5_validate output current examples:
Event ID greater than 32,767 but less than 65,535:
Event_t 34655
1 error, 1 warning, 0 info
-=-=-=-=-=-=-=-=-
ERROR: No Event location/Z/value_d value found.
WARNING: Event ID '34655' is more than 32767. Not compatible with SEGY revision 1.
Event ID not between 0 and 65,535, and "No Event location":
Event_t 76898
2 error, 0 warning, 0 info
-=-=-=-=-=-=-=-=-
ERROR: Event ID '76898' not between 0 and 65535.
ERROR: No Event location/Z/value_d value found.
ph5_validate error checking for station/event IDs needs to be updated to be more accurate with respect to limitations imposed by SEGY Rev 1 for data output. SEGY Rev 1 should be the most restrictive data format that is used for data output, so limitations imposed on station/event IDs by that standard should also be compatible with other data output formats.
In addition, a bug was discovered wrt event elevations, where ph5_validate does not register 0.0 as a valid entry in the elevation field of the event/shot table.
SEGY rev1: https://seg.org/Portals/0/SEG/News%20and%20Resources/Technical%20Standards/seg_y_rev1.pdf See trace header specification on pg15; event ID is in bytes 17-20 and station ID is in bytes 173-174
Station/array tables: Current behavior:
Desired behavior:
Event/shot tables Current behavior:
Desired behavior:
ph5_validate output current examples:
Event ID greater than 32,767 but less than 65,535:
Event ID not between 0 and 65,535, and "No Event location":
The event table entry for this event: