Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GPIAG-Software
IFOS2D
Commits
df746752
Commit
df746752
authored
Nov 11, 2015
by
laura.gassner
Browse files
Merge branch 'thof/DENISE-import_Seitosh'
parents
aca39e8a
628f7bb8
Changes
190
Hide whitespace changes
Inline
Side-by-side
contrib/stfinv/test_libstfinv/src/Makefile
View file @
df746752
...
...
@@ -24,6 +24,9 @@
#--------------------------------------------------------
# edit here:
CONTRIBDIR
=
../../..
include
$(CONTRIBDIR)/Makefile_var
CC
=
gcc
...
...
contrib/stfinv/test_libstfinv_withpairs/src/Makefile
View file @
df746752
# 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:
CONTRIBDIR
=
../../..
include
$(CONTRIBDIR)/Makefile_var
CC
=
gcc
...
...
contrib/stfinv/test_libstfinv_withpairs/src/Test_libstfinv.c
View file @
df746752
/*------------------------------------------------------------------------
* 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++){
/* storing the traces itself in a vector */
for
(
j
=
0
;
j
<
ns
;
j
++
){
dump
=
tr_add
[
1
].
data
[
j
];
dump
=
tr_add
[
0
].
data
[
j
];
add
[
j
]
=
dump
;
}
...
...
contrib/stfinv/test_libstfinv_withpairs/src/fd.h
View file @
df746752
/*------------------------------------------------------------------------
* 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
* 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 */
...
...
contrib/stfinv/test_libstfinv_withpairs/src/globvar.h
View file @
df746752
/*------------------------------------------------------------------------
* 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
* 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*/
...
...
contrib/stfinv/test_libstfinv_withpairs/src/read_parameters.c
View file @
df746752
/*------------------------------------------------------------------------
* 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
* 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
*
* ---------------------------------------------------------------------*/
...
...
contrib/stfinv/test_libstfinv_withpairs/src/segy.h
View file @
df746752
/* Copyright (c) Colorado School of Mines,
1996
.*/
/* Copyright (c) Colorado School of Mines,
2011
.*/
/* 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
*
* declarations for:
...
...
@@ -16,57 +21,101 @@
* Recommended Standards for Digital Tape Formats",
* Geophysics, vol. 40, no. 2 (April 1975), P. 344-352.
*
* $Author:
koe
hn $
* $Source: /
home/tbohlen/CVSROOT/DENISE/src
/segy.h,v $
* $Revision: 1.
1.1.1
$ ; $Date: 20
07
/11/
2
1 2
2:44:52
$
* $Author:
jo
hn $
* $Source: /
usr/local/cwp/src/su/include/RCS
/segy.h,v $
* $Revision: 1.
33
$ ; $Date: 20
11
/11/
1
1 2
3:56:14
$
*/
#include <limits.h>
#ifndef 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 */
#ifdef _CRAY
typedef
struct
{
/* segy - trace identification header */
signed
tracl
:
32
;
/* trace sequence number within line */
signed
tracr
:
32
;
/* trace sequence number within reel */
signed
fldr
:
32
;
/* field record number */
signed
tracf
:
32
;
/* trace number within field record */
int
tracl
;
/* Trace sequence number within line
--numbers continue to increase if the
same line continues across multiple
SEG Y files.
byte# 1-4
*/
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:
1 = seismic data
2 = dead
3 = dummy
4 = time break
5 = uphole
6 = sweep
7 = timing
8 = water break
9---, N = optional use (N = 32,767)
int
cdpt
;
/* trace number within the ensemble
---each ensemble starts with trace number one.
byte# 25-28
*/
short
trid
;
/* trace identification code:
-1 = Other
0 = Unknown
1 = Seismic data
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:
9 = autocorrelation
10 = Fourier transformed - no packing
109 = autocorrelation
110 = Fourier transformed - no packing
xr[0],xi[0], ..., xr[N-1],xi[N-1]
11 = Fourier transformed - unpacked Nyquist
111 = Fourier transformed - unpacked Nyquist
xr[0],xi[0],...,xr[N/2],xi[N/2]
12 = Fourier transformed - packed Nyquist
112 = Fourier transformed - packed Nyquist
even N:
xr[0],xr[N/2],xr[1],xi[1], ...,
xr[N/2 -1],xi[N/2 -1]
...
...
@@ -75,726 +124,556 @@ typedef struct { /* segy - trace identification header */
xr[0],xr[(N-1)/2],xr[1],xi[1], ...,
xr[(N-1)/2 -1],xi[(N-1)/2 -1],xi[(N-1)/2]
(note the exceptional second & last entries)
13 = Complex signal in the time domain
113 = Complex signal in the time domain
xr[0],xi[0], ..., xr[N-1],xi[N-1]
14 = Fourier transformed - amplitude/phase
114 = Fourier transformed - amplitude/phase
a[0],p[0], ..., a[N-1],p[N-1]
15 = Complex time signal - amplitude/phase
115 = Complex time signal - amplitude/phase
a[0],p[0], ..., a[N-1],p[N-1]
16 = Real part of complex trace from 0 to Nyquist
17 = Imag part of complex trace from 0 to Nyquist
18 = Amplitude of complex trace from 0 to Nyquist
19 = Phase of complex trace from 0 to Nyquist
21 = Wavenumber time domain (k-t)
22 = Wavenumber frequency (k-omega)
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)
116 = 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
119 = Phase of complex trace from 0 to Nyquist
121 = Wavenumber time domain (k-t)
122 = Wavenumber frequency (k-omega)
123 = Envelope of the complex time trace
124 = Phase of the complex time trace
125 = Frequency of the complex time trace
130 = Depth-Range (z-x) traces
201 = Seismic data packed to bytes (by supack1)
202 = Seismic data packed to 2 bytes (by supack2)
byte# 29-30
*/
signed
nvs
:
16
;
/* number of vertically summed traces (see vscode
in bhed structure) */
signed
nhs
:
16
;
/* number of horizontally summed traces (see vscode
in bhed structure) */
signed
duse
:
16
;
/* data use:
1 = production
2 = test */
signed
offset
:
32
;
/* distance from source point to receiver
group (negative if opposite to direction
in which the line was shot) */
signed
gelev
:
32
;
/* receiver group elevation from sea level
(above sea level is positive) */
signed
selev
:
32
;
/* source elevation from sea level
(above sea level is positive) */
signed
sdepth
:
32
;
/* source depth (positive) */
signed
gdel
:
32
;
/* datum elevation at receiver group */
signed
sdel
:
32
;
/* datum elevation at source */
signed
swdep
:
32
;
/* water depth at source */
short
nvs
;
/* Number of vertically summed traces yielding
this trace. (1 is one trace,
2 is two summed traces, etc.)
byte# 31-32
*/
short
nhs
;
/* Number of horizontally summed traces yielding
this trace. (1 is one trace
2 is two summed traces, etc.)
byte# 33-34
*/
short
duse
;
/* Data use:
1 = Production
2 = Test
byte# 35-36
*/
int
offset
;
/* Distance from the center of the source point
to the center of the receiver group
(negative if opposite to direction in which
the line was shot).
byte# 37-40
*/
int
gelev
;
/* Receiver group elevation from sea level
(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
with value plus or minus 10 to the
power 0, 1, 2, 3, or 4 (if positive,
multiply, if negative divide) */
int
swdep
;
/* Water depth at source.
byte# 61-64
*/
signed
scalco
:
16
;
/* scale factor for next 4 entries
with value plus or minus 10 to the
power 0, 1, 2, 3, or 4 (if positive,
multiply, if negative divide) */
int
gwdep
;
/* Water depth at receiver group.
byte# 65-68
*/
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:
for previous four entries
1 = length (meters or feet)
2 = seconds of arc (in this case, 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 */
short
counit
;
/* Coordinate units: (for previous 4 entries and
for the 7 entries before scalel)
1 = Length (meters or feet)
2 = Seconds of arc
3 = Decimal degrees
4 = Degrees, minutes, seconds (DMS)
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
*/
s
igned
laga
:
16
;
/*
l
ag time A, time in ms between end of 240-
s
hort
laga
;
/*
L
ag time A, time in ms between end of 240-
byte trace identification header and time
break, positive if time break occurs after
end of header, time break is defined as
the initiation pulse which maybe recorded
on an auxiliary trace or as otherwise
specified by the recording system */
specified by the recording system
byte# 105-106
*/
s
igned
lagb
:
16
;
/* lag time B, time in ms between the time break
s
hort
lagb
;
/* lag time B, time in ms between the time break
and the initiation time of the energy source,
may be positive or negative */
may be positive or negative
byte# 107-108
*/
s
igned
delrt
:
16
;
/* delay recording time, time in ms between
s
hort
delrt
;
/* delay recording time, time in ms between
initiation time of energy source and time
when recording of data samples begins
(for deep water work if recording does not
start at zero time) */
start at zero time)
byte# 109-110
*/
signed
muts
:
16
;
/* mute time--start */
short
muts
;
/* mute time--start
byte# 111-112
*/
signed
mute
:
16
;
/* mute time--end */
short
mute
;
/* mute time--end
byte# 113-114
*/
unsigned
ns
:
16
;
/* number of samples in this trace */
unsigned
short
ns
;
/* number of samples in this trace
byte# 115-116
*/
unsigned
dt
:
16
;
/* sample interval; in micro-seconds */
unsigned
short
dt
;
/* sample interval; in micro-seconds
byte# 117-118
*/
s
igned
gain
:
16
;
/* gain type of field instruments code:
s
hort
gain
;
/* gain type of field instruments code:
1 = fixed
2 = binary
3 = floating point
4 ---- N = optional use */
4 ---- N = optional use
byte# 119-120
*/
signed
igc
:
16
;
/* instrument gain constant */
short
igc
;
/* instrument gain constant