« lib/App/SeismicUnixGui/sunix/header/suaddhead.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/migration/sumigsplit.pm »
| 1 | package App::SeismicUnixGui::sunix::migration::sumigffd; | ||
| 2 | |||
| 3 | =head2 SYNOPSIS | ||
| 4 | |||
| 5 | PERL PROGRAM NAME: | ||
| 6 | |||
| 7 | AUTHOR: Juan Lorenzo (Perl module only) | ||
| 8 | |||
| 9 | DATE: | ||
| 10 | |||
| 11 | DESCRIPTION: | ||
| 12 | |||
| 13 | Version: | ||
| 14 | |||
| 15 | =head2 USE | ||
| 16 | |||
| 17 | =head3 NOTES | ||
| 18 | |||
| 19 | =head4 Examples | ||
| 20 | |||
| 21 | =head2 SYNOPSIS | ||
| 22 | |||
| 23 | =head3 SEISMIC UNIX NOTES | ||
| 24 | SUMIGFFD - Fourier finite difference depth migration for | ||
| 25 | |||
| 26 | zero-offset data. This method is a hybrid migration which | ||
| 27 | |||
| 28 | combines the advantages of phase shift and finite difference", | ||
| 29 | |||
| 30 | migrations. | ||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | sumigffd <infile >outfile vfile= [optional parameters] | ||
| 35 | |||
| 36 | |||
| 37 | |||
| 38 | Required Parameters: | ||
| 39 | |||
| 40 | nz= number of depth sapmles ", | ||
| 41 | |||
| 42 | dz= depth sampling interval | ||
| 43 | |||
| 44 | vfile= name of file containing velocities | ||
| 45 | |||
| 46 | |||
| 47 | |||
| 48 | Optional Parameters: | ||
| 49 | |||
| 50 | dt=from header(dt) or .004 time sampling interval | ||
| 51 | |||
| 52 | dx=from header(d2) or 1.0 midpoint sampling interval | ||
| 53 | |||
| 54 | ft=0.0 first time sample | ||
| 55 | |||
| 56 | fz=0.0 first depth sample | ||
| 57 | |||
| 58 | |||
| 59 | |||
| 60 | tmpdir= if non-empty, use the value as a directory path | ||
| 61 | |||
| 62 | prefix for storing temporary files; else if the | ||
| 63 | |||
| 64 | the CWP_TMPDIR environment variable is set use | ||
| 65 | |||
| 66 | its value for the path; else use tmpfile() | ||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | The input velocity file \'vfile\' consists of C-style binary floats. ", | ||
| 71 | |||
| 72 | The structure of this file is vfile[iz][ix]. Note that this means that | ||
| 73 | |||
| 74 | the x-direction is the fastest direction instead of z-direction! Such a | ||
| 75 | |||
| 76 | structure is more convenient for the downward continuation type | ||
| 77 | |||
| 78 | migration algorithm than using z as fastest dimension as in other SU ", | ||
| 79 | |||
| 80 | programs. (In C v[iz][ix] denotes a v(x,z) array, whereas v[ix][iz] | ||
| 81 | |||
| 82 | denotes a v(z,x) array, the opposite of what Matlab and Fortran | ||
| 83 | |||
| 84 | programmers may expect.) ", | ||
| 85 | |||
| 86 | |||
| 87 | |||
| 88 | Because most of the tools in the SU package (such as unif2, unisam2, ", | ||
| 89 | |||
| 90 | and makevel) produce output with the structure vfile[ix][iz], you will | ||
| 91 | |||
| 92 | need to transpose the velocity files created by these programs. You may | ||
| 93 | |||
| 94 | use the SU program \'transp\' in SU to transpose such files into the | ||
| 95 | |||
| 96 | required vfile[iz][ix] structure. | ||
| 97 | |||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | |||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | |||
| 106 | Credits: CWP Baoniu Han, July 21th, 1997 | ||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | |||
| 112 | Trace header fields accessed: ns, dt, delrt, d2 | ||
| 113 | |||
| 114 | Trace header fields modified: ns, dt, delrt | ||
| 115 | |||
| 116 | |||
| 117 | |||
| 118 | =head2 User's notes (Juan Lorenzo) | ||
| 119 | untested | ||
| 120 | |||
| 121 | =cut | ||
| 122 | |||
| 123 | |||
| 124 | =head2 CHANGES and their DATES | ||
| 125 | |||
| 126 | =cut | ||
| 127 | |||
| 128 | use Moose; | ||
| 129 | our $VERSION = '0.0.1'; | ||
| 130 | |||
| 131 | |||
| 132 | =head2 Import packages | ||
| 133 | |||
| 134 | =cut | ||
| 135 | |||
| 136 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 137 | |||
| 138 | use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su); | ||
| 139 | use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config'; | ||
| 140 | |||
| 141 | |||
| 142 | =head2 instantiation of packages | ||
| 143 | |||
| 144 | =cut | ||
| 145 | |||
| 146 | my $get = L_SU_global_constants->new(); | ||
| 147 | my $Project = Project_config->new(); | ||
| 148 | my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU(); | ||
| 149 | my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN(); | ||
| 150 | my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT(); | ||
| 151 | |||
| 152 | my $PS_SEISMIC = $Project->PS_SEISMIC(); | ||
| 153 | |||
| 154 | my $var = $get->var(); | ||
| 155 | my $on = $var->{_on}; | ||
| 156 | my $off = $var->{_off}; | ||
| 157 | my $true = $var->{_true}; | ||
| 158 | my $false = $var->{_false}; | ||
| 159 | my $empty_string = $var->{_empty_string}; | ||
| 160 | |||
| 161 | =head2 Encapsulated | ||
| 162 | hash of private variables | ||
| 163 | |||
| 164 | =cut | ||
| 165 | |||
| 166 | my $sumigffd = { | ||
| 167 | _dt => '', | ||
| 168 | _dx => '', | ||
| 169 | _dz => '', | ||
| 170 | _ft => '', | ||
| 171 | _fz => '', | ||
| 172 | _nz => '', | ||
| 173 | _tmpdir => '', | ||
| 174 | _vfile => '', | ||
| 175 | _Step => '', | ||
| 176 | _note => '', | ||
| 177 | |||
| 178 | }; | ||
| 179 | |||
| 180 | =head2 sub Step | ||
| 181 | |||
| 182 | collects switches and assembles bash instructions | ||
| 183 | by adding the program name | ||
| 184 | |||
| 185 | =cut | ||
| 186 | |||
| 187 | sub Step { | ||
| 188 | |||
| 189 | $sumigffd->{_Step} = 'sumigffd'.$sumigffd->{_Step}; | ||
| 190 | return ( $sumigffd->{_Step} ); | ||
| 191 | |||
| 192 | } | ||
| 193 | |||
| 194 | |||
| 195 | =head2 sub note | ||
| 196 | |||
| 197 | collects switches and assembles bash instructions | ||
| 198 | by adding the program name | ||
| 199 | |||
| 200 | =cut | ||
| 201 | |||
| 202 | sub note { | ||
| 203 | |||
| 204 | $sumigffd->{_note} = 'sumigffd'.$sumigffd->{_note}; | ||
| 205 | return ( $sumigffd->{_note} ); | ||
| 206 | |||
| 207 | } | ||
| 208 | |||
| 209 | |||
| 210 | |||
| 211 | =head2 sub clear | ||
| 212 | |||
| 213 | =cut | ||
| 214 | |||
| 215 | sub clear { | ||
| 216 | |||
| 217 | $sumigffd->{_dt} = ''; | ||
| 218 | $sumigffd->{_dx} = ''; | ||
| 219 | $sumigffd->{_dz} = ''; | ||
| 220 | $sumigffd->{_ft} = ''; | ||
| 221 | $sumigffd->{_fz} = ''; | ||
| 222 | $sumigffd->{_nz} = ''; | ||
| 223 | $sumigffd->{_tmpdir} = ''; | ||
| 224 | $sumigffd->{_vfile} = ''; | ||
| 225 | $sumigffd->{_Step} = ''; | ||
| 226 | $sumigffd->{_note} = ''; | ||
| 227 | } | ||
| 228 | |||
| 229 | |||
| 230 | =head2 sub dt | ||
| 231 | |||
| 232 | |||
| 233 | =cut | ||
| 234 | |||
| 235 | sub dt { | ||
| 236 | |||
| 237 | my ( $self,$dt ) = @_; | ||
| 238 | if ( $dt ne $empty_string ) { | ||
| 239 | |||
| 240 | $sumigffd->{_dt} = $dt; | ||
| 241 | $sumigffd->{_note} = $sumigffd->{_note}.' dt='.$sumigffd->{_dt}; | ||
| 242 | $sumigffd->{_Step} = $sumigffd->{_Step}.' dt='.$sumigffd->{_dt}; | ||
| 243 | |||
| 244 | } else { | ||
| 245 | print("sumigffd, dt, missing dt,\n"); | ||
| 246 | } | ||
| 247 | } | ||
| 248 | |||
| 249 | |||
| 250 | =head2 sub dx | ||
| 251 | |||
| 252 | |||
| 253 | =cut | ||
| 254 | |||
| 255 | sub dx { | ||
| 256 | |||
| 257 | my ( $self,$dx ) = @_; | ||
| 258 | if ( $dx ne $empty_string ) { | ||
| 259 | |||
| 260 | $sumigffd->{_dx} = $dx; | ||
| 261 | $sumigffd->{_note} = $sumigffd->{_note}.' dx='.$sumigffd->{_dx}; | ||
| 262 | $sumigffd->{_Step} = $sumigffd->{_Step}.' dx='.$sumigffd->{_dx}; | ||
| 263 | |||
| 264 | } else { | ||
| 265 | print("sumigffd, dx, missing dx,\n"); | ||
| 266 | } | ||
| 267 | } | ||
| 268 | |||
| 269 | |||
| 270 | =head2 sub dz | ||
| 271 | |||
| 272 | |||
| 273 | =cut | ||
| 274 | |||
| 275 | sub dz { | ||
| 276 | |||
| 277 | my ( $self,$dz ) = @_; | ||
| 278 | if ( $dz ne $empty_string ) { | ||
| 279 | |||
| 280 | $sumigffd->{_dz} = $dz; | ||
| 281 | $sumigffd->{_note} = $sumigffd->{_note}.' dz='.$sumigffd->{_dz}; | ||
| 282 | $sumigffd->{_Step} = $sumigffd->{_Step}.' dz='.$sumigffd->{_dz}; | ||
| 283 | |||
| 284 | } else { | ||
| 285 | print("sumigffd, dz, missing dz,\n"); | ||
| 286 | } | ||
| 287 | } | ||
| 288 | |||
| 289 | |||
| 290 | =head2 sub ft | ||
| 291 | |||
| 292 | |||
| 293 | =cut | ||
| 294 | |||
| 295 | sub ft { | ||
| 296 | |||
| 297 | my ( $self,$ft ) = @_; | ||
| 298 | if ( $ft ne $empty_string ) { | ||
| 299 | |||
| 300 | $sumigffd->{_ft} = $ft; | ||
| 301 | $sumigffd->{_note} = $sumigffd->{_note}.' ft='.$sumigffd->{_ft}; | ||
| 302 | $sumigffd->{_Step} = $sumigffd->{_Step}.' ft='.$sumigffd->{_ft}; | ||
| 303 | |||
| 304 | } else { | ||
| 305 | print("sumigffd, ft, missing ft,\n"); | ||
| 306 | } | ||
| 307 | } | ||
| 308 | |||
| 309 | |||
| 310 | =head2 sub fz | ||
| 311 | |||
| 312 | |||
| 313 | =cut | ||
| 314 | |||
| 315 | sub fz { | ||
| 316 | |||
| 317 | my ( $self,$fz ) = @_; | ||
| 318 | if ( $fz ne $empty_string ) { | ||
| 319 | |||
| 320 | $sumigffd->{_fz} = $fz; | ||
| 321 | $sumigffd->{_note} = $sumigffd->{_note}.' fz='.$sumigffd->{_fz}; | ||
| 322 | $sumigffd->{_Step} = $sumigffd->{_Step}.' fz='.$sumigffd->{_fz}; | ||
| 323 | |||
| 324 | } else { | ||
| 325 | print("sumigffd, fz, missing fz,\n"); | ||
| 326 | } | ||
| 327 | } | ||
| 328 | |||
| 329 | |||
| 330 | =head2 sub nz | ||
| 331 | |||
| 332 | |||
| 333 | =cut | ||
| 334 | |||
| 335 | sub nz { | ||
| 336 | |||
| 337 | my ( $self,$nz ) = @_; | ||
| 338 | if ( $nz ne $empty_string ) { | ||
| 339 | |||
| 340 | $sumigffd->{_nz} = $nz; | ||
| 341 | $sumigffd->{_note} = $sumigffd->{_note}.' nz='.$sumigffd->{_nz}; | ||
| 342 | $sumigffd->{_Step} = $sumigffd->{_Step}.' nz='.$sumigffd->{_nz}; | ||
| 343 | |||
| 344 | } else { | ||
| 345 | print("sumigffd, nz, missing nz,\n"); | ||
| 346 | } | ||
| 347 | } | ||
| 348 | |||
| 349 | |||
| 350 | =head2 sub tmpdir | ||
| 351 | |||
| 352 | |||
| 353 | =cut | ||
| 354 | |||
| 355 | sub tmpdir { | ||
| 356 | |||
| 357 | my ( $self,$tmpdir ) = @_; | ||
| 358 | if ( $tmpdir ne $empty_string ) { | ||
| 359 | |||
| 360 | $sumigffd->{_tmpdir} = $tmpdir; | ||
| 361 | $sumigffd->{_note} = $sumigffd->{_note}.' tmpdir='.$sumigffd->{_tmpdir}; | ||
| 362 | $sumigffd->{_Step} = $sumigffd->{_Step}.' tmpdir='.$sumigffd->{_tmpdir}; | ||
| 363 | |||
| 364 | } else { | ||
| 365 | print("sumigffd, tmpdir, missing tmpdir,\n"); | ||
| 366 | } | ||
| 367 | } | ||
| 368 | |||
| 369 | |||
| 370 | =head2 sub vfile | ||
| 371 | |||
| 372 | |||
| 373 | =cut | ||
| 374 | |||
| 375 | sub vfile { | ||
| 376 | |||
| 377 | my ( $self,$vfile ) = @_; | ||
| 378 | if ( $vfile ne $empty_string ) { | ||
| 379 | |||
| 380 | $sumigffd->{_vfile} = $vfile; | ||
| 381 | $sumigffd->{_note} = $sumigffd->{_note}.' vfile='.$sumigffd->{_vfile}; | ||
| 382 | $sumigffd->{_Step} = $sumigffd->{_Step}.' vfile='.$sumigffd->{_vfile}; | ||
| 383 | |||
| 384 | } else { | ||
| 385 | print("sumigffd, vfile, missing vfile,\n"); | ||
| 386 | } | ||
| 387 | } | ||
| 388 | |||
| 389 | |||
| 390 | =head2 sub get_max_index | ||
| 391 | |||
| 392 | max index = number of input variables -1 | ||
| 393 | |||
| 394 | =cut | ||
| 395 | |||
| 396 | sub get_max_index { | ||
| 397 | my ($self) = @_; | ||
| 398 | my $max_index = 7; | ||
| 399 | |||
| 400 | return($max_index); | ||
| 401 | } | ||
| 402 | |||
| 403 | |||
| 404 | 1; |