UnpluggedSegy
SEG-Y Reading in C#
Install / Use
/learn @jfoshee/UnpluggedSegyREADME
SEG-Y Reading Library in C#
SEG-Y is a file format for seismic image data. It is also known as SEGY or SGY.
Issues and sample data welcome.
Example
using System;
using Unplugged.Segy;
var reader = new SegyReader();
ISegyFile line = reader.Read(@"RMOTC Seismic data set\2D_Seismic\NormalizedMigrated_segy\lineA.sgy");
ITrace trace = line.Traces[0];
double mean = 0;
double max = double.MinValue;
double min = double.MaxValue;
foreach (var sampleValue in trace.Values)
{
mean += sampleValue / trace.Values.Count;
if (sampleValue < min) min = sampleValue;
if (sampleValue > max) max = sampleValue;
}
Console.WriteLine(min);
Console.WriteLine(max);
Console.WriteLine(mean);
Supported Sample Formats
- IBM Floating Point 4 (Big Endian)
- IEEE Floating Point 4 (Little Endian)
- Two's Complement Integer 4 (Big and Little Endian)
- Two's Complement Integer 2 (Big and Little Endian)
- Two's Complement Integer 1
Current Known Limitations
- Assumed to be built on Little Endian architecture
- Sample Format not supported: Fixed Point With Gain 4
- Extended Text Headers are not supported
- Writing SEGY files is not supported
If you have example files of unsupported formats or feature requests, they would be appreciated! Please, send to dev@segy.net
Acknowledgements
Example data is courtesy of the Rocky Mountian Oilfield Testing Center and the U.S. Department of Energy
Resources on the SEG-Y format:
- http://walter.kessinger.com/work/segy.html
- http://en.wikipedia.org/wiki/SEG_Y
- http://www.seg.org/documents/10161/77915/seg_y_rev1.pdf
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
