Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milliseconds from Traceheader #581

Open
Kurtaja opened this issue Sep 24, 2024 · 0 comments
Open

Milliseconds from Traceheader #581

Kurtaja opened this issue Sep 24, 2024 · 0 comments

Comments

@Kurtaja
Copy link

Kurtaja commented Sep 24, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant