« lib/App/SeismicUnixGui/sunix/header/suresstat.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/par/vel2stiff.pm »
| 1 | package App::SeismicUnixGui::sunix::migration::sustolt; | ||
| 2 | |||
| 3 | =head1 DOCUMENTATION | ||
| 4 | |||
| 5 | =head2 SYNOPSIS | ||
| 6 | |||
| 7 | PERL PROGRAM NAME: SUSTOLT - Stolt migration for stacked data or common-offset gathers | ||
| 8 | AUTHOR: Juan Lorenzo (Perl module only) | ||
| 9 | DATE: | ||
| 10 | DESCRIPTION: | ||
| 11 | Version: | ||
| 12 | |||
| 13 | =head2 USE | ||
| 14 | |||
| 15 | =head3 NOTES | ||
| 16 | |||
| 17 | =head4 Examples | ||
| 18 | |||
| 19 | =head3 SEISMIC UNIX NOTES | ||
| 20 | |||
| 21 | SUSTOLT - Stolt migration for stacked data or common-offset gathers | ||
| 22 | |||
| 23 | sustolt <stdin >stdout cdpmin= cdpmax= dxcdp= noffmix= [...] | ||
| 24 | |||
| 25 | Required Parameters: | ||
| 26 | cdpmin= minimum cdp (integer number) in dataset | ||
| 27 | cdpmax= maximum cdp (integer number) in dataset | ||
| 28 | dxcdp= distance between adjacent cdp bins (m) | ||
| 29 | |||
| 30 | Optional Parameters: | ||
| 31 | noffmix=1 number of offsets to mix (for unstacked data only) | ||
| 32 | tmig=0.0 times corresponding to rms velocities in vmig (s) | ||
| 33 | vmig=1500.0 rms velocities corresponding to times in tmig (m/s) | ||
| 34 | smig=1.0 stretch factor (0.6 typical if vrms increasing) | ||
| 35 | vscale=1.0 scale factor to apply to velocities | ||
| 36 | fmax=Nyquist maximum frequency in input data (Hz) | ||
| 37 | lstaper=0 length of side tapers (# of traces) | ||
| 38 | lbtaper=0 length of bottom taper (# of samples) | ||
| 39 | verbose=0 =1 for diagnostic print | ||
| 40 | tmpdir= if non-empty, use the value as a directory path | ||
| 41 | prefix for storing temporary files; else if the | ||
| 42 | the CWP_TMPDIR environment variable is set use | ||
| 43 | its value for the path; else use tmpfile() | ||
| 44 | |||
| 45 | Notes: | ||
| 46 | If unstacked traces are input, they should be NMO-corrected and sorted | ||
| 47 | into common-offset gathers. One common-offset gather ends and another | ||
| 48 | begins when the offset field of the trace headers changes. If both | ||
| 49 | NMO and DMO are applied, then this is equivalent to prestack time | ||
| 50 | migration (though the velocity profile is assumed v(t), only). | ||
| 51 | |||
| 52 | The cdp field of the input trace headers must be the cdp bin NUMBER, NOT | ||
| 53 | the cdp location expressed in units of meters or feet. | ||
| 54 | |||
| 55 | The number of offsets to mix (noffmix) should be specified for | ||
| 56 | unstacked data only. noffmix should typically equal the ratio of the | ||
| 57 | shotpoint spacing to the cdp spacing. This choice ensures that every | ||
| 58 | cdp will be represented in each offset mix. Traces in each mix will | ||
| 59 | contribute through migration to other traces in adjacent cdps within | ||
| 60 | that mix. | ||
| 61 | |||
| 62 | The tmig and vmig arrays specify a velocity function of time that is | ||
| 63 | used to implement Stolt's stretch for depth-variable velocity. The | ||
| 64 | stretch factor smig is often referred to as the "W" factor. | ||
| 65 | The times in tmig must be monotonically increasing. | ||
| 66 | |||
| 67 | Credits: | ||
| 68 | CWP: Dave Hale c. 1990 | ||
| 69 | |||
| 70 | Trace header fields accessed: ns, dt, delrt, offset, cdp | ||
| 71 | |||
| 72 | =head2 CHANGES and their DATES | ||
| 73 | |||
| 74 | =cut | ||
| 75 | |||
| 76 | use Moose; | ||
| 77 | our $VERSION = '0.0.1'; | ||
| 78 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 79 | |||
| 80 | my $get = L_SU_global_constants->new(); | ||
| 81 | |||
| 82 | my $var = $get->var(); | ||
| 83 | my $empty_string = $var->{_empty_string}; | ||
| 84 | |||
| 85 | my $sustolt = { | ||
| 86 | _cdpmax => '', | ||
| 87 | _cdpmin => '', | ||
| 88 | _dxcdp => '', | ||
| 89 | _fmax => '', | ||
| 90 | _lbtaper => '', | ||
| 91 | _lstaper => '', | ||
| 92 | _noffmix => '', | ||
| 93 | _smig => '', | ||
| 94 | _tmig => '', | ||
| 95 | _tmpdir => '', | ||
| 96 | _verbose => '', | ||
| 97 | _vmig => '', | ||
| 98 | _vscale => '', | ||
| 99 | _Step => '', | ||
| 100 | _note => '', | ||
| 101 | }; | ||
| 102 | |||
| 103 | =head2 sub Step | ||
| 104 | |||
| 105 | collects switches and assembles bash instructions | ||
| 106 | by adding the program name | ||
| 107 | |||
| 108 | =cut | ||
| 109 | |||
| 110 | sub Step { | ||
| 111 | |||
| 112 | $sustolt->{_Step} = 'sustolt' . $sustolt->{_Step}; | ||
| 113 | return ( $sustolt->{_Step} ); | ||
| 114 | |||
| 115 | } | ||
| 116 | |||
| 117 | =head2 sub note | ||
| 118 | |||
| 119 | collects switches and assembles bash instructions | ||
| 120 | by adding the program name | ||
| 121 | |||
| 122 | =cut | ||
| 123 | |||
| 124 | sub note { | ||
| 125 | |||
| 126 | $sustolt->{_note} = 'sustolt' . $sustolt->{_note}; | ||
| 127 | return ( $sustolt->{_note} ); | ||
| 128 | |||
| 129 | } | ||
| 130 | |||
| 131 | =head2 sub clear | ||
| 132 | |||
| 133 | =cut | ||
| 134 | |||
| 135 | sub clear { | ||
| 136 | |||
| 137 | $sustolt->{_cdpmax} = ''; | ||
| 138 | $sustolt->{_cdpmin} = ''; | ||
| 139 | $sustolt->{_dxcdp} = ''; | ||
| 140 | $sustolt->{_fmax} = ''; | ||
| 141 | $sustolt->{_lbtaper} = ''; | ||
| 142 | $sustolt->{_lstaper} = ''; | ||
| 143 | $sustolt->{_noffmix} = ''; | ||
| 144 | $sustolt->{_smig} = ''; | ||
| 145 | $sustolt->{_tmig} = ''; | ||
| 146 | $sustolt->{_tmpdir} = ''; | ||
| 147 | $sustolt->{_verbose} = ''; | ||
| 148 | $sustolt->{_vmig} = ''; | ||
| 149 | $sustolt->{_vscale} = ''; | ||
| 150 | $sustolt->{_Step} = ''; | ||
| 151 | $sustolt->{_note} = ''; | ||
| 152 | } | ||
| 153 | |||
| 154 | =head2 sub cdpmax | ||
| 155 | |||
| 156 | |||
| 157 | =cut | ||
| 158 | |||
| 159 | sub cdpmax { | ||
| 160 | |||
| 161 | my ( $self, $cdpmax ) = @_; | ||
| 162 | if ( $cdpmax ne $empty_string ) { | ||
| 163 | |||
| 164 | $sustolt->{_cdpmax} = $cdpmax; | ||
| 165 | $sustolt->{_note} = | ||
| 166 | $sustolt->{_note} . ' cdpmax=' . $sustolt->{_cdpmax}; | ||
| 167 | $sustolt->{_Step} = | ||
| 168 | $sustolt->{_Step} . ' cdpmax=' . $sustolt->{_cdpmax}; | ||
| 169 | |||
| 170 | } | ||
| 171 | else { | ||
| 172 | print("sustolt, cdpmax, missing cdpmax,\n"); | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | =head2 sub cdpmin | ||
| 177 | |||
| 178 | |||
| 179 | =cut | ||
| 180 | |||
| 181 | sub cdpmin { | ||
| 182 | |||
| 183 | my ( $self, $cdpmin ) = @_; | ||
| 184 | if ( $cdpmin ne $empty_string ) { | ||
| 185 | |||
| 186 | $sustolt->{_cdpmin} = $cdpmin; | ||
| 187 | $sustolt->{_note} = | ||
| 188 | $sustolt->{_note} . ' cdpmin=' . $sustolt->{_cdpmin}; | ||
| 189 | $sustolt->{_Step} = | ||
| 190 | $sustolt->{_Step} . ' cdpmin=' . $sustolt->{_cdpmin}; | ||
| 191 | |||
| 192 | } | ||
| 193 | else { | ||
| 194 | print("sustolt, cdpmin, missing cdpmin,\n"); | ||
| 195 | } | ||
| 196 | } | ||
| 197 | |||
| 198 | =head2 sub dxcdp | ||
| 199 | |||
| 200 | |||
| 201 | =cut | ||
| 202 | |||
| 203 | sub dxcdp { | ||
| 204 | |||
| 205 | my ( $self, $dxcdp ) = @_; | ||
| 206 | if ( $dxcdp ne $empty_string ) { | ||
| 207 | |||
| 208 | $sustolt->{_dxcdp} = $dxcdp; | ||
| 209 | $sustolt->{_note} = | ||
| 210 | $sustolt->{_note} . ' dxcdp=' . $sustolt->{_dxcdp}; | ||
| 211 | $sustolt->{_Step} = | ||
| 212 | $sustolt->{_Step} . ' dxcdp=' . $sustolt->{_dxcdp}; | ||
| 213 | |||
| 214 | } | ||
| 215 | else { | ||
| 216 | print("sustolt, dxcdp, missing dxcdp,\n"); | ||
| 217 | } | ||
| 218 | } | ||
| 219 | |||
| 220 | =head2 sub fmax | ||
| 221 | |||
| 222 | |||
| 223 | =cut | ||
| 224 | |||
| 225 | sub fmax { | ||
| 226 | |||
| 227 | my ( $self, $fmax ) = @_; | ||
| 228 | if ( $fmax ne $empty_string ) { | ||
| 229 | |||
| 230 | $sustolt->{_fmax} = $fmax; | ||
| 231 | $sustolt->{_note} = $sustolt->{_note} . ' fmax=' . $sustolt->{_fmax}; | ||
| 232 | $sustolt->{_Step} = $sustolt->{_Step} . ' fmax=' . $sustolt->{_fmax}; | ||
| 233 | |||
| 234 | } | ||
| 235 | else { | ||
| 236 | print("sustolt, fmax, missing fmax,\n"); | ||
| 237 | } | ||
| 238 | } | ||
| 239 | |||
| 240 | =head2 sub lbtaper | ||
| 241 | |||
| 242 | |||
| 243 | =cut | ||
| 244 | |||
| 245 | sub lbtaper { | ||
| 246 | |||
| 247 | my ( $self, $lbtaper ) = @_; | ||
| 248 | if ( $lbtaper ne $empty_string ) { | ||
| 249 | |||
| 250 | $sustolt->{_lbtaper} = $lbtaper; | ||
| 251 | $sustolt->{_note} = | ||
| 252 | $sustolt->{_note} . ' lbtaper=' . $sustolt->{_lbtaper}; | ||
| 253 | $sustolt->{_Step} = | ||
| 254 | $sustolt->{_Step} . ' lbtaper=' . $sustolt->{_lbtaper}; | ||
| 255 | |||
| 256 | } | ||
| 257 | else { | ||
| 258 | print("sustolt, lbtaper, missing lbtaper,\n"); | ||
| 259 | } | ||
| 260 | } | ||
| 261 | |||
| 262 | =head2 sub lstaper | ||
| 263 | |||
| 264 | |||
| 265 | =cut | ||
| 266 | |||
| 267 | sub lstaper { | ||
| 268 | |||
| 269 | my ( $self, $lstaper ) = @_; | ||
| 270 | if ( $lstaper ne $empty_string ) { | ||
| 271 | |||
| 272 | $sustolt->{_lstaper} = $lstaper; | ||
| 273 | $sustolt->{_note} = | ||
| 274 | $sustolt->{_note} . ' lstaper=' . $sustolt->{_lstaper}; | ||
| 275 | $sustolt->{_Step} = | ||
| 276 | $sustolt->{_Step} . ' lstaper=' . $sustolt->{_lstaper}; | ||
| 277 | |||
| 278 | } | ||
| 279 | else { | ||
| 280 | print("sustolt, lstaper, missing lstaper,\n"); | ||
| 281 | } | ||
| 282 | } | ||
| 283 | |||
| 284 | =head2 sub noffmix | ||
| 285 | |||
| 286 | |||
| 287 | =cut | ||
| 288 | |||
| 289 | sub noffmix { | ||
| 290 | |||
| 291 | my ( $self, $noffmix ) = @_; | ||
| 292 | if ( $noffmix ne $empty_string ) { | ||
| 293 | |||
| 294 | $sustolt->{_noffmix} = $noffmix; | ||
| 295 | $sustolt->{_note} = | ||
| 296 | $sustolt->{_note} . ' noffmix=' . $sustolt->{_noffmix}; | ||
| 297 | $sustolt->{_Step} = | ||
| 298 | $sustolt->{_Step} . ' noffmix=' . $sustolt->{_noffmix}; | ||
| 299 | |||
| 300 | } | ||
| 301 | else { | ||
| 302 | print("sustolt, noffmix, missing noffmix,\n"); | ||
| 303 | } | ||
| 304 | } | ||
| 305 | |||
| 306 | =head2 sub smig | ||
| 307 | |||
| 308 | |||
| 309 | =cut | ||
| 310 | |||
| 311 | sub smig { | ||
| 312 | |||
| 313 | my ( $self, $smig ) = @_; | ||
| 314 | if ( $smig ne $empty_string ) { | ||
| 315 | |||
| 316 | $sustolt->{_smig} = $smig; | ||
| 317 | $sustolt->{_note} = $sustolt->{_note} . ' smig=' . $sustolt->{_smig}; | ||
| 318 | $sustolt->{_Step} = $sustolt->{_Step} . ' smig=' . $sustolt->{_smig}; | ||
| 319 | |||
| 320 | } | ||
| 321 | else { | ||
| 322 | print("sustolt, smig, missing smig,\n"); | ||
| 323 | } | ||
| 324 | } | ||
| 325 | |||
| 326 | =head2 sub tmig | ||
| 327 | |||
| 328 | |||
| 329 | =cut | ||
| 330 | |||
| 331 | sub tmig { | ||
| 332 | |||
| 333 | my ( $self, $tmig ) = @_; | ||
| 334 | if ( $tmig ne $empty_string ) { | ||
| 335 | |||
| 336 | $sustolt->{_tmig} = $tmig; | ||
| 337 | $sustolt->{_note} = $sustolt->{_note} . ' tmig=' . $sustolt->{_tmig}; | ||
| 338 | $sustolt->{_Step} = $sustolt->{_Step} . ' tmig=' . $sustolt->{_tmig}; | ||
| 339 | |||
| 340 | } | ||
| 341 | else { | ||
| 342 | print("sustolt, tmig, missing tmig,\n"); | ||
| 343 | } | ||
| 344 | } | ||
| 345 | |||
| 346 | =head2 sub tmpdir | ||
| 347 | |||
| 348 | |||
| 349 | =cut | ||
| 350 | |||
| 351 | sub tmpdir { | ||
| 352 | |||
| 353 | my ( $self, $tmpdir ) = @_; | ||
| 354 | if ( $tmpdir ne $empty_string ) { | ||
| 355 | |||
| 356 | $sustolt->{_tmpdir} = $tmpdir; | ||
| 357 | $sustolt->{_note} = | ||
| 358 | $sustolt->{_note} . ' tmpdir=' . $sustolt->{_tmpdir}; | ||
| 359 | $sustolt->{_Step} = | ||
| 360 | $sustolt->{_Step} . ' tmpdir=' . $sustolt->{_tmpdir}; | ||
| 361 | |||
| 362 | } | ||
| 363 | else { | ||
| 364 | print("sustolt, tmpdir, missing tmpdir,\n"); | ||
| 365 | } | ||
| 366 | } | ||
| 367 | |||
| 368 | =head2 sub verbose | ||
| 369 | |||
| 370 | |||
| 371 | =cut | ||
| 372 | |||
| 373 | sub verbose { | ||
| 374 | |||
| 375 | my ( $self, $verbose ) = @_; | ||
| 376 | if ( $verbose ne $empty_string ) { | ||
| 377 | |||
| 378 | $sustolt->{_verbose} = $verbose; | ||
| 379 | $sustolt->{_note} = | ||
| 380 | $sustolt->{_note} . ' verbose=' . $sustolt->{_verbose}; | ||
| 381 | $sustolt->{_Step} = | ||
| 382 | $sustolt->{_Step} . ' verbose=' . $sustolt->{_verbose}; | ||
| 383 | |||
| 384 | } | ||
| 385 | else { | ||
| 386 | print("sustolt, verbose, missing verbose,\n"); | ||
| 387 | } | ||
| 388 | } | ||
| 389 | |||
| 390 | =head2 sub vmig | ||
| 391 | |||
| 392 | |||
| 393 | =cut | ||
| 394 | |||
| 395 | sub vmig { | ||
| 396 | |||
| 397 | my ( $self, $vmig ) = @_; | ||
| 398 | if ( $vmig ne $empty_string ) { | ||
| 399 | |||
| 400 | $sustolt->{_vmig} = $vmig; | ||
| 401 | $sustolt->{_note} = $sustolt->{_note} . ' vmig=' . $sustolt->{_vmig}; | ||
| 402 | $sustolt->{_Step} = $sustolt->{_Step} . ' vmig=' . $sustolt->{_vmig}; | ||
| 403 | |||
| 404 | } | ||
| 405 | else { | ||
| 406 | print("sustolt, vmig, missing vmig,\n"); | ||
| 407 | } | ||
| 408 | } | ||
| 409 | |||
| 410 | =head2 sub vscale | ||
| 411 | |||
| 412 | |||
| 413 | =cut | ||
| 414 | |||
| 415 | sub vscale { | ||
| 416 | |||
| 417 | my ( $self, $vscale ) = @_; | ||
| 418 | if ( $vscale ne $empty_string ) { | ||
| 419 | |||
| 420 | $sustolt->{_vscale} = $vscale; | ||
| 421 | $sustolt->{_note} = | ||
| 422 | $sustolt->{_note} . ' vscale=' . $sustolt->{_vscale}; | ||
| 423 | $sustolt->{_Step} = | ||
| 424 | $sustolt->{_Step} . ' vscale=' . $sustolt->{_vscale}; | ||
| 425 | |||
| 426 | } | ||
| 427 | else { | ||
| 428 | print("sustolt, vscale, missing vscale,\n"); | ||
| 429 | } | ||
| 430 | } | ||
| 431 | |||
| 432 | =head2 sub get_max_index | ||
| 433 | |||
| 434 | max index = number of input variables -1 | ||
| 435 | |||
| 436 | =cut | ||
| 437 | |||
| 438 | sub get_max_index { | ||
| 439 | my ($self) = @_; | ||
| 440 | my $max_index = 12; | ||
| 441 | |||
| 442 | return ($max_index); | ||
| 443 | } | ||
| 444 | |||
| 445 | 1; |