Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jfoshee/unpluggedsegy
SEG-Y Reading in C#
https://github.com/jfoshee/unpluggedsegy
Last synced: about 2 months ago
JSON representation
SEG-Y Reading in C#
- Host: GitHub
- URL: https://github.com/jfoshee/unpluggedsegy
- Owner: jfoshee
- License: other
- Created: 2011-12-17T00:24:04.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T09:33:06.000Z (almost 2 years ago)
- Last Synced: 2023-03-11T11:46:56.616Z (almost 2 years ago)
- Language: C#
- Homepage: http://segy.net
- Size: 3.52 MB
- Stars: 25
- Watchers: 8
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# 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
```C#
using System;
using Unplugged.Segy;
``````C#
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 supportedIf you have example files of unsupported formats or feature requests, they would be appreciated! Please, send to
### Acknowledgements
Example data is courtesy of the [Rocky Mountian Oilfield Testing Center](http://www.rmotc.doe.gov/) 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