« lib/App/SeismicUnixGui/sunix/NMO_Vel_Stk/surelanan.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/filter/sufilter.pm »
| 1 | package App::SeismicUnixGui::sunix::NMO_Vel_Stk::suvelan_nsel; | ||
| 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 | SUVELAN_NSEL - compute stacking VELocity panel for cdp gathers | ||
| 25 | |||
| 26 | using the Normalized Selective CrossCorrelation sum | ||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | suvelan_usel <stdin >stdout [optional parameters] | ||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | Optional Parameters: | ||
| 35 | |||
| 36 | nx=tr.cdpt number of traces in cdp | ||
| 37 | |||
| 38 | dx=tr.d2 offset increment | ||
| 39 | |||
| 40 | nv=50 number of velocities | ||
| 41 | |||
| 42 | dv=100.0 velocity sampling interval | ||
| 43 | |||
| 44 | fv=1500.0 first velocity | ||
| 45 | |||
| 46 | tau=0.5 threshold for significance values | ||
| 47 | |||
| 48 | smute=1.5 samples with NMO stretch exceeding smute are zeroed | ||
| 49 | |||
| 50 | dtratio=5 ratio of output to input time sampling intervals | ||
| 51 | |||
| 52 | nsmooth=dtratio*2+1 length of smoothing window | ||
| 53 | |||
| 54 | verbose=0 =1 for diagnostic print on stderr | ||
| 55 | |||
| 56 | pwr=1.0 semblance value to the power | ||
| 57 | |||
| 58 | |||
| 59 | |||
| 60 | Notes: | ||
| 61 | |||
| 62 | Normalized Selective CrossCorrelation Sum: is based on the coherence | ||
| 63 | |||
| 64 | measure known as crosscorrelation sum. The difference is that the selective | ||
| 65 | |||
| 66 | approach sum only crosscorrelation pairs with relatively large differential | ||
| 67 | |||
| 68 | moveout, thus increasing the resolving power in the velocity spectra | ||
| 69 | |||
| 70 | compared to that achieved by conventional methods. The normalization is | ||
| 71 | |||
| 72 | achieved in much the same way of normalizing the conventional | ||
| 73 | |||
| 74 | crosscorrelation sum. | ||
| 75 | |||
| 76 | |||
| 77 | |||
| 78 | Each crosscorrelation is divided by the geometric mean | ||
| 79 | |||
| 80 | of the energy of the traces involved, and the multiplying by a constant to | ||
| 81 | |||
| 82 | achieve maximum amplitude of unity. The constant is just the inverse of the | ||
| 83 | |||
| 84 | total number of crosscorrelations included in the sum. The selection is | ||
| 85 | |||
| 86 | made using a parabolic approximation of the differential moveout and | ||
| 87 | |||
| 88 | imposing a threshold for those differential moveouts. | ||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | That threshold is the parameter tau in this program, which varies between 0 | ||
| 93 | |||
| 94 | to 1. A value of tau=0, means conventional crosscorrelation sum is applied | ||
| 95 | |||
| 96 | implying that all crosscorrelations are included in the sum. In contrast, | ||
| 97 | |||
| 98 | a value of tau=1 (not recomended) means that only the crosscorrelation | ||
| 99 | |||
| 100 | formed by the trace pair involving the shortest and longest offset is | ||
| 101 | |||
| 102 | included in the sum. Intermediate values will produce percentages of the | ||
| 103 | |||
| 104 | crosscorrelations included in the sum that will be shown in the screen | ||
| 105 | |||
| 106 | before computing the velocity spectra. Typical values for tau are between | ||
| 107 | |||
| 108 | 0.2 and 0.6, producing approximated percentages of crosscorrelations summed | ||
| 109 | |||
| 110 | between 60 0x0p+0nd 20%. The higher the value of tau the lower the percentage | ||
| 111 | |||
| 112 | and higher the increase in the resolving power of velocity spectra. | ||
| 113 | |||
| 114 | |||
| 115 | |||
| 116 | Keeping the percentage of crosscorrelations included in the sum between 20% | ||
| 117 | |||
| 118 | and 60% will increase resolution and avoid the precense of artifacts in | ||
| 119 | |||
| 120 | the results. In data contaminated by random noise or statics distortions | ||
| 121 | |||
| 122 | is recomended to mantaing the percentage of crosscorrelations included in | ||
| 123 | |||
| 124 | the sum above 25%. After computing the velocity spectra one might want to | ||
| 125 | |||
| 126 | adjust the level and number of contours before velocity picking. | ||
| 127 | |||
| 128 | |||
| 129 | |||
| 130 | |||
| 131 | |||
| 132 | Credits: CWP: Valmore Celis, Sept 2002 | ||
| 133 | |||
| 134 | |||
| 135 | |||
| 136 | Based on the original code: suvelan.c | ||
| 137 | |||
| 138 | Colorado School of Mines: Dave Hale c. 1989 | ||
| 139 | |||
| 140 | |||
| 141 | |||
| 142 | References: | ||
| 143 | |||
| 144 | Neidell, N.S., and Taner, M.T., 1971, Semblance and other | ||
| 145 | |||
| 146 | coherency measures for multichannel data: Geophysics, 36, 498-509. | ||
| 147 | |||
| 148 | Celis, V. T., 2002, Selective-correlation velocity analysis: CSM thesis. | ||
| 149 | |||
| 150 | |||
| 151 | |||
| 152 | |||
| 153 | |||
| 154 | Trace header fields accessed: ns, dt, delrt, offset, cdp | ||
| 155 | |||
| 156 | Trace header fields modified: ns, dt, offset, cdp | ||
| 157 | |||
| 158 | |||
| 159 | |||
| 160 | =head2 User's notes (Juan Lorenzo) | ||
| 161 | untested | ||
| 162 | |||
| 163 | =cut | ||
| 164 | |||
| 165 | |||
| 166 | =head2 CHANGES and their DATES | ||
| 167 | |||
| 168 | =cut | ||
| 169 | |||
| 170 | use Moose; | ||
| 171 | our $VERSION = '0.0.1'; | ||
| 172 | |||
| 173 | |||
| 174 | =head2 Import packages | ||
| 175 | |||
| 176 | =cut | ||
| 177 | |||
| 178 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 179 | |||
| 180 | use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su); | ||
| 181 | use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config'; | ||
| 182 | |||
| 183 | |||
| 184 | =head2 instantiation of packages | ||
| 185 | |||
| 186 | =cut | ||
| 187 | |||
| 188 | my $get = L_SU_global_constants->new(); | ||
| 189 | my $Project = Project_config->new(); | ||
| 190 | my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU(); | ||
| 191 | my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN(); | ||
| 192 | my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT(); | ||
| 193 | |||
| 194 | my $PS_SEISMIC = $Project->PS_SEISMIC(); | ||
| 195 | |||
| 196 | my $var = $get->var(); | ||
| 197 | my $on = $var->{_on}; | ||
| 198 | my $off = $var->{_off}; | ||
| 199 | my $true = $var->{_true}; | ||
| 200 | my $false = $var->{_false}; | ||
| 201 | my $empty_string = $var->{_empty_string}; | ||
| 202 | |||
| 203 | =head2 Encapsulated | ||
| 204 | hash of private variables | ||
| 205 | |||
| 206 | =cut | ||
| 207 | |||
| 208 | my $suvelan_nsel = { | ||
| 209 | _dtratio => '', | ||
| 210 | _dv => '', | ||
| 211 | _dx => '', | ||
| 212 | _fv => '', | ||
| 213 | _nsmooth => '', | ||
| 214 | _nv => '', | ||
| 215 | _nx => '', | ||
| 216 | _pwr => '', | ||
| 217 | _smute => '', | ||
| 218 | _tau => '', | ||
| 219 | _verbose => '', | ||
| 220 | _Step => '', | ||
| 221 | _note => '', | ||
| 222 | |||
| 223 | }; | ||
| 224 | |||
| 225 | =head2 sub Step | ||
| 226 | |||
| 227 | collects switches and assembles bash instructions | ||
| 228 | by adding the program name | ||
| 229 | |||
| 230 | =cut | ||
| 231 | |||
| 232 | sub Step { | ||
| 233 | |||
| 234 | $suvelan_nsel->{_Step} = 'suvelan_nsel'.$suvelan_nsel->{_Step}; | ||
| 235 | return ( $suvelan_nsel->{_Step} ); | ||
| 236 | |||
| 237 | } | ||
| 238 | |||
| 239 | |||
| 240 | =head2 sub note | ||
| 241 | |||
| 242 | collects switches and assembles bash instructions | ||
| 243 | by adding the program name | ||
| 244 | |||
| 245 | =cut | ||
| 246 | |||
| 247 | sub note { | ||
| 248 | |||
| 249 | $suvelan_nsel->{_note} = 'suvelan_nsel'.$suvelan_nsel->{_note}; | ||
| 250 | return ( $suvelan_nsel->{_note} ); | ||
| 251 | |||
| 252 | } | ||
| 253 | |||
| 254 | |||
| 255 | |||
| 256 | =head2 sub clear | ||
| 257 | |||
| 258 | =cut | ||
| 259 | |||
| 260 | sub clear { | ||
| 261 | |||
| 262 | $suvelan_nsel->{_dtratio} = ''; | ||
| 263 | $suvelan_nsel->{_dv} = ''; | ||
| 264 | $suvelan_nsel->{_dx} = ''; | ||
| 265 | $suvelan_nsel->{_fv} = ''; | ||
| 266 | $suvelan_nsel->{_nsmooth} = ''; | ||
| 267 | $suvelan_nsel->{_nv} = ''; | ||
| 268 | $suvelan_nsel->{_nx} = ''; | ||
| 269 | $suvelan_nsel->{_pwr} = ''; | ||
| 270 | $suvelan_nsel->{_smute} = ''; | ||
| 271 | $suvelan_nsel->{_tau} = ''; | ||
| 272 | $suvelan_nsel->{_verbose} = ''; | ||
| 273 | $suvelan_nsel->{_Step} = ''; | ||
| 274 | $suvelan_nsel->{_note} = ''; | ||
| 275 | } | ||
| 276 | |||
| 277 | |||
| 278 | =head2 sub dtratio | ||
| 279 | |||
| 280 | |||
| 281 | =cut | ||
| 282 | |||
| 283 | sub dtratio { | ||
| 284 | |||
| 285 | my ( $self,$dtratio ) = @_; | ||
| 286 | if ( $dtratio ne $empty_string ) { | ||
| 287 | |||
| 288 | $suvelan_nsel->{_dtratio} = $dtratio; | ||
| 289 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' dtratio='.$suvelan_nsel->{_dtratio}; | ||
| 290 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' dtratio='.$suvelan_nsel->{_dtratio}; | ||
| 291 | |||
| 292 | } else { | ||
| 293 | print("suvelan_nsel, dtratio, missing dtratio,\n"); | ||
| 294 | } | ||
| 295 | } | ||
| 296 | |||
| 297 | |||
| 298 | =head2 sub dv | ||
| 299 | |||
| 300 | |||
| 301 | =cut | ||
| 302 | |||
| 303 | sub dv { | ||
| 304 | |||
| 305 | my ( $self,$dv ) = @_; | ||
| 306 | if ( $dv ne $empty_string ) { | ||
| 307 | |||
| 308 | $suvelan_nsel->{_dv} = $dv; | ||
| 309 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' dv='.$suvelan_nsel->{_dv}; | ||
| 310 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' dv='.$suvelan_nsel->{_dv}; | ||
| 311 | |||
| 312 | } else { | ||
| 313 | print("suvelan_nsel, dv, missing dv,\n"); | ||
| 314 | } | ||
| 315 | } | ||
| 316 | |||
| 317 | |||
| 318 | =head2 sub dx | ||
| 319 | |||
| 320 | |||
| 321 | =cut | ||
| 322 | |||
| 323 | sub dx { | ||
| 324 | |||
| 325 | my ( $self,$dx ) = @_; | ||
| 326 | if ( $dx ne $empty_string ) { | ||
| 327 | |||
| 328 | $suvelan_nsel->{_dx} = $dx; | ||
| 329 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' dx='.$suvelan_nsel->{_dx}; | ||
| 330 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' dx='.$suvelan_nsel->{_dx}; | ||
| 331 | |||
| 332 | } else { | ||
| 333 | print("suvelan_nsel, dx, missing dx,\n"); | ||
| 334 | } | ||
| 335 | } | ||
| 336 | |||
| 337 | |||
| 338 | =head2 sub fv | ||
| 339 | |||
| 340 | |||
| 341 | =cut | ||
| 342 | |||
| 343 | sub fv { | ||
| 344 | |||
| 345 | my ( $self,$fv ) = @_; | ||
| 346 | if ( $fv ne $empty_string ) { | ||
| 347 | |||
| 348 | $suvelan_nsel->{_fv} = $fv; | ||
| 349 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' fv='.$suvelan_nsel->{_fv}; | ||
| 350 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' fv='.$suvelan_nsel->{_fv}; | ||
| 351 | |||
| 352 | } else { | ||
| 353 | print("suvelan_nsel, fv, missing fv,\n"); | ||
| 354 | } | ||
| 355 | } | ||
| 356 | |||
| 357 | |||
| 358 | =head2 sub nsmooth | ||
| 359 | |||
| 360 | |||
| 361 | =cut | ||
| 362 | |||
| 363 | sub nsmooth { | ||
| 364 | |||
| 365 | my ( $self,$nsmooth ) = @_; | ||
| 366 | if ( $nsmooth ne $empty_string ) { | ||
| 367 | |||
| 368 | $suvelan_nsel->{_nsmooth} = $nsmooth; | ||
| 369 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' nsmooth='.$suvelan_nsel->{_nsmooth}; | ||
| 370 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' nsmooth='.$suvelan_nsel->{_nsmooth}; | ||
| 371 | |||
| 372 | } else { | ||
| 373 | print("suvelan_nsel, nsmooth, missing nsmooth,\n"); | ||
| 374 | } | ||
| 375 | } | ||
| 376 | |||
| 377 | |||
| 378 | =head2 sub nv | ||
| 379 | |||
| 380 | |||
| 381 | =cut | ||
| 382 | |||
| 383 | sub nv { | ||
| 384 | |||
| 385 | my ( $self,$nv ) = @_; | ||
| 386 | if ( $nv ne $empty_string ) { | ||
| 387 | |||
| 388 | $suvelan_nsel->{_nv} = $nv; | ||
| 389 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' nv='.$suvelan_nsel->{_nv}; | ||
| 390 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' nv='.$suvelan_nsel->{_nv}; | ||
| 391 | |||
| 392 | } else { | ||
| 393 | print("suvelan_nsel, nv, missing nv,\n"); | ||
| 394 | } | ||
| 395 | } | ||
| 396 | |||
| 397 | |||
| 398 | =head2 sub nx | ||
| 399 | |||
| 400 | |||
| 401 | =cut | ||
| 402 | |||
| 403 | sub nx { | ||
| 404 | |||
| 405 | my ( $self,$nx ) = @_; | ||
| 406 | if ( $nx ne $empty_string ) { | ||
| 407 | |||
| 408 | $suvelan_nsel->{_nx} = $nx; | ||
| 409 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' nx='.$suvelan_nsel->{_nx}; | ||
| 410 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' nx='.$suvelan_nsel->{_nx}; | ||
| 411 | |||
| 412 | } else { | ||
| 413 | print("suvelan_nsel, nx, missing nx,\n"); | ||
| 414 | } | ||
| 415 | } | ||
| 416 | |||
| 417 | |||
| 418 | =head2 sub pwr | ||
| 419 | |||
| 420 | |||
| 421 | =cut | ||
| 422 | |||
| 423 | sub pwr { | ||
| 424 | |||
| 425 | my ( $self,$pwr ) = @_; | ||
| 426 | if ( $pwr ne $empty_string ) { | ||
| 427 | |||
| 428 | $suvelan_nsel->{_pwr} = $pwr; | ||
| 429 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' pwr='.$suvelan_nsel->{_pwr}; | ||
| 430 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' pwr='.$suvelan_nsel->{_pwr}; | ||
| 431 | |||
| 432 | } else { | ||
| 433 | print("suvelan_nsel, pwr, missing pwr,\n"); | ||
| 434 | } | ||
| 435 | } | ||
| 436 | |||
| 437 | |||
| 438 | =head2 sub smute | ||
| 439 | |||
| 440 | |||
| 441 | =cut | ||
| 442 | |||
| 443 | sub smute { | ||
| 444 | |||
| 445 | my ( $self,$smute ) = @_; | ||
| 446 | if ( $smute ne $empty_string ) { | ||
| 447 | |||
| 448 | $suvelan_nsel->{_smute} = $smute; | ||
| 449 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' smute='.$suvelan_nsel->{_smute}; | ||
| 450 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' smute='.$suvelan_nsel->{_smute}; | ||
| 451 | |||
| 452 | } else { | ||
| 453 | print("suvelan_nsel, smute, missing smute,\n"); | ||
| 454 | } | ||
| 455 | } | ||
| 456 | |||
| 457 | |||
| 458 | =head2 sub tau | ||
| 459 | |||
| 460 | |||
| 461 | =cut | ||
| 462 | |||
| 463 | sub tau { | ||
| 464 | |||
| 465 | my ( $self,$tau ) = @_; | ||
| 466 | if ( $tau ne $empty_string ) { | ||
| 467 | |||
| 468 | $suvelan_nsel->{_tau} = $tau; | ||
| 469 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' tau='.$suvelan_nsel->{_tau}; | ||
| 470 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' tau='.$suvelan_nsel->{_tau}; | ||
| 471 | |||
| 472 | } else { | ||
| 473 | print("suvelan_nsel, tau, missing tau,\n"); | ||
| 474 | } | ||
| 475 | } | ||
| 476 | |||
| 477 | |||
| 478 | =head2 sub verbose | ||
| 479 | |||
| 480 | |||
| 481 | =cut | ||
| 482 | |||
| 483 | sub verbose { | ||
| 484 | |||
| 485 | my ( $self,$verbose ) = @_; | ||
| 486 | if ( $verbose ne $empty_string ) { | ||
| 487 | |||
| 488 | $suvelan_nsel->{_verbose} = $verbose; | ||
| 489 | $suvelan_nsel->{_note} = $suvelan_nsel->{_note}.' verbose='.$suvelan_nsel->{_verbose}; | ||
| 490 | $suvelan_nsel->{_Step} = $suvelan_nsel->{_Step}.' verbose='.$suvelan_nsel->{_verbose}; | ||
| 491 | |||
| 492 | } else { | ||
| 493 | print("suvelan_nsel, verbose, missing verbose,\n"); | ||
| 494 | } | ||
| 495 | } | ||
| 496 | |||
| 497 | |||
| 498 | =head2 sub get_max_index | ||
| 499 | |||
| 500 | max index = number of input variables -1 | ||
| 501 | |||
| 502 | =cut | ||
| 503 | |||
| 504 | sub get_max_index { | ||
| 505 | my ($self) = @_; | ||
| 506 | my $max_index = 10; | ||
| 507 | |||
| 508 | return($max_index); | ||
| 509 | } | ||
| 510 | |||
| 511 | |||
| 512 | 1; |