Skip to content

Commit 243c16e

Browse files
committed
Cleanup magic numbers in coordinate unit getter
1 parent 9da6616 commit 243c16e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mdio/ingestion/segy/coordinates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def _get_spatial_coordinate_unit(segy_file_info: SegyFileInfo) -> LengthUnitMode
104104
"""Get the coordinate unit from the SEG-Y headers."""
105105
measurement_system_code = int(segy_file_info.binary_header_dict[MEASUREMENT_SYSTEM_KEY])
106106

107-
if measurement_system_code not in (1, 2):
107+
if measurement_system_code not in {s.value for s in SegyMeasurementSystem}:
108108
logger.warning(
109109
"Unexpected value in coordinate unit (%s) header: %s. Can't extract coordinate unit and will "
110110
"ingest without coordinate units.",

0 commit comments

Comments
 (0)