GithubHelp home page GithubHelp logo

unpluggedsegy's Introduction

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 [email protected]

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:

unpluggedsegy's People

Contributors

jfoshee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unpluggedsegy's Issues

when i open xx.sgy file.then throw a Exception, System.OverflowException?

System.OverflowException
HResult=0x80131516
Message=算术运算导致溢出。
Source=Unplugged.Segy
StackTrace:
在 Unplugged.Segy.SegyReader.ReadTrace(BinaryReader reader, FormatCode sampleFormat, Int32 sampleCount, Boolean isLittleEndian)
在 Unplugged.Segy.SegyReader.ReadTrace(BinaryReader reader, FormatCode sampleFormat, Boolean isLittleEndian)
在 Unplugged.Segy.SegyReader.Read(Stream stream, Int32 traceCount, IReadingProgress progress)
在 Unplugged.Segy.SegyReader.Read(Stream stream, IReadingProgress progress)
在 Unplugged.Segy.SegyReader.Read(String path, IReadingProgress progress)
在 Aeroiot.Win1.Form1.sgy_btn_Click(Object sender, EventArgs e) 在 D:\DEV\Aeroiot.WinForm\Aeroiot.Win1\Form1.cs 中: 第 40 行
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 Sunny.UI.UIButton.OnClick(EventArgs e) 在 D:\DEV\Aeroiot.WinForm\SunnyUI\Controls\UIButton.cs 中: 第 80 行
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 Aeroiot.Win1.Program.Main() 在 D:\DEV\Aeroiot.WinForm\Aeroiot.Win1\Program.cs 中: 第 19 行

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.