Commit df746752 authored by laura.gassner's avatar laura.gassner
Browse files

Merge branch 'thof/DENISE-import_Seitosh'

parents aca39e8a 628f7bb8
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
#-------------------------------------------------------- #--------------------------------------------------------
# edit here: # edit here:
CONTRIBDIR=../../..
include $(CONTRIBDIR)/Makefile_var
CC=gcc CC=gcc
......
# Makefile for Test_libstfinv # Makefile for Test_libstfinv
#
# Copyright (c) 2011 by Thomas Bohlen (KIT Karlsruhe) and Lisa Rehor (KIT Karlsruhe)
#
# This file was copied from the DENISE code and adjusted for its use
# in this test programme.
#
# ----
# DENISE is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DENISE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# ----
#-------------------------------------------------------- #--------------------------------------------------------
# edit here: # edit here:
CONTRIBDIR=../../..
include $(CONTRIBDIR)/Makefile_var
CC=gcc CC=gcc
......
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* Test_libstfinv.c * Test_libstfinv.c
* *
* Copyright (c) 2011 by Lisa Rehor (KIT Karlsruhe) * Copyright (c) 2011 by Lisa Rehor (KIT Karlsruhe) and Martin Schaefer (KIT Karlsruhe)
*
* ----
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ---------------------------------------------------------------------*/ * ---------------------------------------------------------------------*/
...@@ -171,7 +186,7 @@ for(tracl1=0;tracl1<ntr;tracl1++){ ...@@ -171,7 +186,7 @@ for(tracl1=0;tracl1<ntr;tracl1++){
/* storing the traces itself in a vector */ /* storing the traces itself in a vector */
for(j=0;j<ns;j++){ for(j=0;j<ns;j++){
dump=tr_add[1].data[j]; dump=tr_add[0].data[j];
add[j]=dump; add[j]=dump;
} }
......
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* fd.h - include file for FD programs * fd.h - include file for FD programs
*
* Copyright (c) 2011 by Thomas Bohlen (KIT Karlsruhe) and Lisa Rehor (KIT Karlsruhe)
* *
* This file was copied from the DENISE code and adjusted for its use * This file was copied from the DENISE code and adjusted for its use
* in this test programme. * in this test programme.
* For copyright information see the DENISE code. *
* ----
* DENISE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DENISE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* ---------------------------------------------------------------------*/ * ---------------------------------------------------------------------*/
/* files to include */ /* files to include */
......
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* globvar.h * globvar.h
* *
* Copyright (c) 2011 by Thomas Bohlen (KIT Karlsruhe) and Lisa Rehor (KIT Karlsruhe)
*
* This file was copied from the DENISE code and adjusted for its use * This file was copied from the DENISE code and adjusted for its use
* in this test programme. * in this test programme.
* For copyright information see the DENISE code. *
* ----
* DENISE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DENISE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* ----------------------------------------------------------------------*/ * ----------------------------------------------------------------------*/
/* definition of global variables used in the finite difference programs*/ /* definition of global variables used in the finite difference programs*/
......
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
* read_parameters.c * read_parameters.c
* *
* Copyright (c) 2011 by Thomas Bohlen (KIT Karlsruhe) and Lisa Rehor (KIT Karlsruhe)
*
* This file was copied from the DENISE code and adjusted for its use * This file was copied from the DENISE code and adjusted for its use
* in this test programme. * in this test programme.
* For copyright information see the DENISE code. *
* ----
* DENISE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* DENISE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* ---------------------------------------------------------------------*/ * ---------------------------------------------------------------------*/
......
/* Copyright (c) Colorado School of Mines, 1996.*/ /* Copyright (c) Colorado School of Mines, 2011.*/
/* All rights reserved. */ /* All rights reserved. */
/* This header file is part of the Seismic Unix (SU) package.
* For license information please see the file
* LEGAL_STATEMENT_segy_h.
*/
/* segy.h - include file for SEGY traces /* segy.h - include file for SEGY traces
* *
* declarations for: * declarations for:
...@@ -16,57 +21,101 @@ ...@@ -16,57 +21,101 @@
* Recommended Standards for Digital Tape Formats", * Recommended Standards for Digital Tape Formats",
* Geophysics, vol. 40, no. 2 (April 1975), P. 344-352. * Geophysics, vol. 40, no. 2 (April 1975), P. 344-352.
* *
* $Author: koehn $ * $Author: john $
* $Source: /home/tbohlen/CVSROOT/DENISE/src/segy.h,v $ * $Source: /usr/local/cwp/src/su/include/RCS/segy.h,v $
* $Revision: 1.1.1.1 $ ; $Date: 2007/11/21 22:44:52 $ * $Revision: 1.33 $ ; $Date: 2011/11/11 23:56:14 $
*/ */
#include <limits.h>
#ifndef SEGY_H #ifndef SEGY_H
#define SEGY_H #define SEGY_H
#define SU_NFLTS 32768 /* Arbitrary limit on data array size */ #define SU_NFLTS 65535 /* Arbitrary limit on data array size */
/* #define SU_NFLTS 32767 Arbitrary limit on data array size */
/* TYPEDEFS */ /* TYPEDEFS */
#ifdef _CRAY
typedef struct { /* segy - trace identification header */ typedef struct { /* segy - trace identification header */
signed tracl :32; /* trace sequence number within line */ int tracl; /* Trace sequence number within line
--numbers continue to increase if the
signed tracr :32; /* trace sequence number within reel */ same line continues across multiple
SEG Y files.
signed fldr :32; /* field record number */ byte# 1-4
*/
signed tracf :32; /* trace number within field record */
int tracr; /* Trace sequence number within SEG Y file
---each file starts with trace sequence
one
byte# 5-8
*/
int fldr; /* Original field record number
byte# 9-12
*/
signed ep :32; /* energy source point number */ int tracf; /* Trace number within original field record
byte# 13-16
*/
signed cdp :32; /* CDP ensemble number */ int ep; /* energy source point number
---Used when more than one record occurs
at the same effective surface location.
byte# 17-20
*/
signed cdpt :32; /* trace number within CDP ensemble */ int cdp; /* Ensemble number (i.e. CDP, CMP, CRP,...)
byte# 21-24
*/
signed trid :16; /* trace identification code: int cdpt; /* trace number within the ensemble
1 = seismic data ---each ensemble starts with trace number one.
2 = dead byte# 25-28
3 = dummy */
4 = time break
5 = uphole short trid; /* trace identification code:
6 = sweep -1 = Other
7 = timing 0 = Unknown
8 = water break 1 = Seismic data
9---, N = optional use (N = 32,767) 2 = Dead
3 = Dummy
4 = Time break
5 = Uphole
6 = Sweep
7 = Timing
8 = Water break
9 = Near-field gun signature
10 = Far-field gun signature
11 = Seismic pressure sensor
12 = Multicomponent seismic sensor
- Vertical component
13 = Multicomponent seismic sensor
- Cross-line component
14 = Multicomponent seismic sensor
- in-line component
15 = Rotated multicomponent seismic sensor
- Vertical component
16 = Rotated multicomponent seismic sensor
- Transverse component
17 = Rotated multicomponent seismic sensor
- Radial component
18 = Vibrator reaction mass
19 = Vibrator baseplate
20 = Vibrator estimated ground force
21 = Vibrator reference
22 = Time-velocity pairs
23 ... N = optional use
(maximum N = 32,767)
Following are CWP id flags: Following are CWP id flags:
9 = autocorrelation 109 = autocorrelation
110 = Fourier transformed - no packing
10 = Fourier transformed - no packing
xr[0],xi[0], ..., xr[N-1],xi[N-1] xr[0],xi[0], ..., xr[N-1],xi[N-1]
111 = Fourier transformed - unpacked Nyquist
11 = Fourier transformed - unpacked Nyquist
xr[0],xi[0],...,xr[N/2],xi[N/2] xr[0],xi[0],...,xr[N/2],xi[N/2]
112 = Fourier transformed - packed Nyquist
12 = Fourier transformed - packed Nyquist
even N: even N:
xr[0],xr[N/2],xr[1],xi[1], ..., xr[0],xr[N/2],xr[1],xi[1], ...,
xr[N/2 -1],xi[N/2 -1] xr[N/2 -1],xi[N/2 -1]
...@@ -75,726 +124,556 @@ typedef struct { /* segy - trace identification header */ ...@@ -75,726 +124,556 @@ typedef struct { /* segy - trace identification header */
xr[0],xr[(N-1)/2],xr[1],xi[1], ..., xr[0],xr[(N-1)/2],xr[1],xi[1], ...,
xr[(N-1)/2 -1],xi[(N-1)/2 -1],xi[(N-1)/2] xr[(N-1)/2 -1],xi[(N-1)/2 -1],xi[(N-1)/2]
(note the exceptional second & last entries) (note the exceptional second & last entries)
113 = Complex signal in the time domain
13 = Complex signal in the time domain
xr[0],xi[0], ..., xr[N-1],xi[N-1] xr[0],xi[0], ..., xr[N-1],xi[N-1]
114 = Fourier transformed - amplitude/phase
14 = Fourier transformed - amplitude/phase
a[0],p[0], ..., a[N-1],p[N-1] a[0],p[0], ..., a[N-1],p[N-1]
115 = Complex time signal - amplitude/phase
15 = Complex time signal - amplitude/phase
a[0],p[0], ..., a[N-1],p[N-1] a[0],p[0], ..., a[N-1],p[N-1]
116 = Real part of complex trace from 0 to Nyquist
16 = Real part of complex trace from 0 to Nyquist 117 = Imag part of complex trace from 0 to Nyquist
118 = Amplitude of complex trace from 0 to Nyquist
17 = Imag part of complex trace from 0 to Nyquist 119 = Phase of complex trace from 0 to Nyquist
121 = Wavenumber time domain (k-t)
18 = Amplitude of complex trace from 0 to Nyquist 122 = Wavenumber frequency (k-omega)
123 = Envelope of the complex time trace
19 = Phase of complex trace from 0 to Nyquist 124 = Phase of the complex time trace
125 = Frequency of the complex time trace
21 = Wavenumber time domain (k-t) 130 = Depth-Range (z-x) traces
201 = Seismic data packed to bytes (by supack1)
22 = Wavenumber frequency (k-omega) 202 = Seismic data packed to 2 bytes (by supack2)
byte# 29-30
23 = Envelope of the complex time trace
24 = Phase of the complex time trace
25 = Frequency of the complex time trace
30 = Depth-Range (z-x) traces
101 = Seismic data packed to bytes (by supack1)
102 = Seismic data packed to 2 bytes (by supack2)
*/ */
signed nvs :16; /* number of vertically summed traces (see vscode short nvs; /* Number of vertically summed traces yielding
in bhed structure) */ this trace. (1 is one trace,
2 is two summed traces, etc.)
signed nhs :16; /* number of horizontally summed traces (see vscode byte# 31-32
in bhed structure) */ */
signed duse :16; /* data use: short nhs; /* Number of horizontally summed traces yielding
1 = production this trace. (1 is one trace
2 = test */ 2 is two summed traces, etc.)
byte# 33-34
signed offset :32; /* distance from source point to receiver */
group (negative if opposite to direction
in which the line was shot) */ short duse; /* Data use:
1 = Production
signed gelev :32; /* receiver group elevation from sea level 2 = Test
(above sea level is positive) */ byte# 35-36
*/
signed selev :32; /* source elevation from sea level
(above sea level is positive) */ int offset; /* Distance from the center of the source point
to the center of the receiver group
signed sdepth :32; /* source depth (positive) */ (negative if opposite to direction in which
the line was shot).
signed gdel :32; /* datum elevation at receiver group */ byte# 37-40
*/
signed sdel :32; /* datum elevation at source */
int gelev; /* Receiver group elevation from sea level
signed swdep :32; /* water depth at source */ (all elevations above the Vertical datum are
positive and below are negative).
byte# 41-44
*/
int selev; /* Surface elevation at source.
byte# 45-48
*/
int sdepth; /* Source depth below surface (a positive number).
byte# 49-52
*/
int gdel; /* Datum elevation at receiver group.
byte# 53-56
*/
signed gwdep :32; /* water depth at receiver group */ int sdel; /* Datum elevation at source.
byte# 57-60
*/
signed scalel :16; /* scale factor for previous 7 entries int swdep; /* Water depth at source.
with value plus or minus 10 to the byte# 61-64
power 0, 1, 2, 3, or 4 (if positive, */
multiply, if negative divide) */
signed scalco :16; /* scale factor for next 4 entries int gwdep; /* Water depth at receiver group.
with value plus or minus 10 to the byte# 65-68
power 0, 1, 2, 3, or 4 (if positive, */
multiply, if negative divide) */
signed sx :32; /* X source coordinate */ short scalel; /* Scalar to be applied to the previous 7 entries
to give the real value.
Scalar = 1, +10, +100, +1000, +10000.
If positive, scalar is used as a multiplier,
if negative, scalar is used as a divisor.
byte# 69-70
*/
short scalco; /* Scalar to be applied to the next 4 entries
to give the real value.
Scalar = 1, +10, +100, +1000, +10000.
If positive, scalar is used as a multiplier,
if negative, scalar is used as a divisor.
byte# 71-72
*/
int sx; /* Source coordinate - X
byte# 73-76
*/
signed sy :32; /* Y source coordinate */ int sy; /* Source coordinate - Y
byte# 77-80
*/
signed gx :32; /* X group coordinate */ int gx; /* Group coordinate - X
byte# 81-84
*/
signed gy :32; /* Y group coordinate */ int gy; /* Group coordinate - Y
byte# 85-88
*/
signed counit :16; /* coordinate units code: short counit; /* Coordinate units: (for previous 4 entries and
for previous four entries for the 7 entries before scalel)
1 = length (meters or feet) 1 = Length (meters or feet)
2 = seconds of arc (in this case, the 2 = Seconds of arc
X values are longitude and the Y values 3 = Decimal degrees
are latitude, a positive value designates 4 = Degrees, minutes, seconds (DMS)
the number of seconds east of Greenwich
or north of the equator */ In case 2, the X values are longitude and
the Y values are latitude, a positive value designates
the number of seconds east of Greenwich
or north of the equator
In case 4, to encode +-DDDMMSS
counit = +-DDD*10^4 + MM*10^2 + SS,
with scalco = 1. To encode +-DDDMMSS.ss
counit = +-DDD*10^6 + MM*10^4 + SS*10^2
with scalco = -100.
byte# 89-90
*/
signed wevel :16; /* weathering velocity */ short wevel; /* Weathering velocity.
byte# 91-92
*/
signed swevel :16; /* subweathering velocity */ short swevel; /* Subweathering velocity.
byte# 93-94
*/
signed sut :16; /* uphole time at source */ short sut; /* Uphole time at source in milliseconds.
byte# 95-96
*/
signed gut :16; /* uphole time at receiver group */ short gut; /* Uphole time at receiver group in milliseconds.
byte# 97-98
*/
signed sstat :16; /* source static correction */ short sstat; /* Source static correction in milliseconds.
byte# 99-100
*/
signed gstat :16; /* group static correction */ short gstat; /* Group static correction in milliseconds.
byte# 101-102
*/
signed tstat :16; /* total static applied */ short tstat; /* Total static applied in milliseconds.
(Zero if no static has been applied.)
byte# 103-104
*/
signed laga :16; /* lag time A, time in ms between end of 240- short laga; /* Lag time A, time in ms between end of 240-