"""SEG-Y trace header definitions."""

from segy.standards.fields.base import SegStandardEnum


# fmt: off
class Rev0(SegStandardEnum):
    """Definition of SEG-Y Rev0 trace headers."""

    TRACE_SEQ_NUM_LINE          = (1, "int32")
    TRACE_SEQ_NUM_REEL          = (5, "int32")
    ORIG_FIELD_RECORD_NUM       = (9, "int32")
    TRACE_NUM_ORIG_RECORD       = (13, "int32")
    ENERGY_SOURCE_POINT_NUM     = (17, "int32")
    ENSEMBLE_NUM                = (21, "int32")
    TRACE_NUM_ENSEMBLE          = (25, "int32")
    TRACE_ID_CODE               = (29, "int16")
    VERTICALLY_SUMMED_TRACES    = (31, "int16")
    HORIZONTALLY_STACKED_TRACES = (33, "int16")
    DATA_USE                    = (35, "int16")
    SOURCE_TO_RECEIVER_DISTANCE = (37, "int32")
    RECEIVER_GROUP_ELEVATION    = (41, "int32")
    SOURCE_SURFACE_ELEVATION    = (45, "int32")
    SOURCE_DEPTH_BELOW_SURFACE  = (49, "int32")
    RECEIVER_DATUM_ELEVATION    = (53, "int32")
    SOURCE_DATUM_ELEVATION      = (57, "int32")
    SOURCE_WATER_DEPTH          = (61, "int32")
    RECEIVER_WATER_DEPTH        = (65, "int32")
    ELEVATION_DEPTH_SCALAR      = (69, "int16")
    COORDINATE_SCALAR           = (71, "int16")
    SOURCE_COORD_X              = (73, "int32")
    SOURCE_COORD_Y              = (77, "int32")
    GROUP_COORD_X               = (81, "int32")
    GROUP_COORD_Y               = (85, "int32")
    COORDINATE_UNIT             = (89, "int16")
    WEATHERING_VELOCITY         = (91, "int16")
    SUBWEATHERING_VELOCITY      = (93, "int16")
    SOURCE_UPHOLE_TIME          = (95, "int16")
    GROUP_UPHOLE_TIME           = (97, "int16")
    SOURCE_STATIC_CORRECTION    = (99, "int16")
    RECEIVER_STATIC_CORRECTION  = (101, "int16")
    TOTAL_STATIC_APPLIED        = (103, "int16")
    LAG_TIME_A                  = (105, "int16")
    LAG_TIME_B                  = (107, "int16")
    DELAY_RECORDING_TIME        = (109, "int16")
    MUTE_TIME_START             = (111, "int16")
    MUTE_TIME_END               = (113, "int16")
    SAMPLES_PER_TRACE           = (115, "int16")
    SAMPLE_INTERVAL             = (117, "int16")
    INSTRUMENT_GAIN_TYPE        = (119, "int16")
    INSTRUMENT_GAIN_CONST       = (121, "int16")
    INSTRUMENT_GAIN_INITIAL     = (123, "int16")
    CORRELATED_DATA             = (125, "int16")
    SWEEP_FREQ_START            = (127, "int16")
    SWEEP_FREQ_END              = (129, "int16")
    SWEEP_LENGTH                = (131, "int16")
    SWEEP_TYPE                  = (133, "int16")
    SWEEP_TAPER_START           = (135, "int16")
    SWEEP_TAPER_END             = (137, "int16")
    TAPER_TYPE                  = (139, "int16")
    ALIAS_FILTER_FREQ           = (141, "int16")
    ALIAS_FILTER_SLOPE          = (143, "int16")
    NOTCH_FILTER_FREQ           = (145, "int16")
    NOTCH_FILTER_SLOPE          = (147, "int16")
    LOW_CUT_FREQ                = (149, "int16")
    HIGH_CUT_FREQ               = (151, "int16")
    LOW_CUT_SLOPE               = (153, "int16")
    HIGH_CUT_SLOPE              = (155, "int16")
    YEAR_RECORDED               = (157, "int16")
    DAY_OF_YEAR                 = (159, "int16")
    HOUR_OF_DAY                 = (161, "int16")
    MINUTE_OF_HOUR              = (163, "int16")
    SECOND_OF_MINUTE            = (165, "int16")
    TIME_BASIS_CODE             = (167, "int16")
    TRACE_WEIGHTING_FACTOR      = (169, "int16")
    GROUP_NUM_ROLL_SWITCH       = (171, "int16")
    GROUP_NUM_FIRST_TRACE       = (173, "int16")
    GROUP_NUM_LAST_TRACE        = (175, "int16")
    GAP_SIZE                    = (177, "int16")
    TAPER_OVERTRAVEL            = (179, "int16")


class Rev1(SegStandardEnum):
    """Definition of SEG-Y Rev1 trace headers."""

    CDP_X                       = (181, "int32")
    CDP_Y                       = (185, "int32")
    INLINE                      = (189, "int32")
    CROSSLINE                   = (193, "int32")
    SHOT_POINT                  = (197, "int32")
    SHOT_POINT_SCALAR           = (201, "int16")
    TRACE_VALUE_UNIT            = (203, "int16")
    TRANSDUCTION_CONST_MANTISSA = (205, "int32")
    TRANSDUCTION_CONST_EXPONENT = (209, "int16")
    TRANSDUCTION_UNIT           = (211, "int16")
    DEVICE_TRACE_ID             = (213, "int16")
    TIMES_SCALAR                = (215, "int16")
    SOURCE_TYPE_ORIENTATION     = (217, "int16")
    SOURCE_ENERGY_DIR_MANTISSA  = (219, "int32")
    SOURCE_ENERGY_DIR_EXPONENT  = (223, "int16")
    SOURCE_MEASUREMENT_MANTISSA = (225, "int32")
    SOURCE_MEASUREMENT_EXPONENT = (229, "int16")
    SOURCE_MEASUREMENT_UNIT     = (231, "int16")


class Rev2(SegStandardEnum):
    """Definition of SEG-Y Rev2 trace headers."""

    TRACE_HEADER_NAME           = (233, "S8")
# fmt: on
