|
1 | 1 | /* Make a velocity function v(x,y,z)*/
|
2 | 2 | /*
|
3 |
| - Copyright (C) 2004 University of Texas at Austin |
| 3 | + Copyright � 2007, Colorado School of Mines, |
| 4 | + All rights reserved. |
4 | 5 |
|
5 |
| - This program is free software; you can redistribute it and/or modify |
6 |
| - it under the terms of the GNU General Public License as published by |
7 |
| - the Free Software Foundation; either version 2 of the License, or |
8 |
| - (at your option) any later version. |
9 | 6 |
|
10 |
| - This program is distributed in the hope that it will be useful, |
11 |
| - but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
| - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
| - GNU General Public License for more details. |
| 7 | + Redistribution and use in source and binary forms, with or |
| 8 | + without modification, are permitted provided that the following |
| 9 | + conditions are met: |
14 | 10 |
|
15 |
| - You should have received a copy of the GNU General Public License |
16 |
| - along with this program; if not, write to the Free Software |
17 |
| - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 11 | + * Redistributions of source code must retain the above copyright |
| 12 | + notice, this list of conditions and the following disclaimer. |
| 13 | + * Redistributions in binary form must reproduce the above |
| 14 | + copyright notice, this list of conditions and the following |
| 15 | + disclaimer in the documentation and/or other materials provided |
| 16 | + with the distribution. |
| 17 | + * Neither the name of the Colorado School of Mines nor the names of |
| 18 | + its contributors may be used to endorse or promote products |
| 19 | + derived from this software without specific prior written permission. |
| 20 | + |
| 21 | + Warranty Disclaimer: |
| 22 | + THIS SOFTWARE IS PROVIDED BY THE COLORADO SCHOOL OF MINES AND CONTRIBUTORS |
| 23 | + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 24 | + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 25 | + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 26 | + COLORADO SCHOOL OF MINES OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 27 | + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 28 | + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 29 | + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 30 | + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 31 | + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
| 32 | + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 33 | + POSSIBILITY OF SUCH DAMAGE. |
| 34 | + |
| 35 | + |
| 36 | + Export Restriction Disclaimer: |
| 37 | + We believe that CWP/SU: Seismic Un*x is a low technology product that does |
| 38 | + not appear on the Department of Commerce CCL list of restricted exports. |
| 39 | + Accordingly, we believe that our product meets the qualifications of |
| 40 | + an ECCN (export control classification number) of EAR99 and we believe |
| 41 | + it fits the qualifications of NRR (no restrictions required), and |
| 42 | + is thus not subject to export restrictions of any variety. |
| 43 | + |
| 44 | + Approved Reference Format: |
| 45 | + In publications, please refer to SU as per the following example: |
| 46 | + Cohen, J. K. and Stockwell, Jr. J. W., (200_), CWP/SU: Seismic Un*x |
| 47 | + Release No. __: an open source software package for seismic |
| 48 | + research and processing, |
| 49 | + Center for Wave Phenomena, Colorado School of Mines. |
| 50 | + |
| 51 | + Articles about SU in peer-reviewed journals: |
| 52 | + Saeki, T., (1999), A guide to Seismic Un*x (SU)(2)---examples of data processing (part 1), data input and preparation of headers, Butsuri-Tansa (Geophysical Exploration), vol. 52, no. 5, 465-477. |
| 53 | + Stockwell, Jr. J. W. (1999), The CWP/SU: Seismic Un*x Package, Computers and Geosciences, May 1999. |
| 54 | + Stockwell, Jr. J. W. (1997), Free Software in Education: A case study of CWP/SU: Seismic Un*x, The Leading Edge, July 1997. |
| 55 | + Templeton, M. E., Gough, C.A., (1998), Web Seismic Un*x: Making seismic reflection processing more accessible, Computers and Geosciences. |
| 56 | + |
| 57 | + Acknowledgements: |
| 58 | + SU stands for CWP/SU:Seismic Un*x, a processing line developed at Colorado |
| 59 | + School of Mines, partially based on Stanford Exploration Project (SEP) |
| 60 | + software. |
18 | 61 | */
|
| 62 | +/* Modified by Tariq Alkhalifah for inclusion with Madagascar. */ |
19 | 63 |
|
20 | 64 | #include <math.h>
|
21 | 65 |
|
22 | 66 | #include <rsf.h>
|
23 |
| - |
24 |
| -#include "frannor.h" |
25 |
| - |
26 |
| -#define PI 3.14159265359 |
27 |
| - |
28 |
| - |
| 67 | +#include <su.h> |
29 | 68 |
|
30 | 69 | /*
|
31 | 70 | * Extracted from CWP Author: Dave Hale
|
@@ -130,8 +169,8 @@ main (int argc, char **argv)
|
130 | 169 | sf_putfloat(out,"o3",fy);
|
131 | 170 |
|
132 | 171 | /* compute chirp constants */
|
133 |
| - bc = PI/(z2c-z1c)*(1.0/l2c-1.0/l1c); |
134 |
| - ac = 2.0*PI/l1c - 2.0*bc*z1c; |
| 172 | + bc = SF_PI/(z2c-z1c)*(1.0/l2c-1.0/l1c); |
| 173 | + ac = 2.0*SF_PI/l1c - 2.0*bc*z1c; |
135 | 174 |
|
136 | 175 | /* allocate space */
|
137 | 176 | v = sf_floatalloc(nz);
|
|
0 commit comments