Skip to content

Milliseconds from Traceheader #581

@Kurtaja

Description

@Kurtaja

Hi everyone,
In the snippet below, I'm able to read the timestamp from the trace header with second-level precision. However, I couldn't find any attributes in TraceField that provide sub-second precision, such as milliseconds or microseconds. I assume there's a way to access this data, but I'm struggling to figure it out. I would appreciate any guidance to help me get past this issue.
...
for iTraceIndex in range(len(segy_file.trace)):
try:
diTraceHeader = segy_file.header[iTraceIndex]
iYear = diTraceHeader[segyio.TraceField.YearDataRecorded]
iDayOfYear = diTraceHeader[segyio.TraceField.DayOfYear]
iHour = diTraceHeader[segyio.TraceField.HourOfDay]
iMinute = diTraceHeader[segyio.TraceField.MinuteOfHour]
iSecond = diTraceHeader[segyio.TraceField.SecondOfMinute]
...
PS: probably evident, but I'm relatively novice to segy.
Kind regards
Kurt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions