0

hi everyone,
how are you! i need a c program to read a Segy format file. i hope that the program can output the trace header and seismic data information in ASCII format, who can help me ? Thank you very much!

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Salem
0
#include "stdio.h" 
main() 
{ 

FILE *IN,*OUT; 
short V3200[3200];
int V400[400];
int   H60[60];
float Data[1000];

IN=fopen("PRD99993DJILIN.segy","rb"); 
 
fread(V3200,sizeof(short),3200/sizeof(short),IN);
fread(V400,sizeof(short),12,IN);
fread(H60,sizeof(int),240/sizeof(int),IN);
fread(Data,4,1000,IN); 

fclose(IN); 
}

this is my c program to read segy format data. IN array H60[60] and Data[1000], the value is not my expected value.

0

"This directory contains the source code and shell scripts necessary to convert SEGY files to ASCII format and to create postscript plots, along with a makefile and a README file."

I found that with an obvious web search.
Is it what you want?
Can you guess what I typed?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.