« lib/App/SeismicUnixGui/sunix/well/las2su.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/NMO_Vel_Stk/suvelan_nccs.pm »
| 1 | package App::SeismicUnixGui::sunix::NMO_Vel_Stk::sudmotx; | ||
| 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 | SUDMOTX - DMO via T-X domain (Kirchhoff) method for common-offset gathers | ||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | sudmotx <stdin >stdout cdpmin= cdpmax= dxcdp= noffmix= [optional parms] | ||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | Required Parameters: | ||
| 33 | |||
| 34 | cdpmin= minimum cdp (integer number) for which to apply DMO | ||
| 35 | |||
| 36 | cdpmax= maximum cdp (integer number) for which to apply DMO | ||
| 37 | |||
| 38 | dxcdp= distance between successive cdps | ||
| 39 | |||
| 40 | noffmix= number of offsets to mix (see notes) | ||
| 41 | |||
| 42 | |||
| 43 | |||
| 44 | Optional Parameters: | ||
| 45 | |||
| 46 | offmax=3000.0 maximum offset | ||
| 47 | |||
| 48 | tmute=2.0 mute time at maximum offset offmax | ||
| 49 | |||
| 50 | vrms=1500.0 RMS velocity at mute time tmute | ||
| 51 | |||
| 52 | verbose=0 =1 for diagnostic print | ||
| 53 | |||
| 54 | tmpdir= if non-empty, use the value as a directory path prefix | ||
| 55 | |||
| 56 | for storing temporary files; else if the CWP_TMPDIR | ||
| 57 | |||
| 58 | environment variable is set use its value for the path; | ||
| 59 | |||
| 60 | else use tmpfile() | ||
| 61 | |||
| 62 | |||
| 63 | |||
| 64 | |||
| 65 | |||
| 66 | Notes: | ||
| 67 | |||
| 68 | Input traces should be sorted into common-offset gathers. One common- | ||
| 69 | |||
| 70 | offset gather ends and another begins when the offset field of the trace | ||
| 71 | |||
| 72 | headers changes. | ||
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | The cdp field of the input trace headers must be the cdp bin NUMBER, NOT | ||
| 77 | |||
| 78 | the cdp location expressed in units of meters or feet. | ||
| 79 | |||
| 80 | |||
| 81 | |||
| 82 | The number of offsets to mix (noffmix) should typically equal the ratio of | ||
| 83 | |||
| 84 | the shotpoint spacing to the cdp spacing. This choice ensures that every | ||
| 85 | |||
| 86 | cdp will be represented in each offset mix. Traces in each mix will | ||
| 87 | |||
| 88 | contribute through DMO to other traces in adjacent cdps within that mix. | ||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | The defaults for offmax and vrms are appropriate only for metric units. | ||
| 93 | |||
| 94 | If distances are measured in feet, then these parameters should be | ||
| 95 | |||
| 96 | specified explicitly. | ||
| 97 | |||
| 98 | |||
| 99 | |||
| 100 | offmax, tmute, and vrms need not be specified precisely. | ||
| 101 | |||
| 102 | If these values are unknown, then one should overestimate offmax | ||
| 103 | |||
| 104 | and underestimate tmute and vrms. | ||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | No muting is actually performed. The tmute parameter is used only to | ||
| 109 | |||
| 110 | determine parameters required to perform DMO. | ||
| 111 | |||
| 112 | |||
| 113 | |||
| 114 | Credits: | ||
| 115 | |||
| 116 | CWP: Dave Hale | ||
| 117 | |||
| 118 | |||
| 119 | |||
| 120 | Technical Reference: | ||
| 121 | |||
| 122 | A non-aliased integral method for dip-moveout | ||
| 123 | |||
| 124 | Dave Hale | ||
| 125 | |||
| 126 | submitted to Geophysics, June, 1990 | ||
| 127 | |||
| 128 | |||
| 129 | |||
| 130 | Trace header fields accessed: ns, dt, delrt, offset, cdp. | ||
| 131 | |||
| 132 | |||
| 133 | |||
| 134 | =head2 User's notes (Juan Lorenzo) | ||
| 135 | untested | ||
| 136 | |||
| 137 | =cut | ||
| 138 | |||
| 139 | |||
| 140 | =head2 CHANGES and their DATES | ||
| 141 | |||
| 142 | =cut | ||
| 143 | |||
| 144 | use Moose; | ||
| 145 | our $VERSION = '0.0.1'; | ||
| 146 | |||
| 147 | |||
| 148 | =head2 Import packages | ||
| 149 | |||
| 150 | =cut | ||
| 151 | |||
| 152 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 153 | |||
| 154 | use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su); | ||
| 155 | use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config'; | ||
| 156 | |||
| 157 | |||
| 158 | =head2 instantiation of packages | ||
| 159 | |||
| 160 | =cut | ||
| 161 | |||
| 162 | my $get = L_SU_global_constants->new(); | ||
| 163 | my $Project = Project_config->new(); | ||
| 164 | my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU(); | ||
| 165 | my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN(); | ||
| 166 | my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT(); | ||
| 167 | |||
| 168 | my $PS_SEISMIC = $Project->PS_SEISMIC(); | ||
| 169 | |||
| 170 | my $var = $get->var(); | ||
| 171 | my $on = $var->{_on}; | ||
| 172 | my $off = $var->{_off}; | ||
| 173 | my $true = $var->{_true}; | ||
| 174 | my $false = $var->{_false}; | ||
| 175 | my $empty_string = $var->{_empty_string}; | ||
| 176 | |||
| 177 | =head2 Encapsulated | ||
| 178 | hash of private variables | ||
| 179 | |||
| 180 | =cut | ||
| 181 | |||
| 182 | my $sudmotx = { | ||
| 183 | _cdpmax => '', | ||
| 184 | _cdpmin => '', | ||
| 185 | _dxcdp => '', | ||
| 186 | _noffmix => '', | ||
| 187 | _offmax => '', | ||
| 188 | _tmpdir => '', | ||
| 189 | _tmute => '', | ||
| 190 | _verbose => '', | ||
| 191 | _vrms => '', | ||
| 192 | _Step => '', | ||
| 193 | _note => '', | ||
| 194 | |||
| 195 | }; | ||
| 196 | |||
| 197 | =head2 sub Step | ||
| 198 | |||
| 199 | collects switches and assembles bash instructions | ||
| 200 | by adding the program name | ||
| 201 | |||
| 202 | =cut | ||
| 203 | |||
| 204 | sub Step { | ||
| 205 | |||
| 206 | $sudmotx->{_Step} = 'sudmotx'.$sudmotx->{_Step}; | ||
| 207 | return ( $sudmotx->{_Step} ); | ||
| 208 | |||
| 209 | } | ||
| 210 | |||
| 211 | |||
| 212 | =head2 sub note | ||
| 213 | |||
| 214 | collects switches and assembles bash instructions | ||
| 215 | by adding the program name | ||
| 216 | |||
| 217 | =cut | ||
| 218 | |||
| 219 | sub note { | ||
| 220 | |||
| 221 | $sudmotx->{_note} = 'sudmotx'.$sudmotx->{_note}; | ||
| 222 | return ( $sudmotx->{_note} ); | ||
| 223 | |||
| 224 | } | ||
| 225 | |||
| 226 | |||
| 227 | |||
| 228 | =head2 sub clear | ||
| 229 | |||
| 230 | =cut | ||
| 231 | |||
| 232 | sub clear { | ||
| 233 | |||
| 234 | $sudmotx->{_cdpmax} = ''; | ||
| 235 | $sudmotx->{_cdpmin} = ''; | ||
| 236 | $sudmotx->{_dxcdp} = ''; | ||
| 237 | $sudmotx->{_noffmix} = ''; | ||
| 238 | $sudmotx->{_offmax} = ''; | ||
| 239 | $sudmotx->{_tmpdir} = ''; | ||
| 240 | $sudmotx->{_tmute} = ''; | ||
| 241 | $sudmotx->{_verbose} = ''; | ||
| 242 | $sudmotx->{_vrms} = ''; | ||
| 243 | $sudmotx->{_Step} = ''; | ||
| 244 | $sudmotx->{_note} = ''; | ||
| 245 | } | ||
| 246 | |||
| 247 | |||
| 248 | =head2 sub cdpmax | ||
| 249 | |||
| 250 | |||
| 251 | =cut | ||
| 252 | |||
| 253 | sub cdpmax { | ||
| 254 | |||
| 255 | my ( $self,$cdpmax ) = @_; | ||
| 256 | if ( $cdpmax ne $empty_string ) { | ||
| 257 | |||
| 258 | $sudmotx->{_cdpmax} = $cdpmax; | ||
| 259 | $sudmotx->{_note} = $sudmotx->{_note}.' cdpmax='.$sudmotx->{_cdpmax}; | ||
| 260 | $sudmotx->{_Step} = $sudmotx->{_Step}.' cdpmax='.$sudmotx->{_cdpmax}; | ||
| 261 | |||
| 262 | } else { | ||
| 263 | print("sudmotx, cdpmax, missing cdpmax,\n"); | ||
| 264 | } | ||
| 265 | } | ||
| 266 | |||
| 267 | |||
| 268 | =head2 sub cdpmin | ||
| 269 | |||
| 270 | |||
| 271 | =cut | ||
| 272 | |||
| 273 | sub cdpmin { | ||
| 274 | |||
| 275 | my ( $self,$cdpmin ) = @_; | ||
| 276 | if ( $cdpmin ne $empty_string ) { | ||
| 277 | |||
| 278 | $sudmotx->{_cdpmin} = $cdpmin; | ||
| 279 | $sudmotx->{_note} = $sudmotx->{_note}.' cdpmin='.$sudmotx->{_cdpmin}; | ||
| 280 | $sudmotx->{_Step} = $sudmotx->{_Step}.' cdpmin='.$sudmotx->{_cdpmin}; | ||
| 281 | |||
| 282 | } else { | ||
| 283 | print("sudmotx, cdpmin, missing cdpmin,\n"); | ||
| 284 | } | ||
| 285 | } | ||
| 286 | |||
| 287 | |||
| 288 | =head2 sub dxcdp | ||
| 289 | |||
| 290 | |||
| 291 | =cut | ||
| 292 | |||
| 293 | sub dxcdp { | ||
| 294 | |||
| 295 | my ( $self,$dxcdp ) = @_; | ||
| 296 | if ( $dxcdp ne $empty_string ) { | ||
| 297 | |||
| 298 | $sudmotx->{_dxcdp} = $dxcdp; | ||
| 299 | $sudmotx->{_note} = $sudmotx->{_note}.' dxcdp='.$sudmotx->{_dxcdp}; | ||
| 300 | $sudmotx->{_Step} = $sudmotx->{_Step}.' dxcdp='.$sudmotx->{_dxcdp}; | ||
| 301 | |||
| 302 | } else { | ||
| 303 | print("sudmotx, dxcdp, missing dxcdp,\n"); | ||
| 304 | } | ||
| 305 | } | ||
| 306 | |||
| 307 | |||
| 308 | =head2 sub noffmix | ||
| 309 | |||
| 310 | |||
| 311 | =cut | ||
| 312 | |||
| 313 | sub noffmix { | ||
| 314 | |||
| 315 | my ( $self,$noffmix ) = @_; | ||
| 316 | if ( $noffmix ne $empty_string ) { | ||
| 317 | |||
| 318 | $sudmotx->{_noffmix} = $noffmix; | ||
| 319 | $sudmotx->{_note} = $sudmotx->{_note}.' noffmix='.$sudmotx->{_noffmix}; | ||
| 320 | $sudmotx->{_Step} = $sudmotx->{_Step}.' noffmix='.$sudmotx->{_noffmix}; | ||
| 321 | |||
| 322 | } else { | ||
| 323 | print("sudmotx, noffmix, missing noffmix,\n"); | ||
| 324 | } | ||
| 325 | } | ||
| 326 | |||
| 327 | |||
| 328 | =head2 sub offmax | ||
| 329 | |||
| 330 | |||
| 331 | =cut | ||
| 332 | |||
| 333 | sub offmax { | ||
| 334 | |||
| 335 | my ( $self,$offmax ) = @_; | ||
| 336 | if ( $offmax ne $empty_string ) { | ||
| 337 | |||
| 338 | $sudmotx->{_offmax} = $offmax; | ||
| 339 | $sudmotx->{_note} = $sudmotx->{_note}.' offmax='.$sudmotx->{_offmax}; | ||
| 340 | $sudmotx->{_Step} = $sudmotx->{_Step}.' offmax='.$sudmotx->{_offmax}; | ||
| 341 | |||
| 342 | } else { | ||
| 343 | print("sudmotx, offmax, missing offmax,\n"); | ||
| 344 | } | ||
| 345 | } | ||
| 346 | |||
| 347 | |||
| 348 | =head2 sub tmpdir | ||
| 349 | |||
| 350 | |||
| 351 | =cut | ||
| 352 | |||
| 353 | sub tmpdir { | ||
| 354 | |||
| 355 | my ( $self,$tmpdir ) = @_; | ||
| 356 | if ( $tmpdir ne $empty_string ) { | ||
| 357 | |||
| 358 | $sudmotx->{_tmpdir} = $tmpdir; | ||
| 359 | $sudmotx->{_note} = $sudmotx->{_note}.' tmpdir='.$sudmotx->{_tmpdir}; | ||
| 360 | $sudmotx->{_Step} = $sudmotx->{_Step}.' tmpdir='.$sudmotx->{_tmpdir}; | ||
| 361 | |||
| 362 | } else { | ||
| 363 | print("sudmotx, tmpdir, missing tmpdir,\n"); | ||
| 364 | } | ||
| 365 | } | ||
| 366 | |||
| 367 | |||
| 368 | =head2 sub tmute | ||
| 369 | |||
| 370 | |||
| 371 | =cut | ||
| 372 | |||
| 373 | sub tmute { | ||
| 374 | |||
| 375 | my ( $self,$tmute ) = @_; | ||
| 376 | if ( $tmute ne $empty_string ) { | ||
| 377 | |||
| 378 | $sudmotx->{_tmute} = $tmute; | ||
| 379 | $sudmotx->{_note} = $sudmotx->{_note}.' tmute='.$sudmotx->{_tmute}; | ||
| 380 | $sudmotx->{_Step} = $sudmotx->{_Step}.' tmute='.$sudmotx->{_tmute}; | ||
| 381 | |||
| 382 | } else { | ||
| 383 | print("sudmotx, tmute, missing tmute,\n"); | ||
| 384 | } | ||
| 385 | } | ||
| 386 | |||
| 387 | |||
| 388 | =head2 sub verbose | ||
| 389 | |||
| 390 | |||
| 391 | =cut | ||
| 392 | |||
| 393 | sub verbose { | ||
| 394 | |||
| 395 | my ( $self,$verbose ) = @_; | ||
| 396 | if ( $verbose ne $empty_string ) { | ||
| 397 | |||
| 398 | $sudmotx->{_verbose} = $verbose; | ||
| 399 | $sudmotx->{_note} = $sudmotx->{_note}.' verbose='.$sudmotx->{_verbose}; | ||
| 400 | $sudmotx->{_Step} = $sudmotx->{_Step}.' verbose='.$sudmotx->{_verbose}; | ||
| 401 | |||
| 402 | } else { | ||
| 403 | print("sudmotx, verbose, missing verbose,\n"); | ||
| 404 | } | ||
| 405 | } | ||
| 406 | |||
| 407 | |||
| 408 | =head2 sub vrms | ||
| 409 | |||
| 410 | |||
| 411 | =cut | ||
| 412 | |||
| 413 | sub vrms { | ||
| 414 | |||
| 415 | my ( $self,$vrms ) = @_; | ||
| 416 | if ( $vrms ne $empty_string ) { | ||
| 417 | |||
| 418 | $sudmotx->{_vrms} = $vrms; | ||
| 419 | $sudmotx->{_note} = $sudmotx->{_note}.' vrms='.$sudmotx->{_vrms}; | ||
| 420 | $sudmotx->{_Step} = $sudmotx->{_Step}.' vrms='.$sudmotx->{_vrms}; | ||
| 421 | |||
| 422 | } else { | ||
| 423 | print("sudmotx, vrms, missing vrms,\n"); | ||
| 424 | } | ||
| 425 | } | ||
| 426 | |||
| 427 | |||
| 428 | =head2 sub get_max_index | ||
| 429 | |||
| 430 | max index = number of input variables -1 | ||
| 431 | |||
| 432 | =cut | ||
| 433 | |||
| 434 | sub get_max_index { | ||
| 435 | my ($self) = @_; | ||
| 436 | my $max_index = 8; | ||
| 437 | |||
| 438 | return($max_index); | ||
| 439 | } | ||
| 440 | |||
| 441 | |||
| 442 | 1; |