« lib/App/SeismicUnixGui/sunix/filter/sufxdecon.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/header/segyhdrs_old.pm »
| 1 | package App::SeismicUnixGui::sunix::filter::supofilt; | ||
| 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 | SUPOFILT - POlarization FILTer for three-component data | ||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | supofilt <stdin >stdout [optional parameters] | ||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | Required parameters: | ||
| 33 | |||
| 34 | dfile=polar.dir file containing the 3 components of the | ||
| 35 | |||
| 36 | direction of polarization | ||
| 37 | |||
| 38 | wfile=polar.rl file name of weighting polarization parameter | ||
| 39 | |||
| 40 | |||
| 41 | |||
| 42 | Optional parameters: | ||
| 43 | |||
| 44 | dt=(from header) time sampling intervall in seconds | ||
| 45 | |||
| 46 | smooth=1 1 = smooth filter operators, 0 do not | ||
| 47 | |||
| 48 | sl=0.05 smoothing window length in seconds | ||
| 49 | |||
| 50 | wpow=1.0 raise weighting function to power wpow | ||
| 51 | |||
| 52 | dpow=1.0 raise directivity functions to power dpow | ||
| 53 | |||
| 54 | verbose=0 1 = echo additional information | ||
| 55 | |||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | |||
| 60 | Notes: | ||
| 61 | |||
| 62 | Three adjacent traces are considered as one three-component | ||
| 63 | |||
| 64 | dataset. | ||
| 65 | |||
| 66 | |||
| 67 | |||
| 68 | This program SUPOFILT is an extension to the polarization analysis | ||
| 69 | |||
| 70 | program supolar. The files wfile and dfile are SU files as written | ||
| 71 | |||
| 72 | by SUPOLAR. | ||
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | |||
| 78 | |||
| 79 | |||
| 80 | Author: Nils Maercklin, | ||
| 81 | |||
| 82 | GeoForschungsZentrum (GFZ) Potsdam, Germany, 1999-2000. | ||
| 83 | |||
| 84 | E-mail: nils@gfz-potsdam.de | ||
| 85 | |||
| 86 | |||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | References: | ||
| 91 | |||
| 92 | Benhama, A., Cliet, C. and Dubesset, M., 1986: Study and | ||
| 93 | |||
| 94 | Application of spatial directional filtering in three | ||
| 95 | |||
| 96 | component recordings. | ||
| 97 | |||
| 98 | Geophysical Prospecting, vol. 36. | ||
| 99 | |||
| 100 | Kanasewich, E. R., 1981: Time Sequence Analysis in Geophysics, | ||
| 101 | |||
| 102 | The University of Alberta Press. | ||
| 103 | |||
| 104 | Kanasewich, E. R., 1990: Seismic Noise Attenuation, | ||
| 105 | |||
| 106 | Handbook of Geophysical Exploration, Pergamon Press, Oxford. | ||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | |||
| 112 | Trace header fields accessed: ns, dt | ||
| 113 | |||
| 114 | |||
| 115 | |||
| 116 | =head2 User's notes (Juan Lorenzo) | ||
| 117 | untested | ||
| 118 | |||
| 119 | =cut | ||
| 120 | |||
| 121 | |||
| 122 | =head2 CHANGES and their DATES | ||
| 123 | |||
| 124 | =cut | ||
| 125 | |||
| 126 | use Moose; | ||
| 127 | our $VERSION = '0.0.1'; | ||
| 128 | |||
| 129 | |||
| 130 | =head2 Import packages | ||
| 131 | |||
| 132 | =cut | ||
| 133 | |||
| 134 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 135 | |||
| 136 | use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su); | ||
| 137 | use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config'; | ||
| 138 | |||
| 139 | |||
| 140 | =head2 instantiation of packages | ||
| 141 | |||
| 142 | =cut | ||
| 143 | |||
| 144 | my $get = L_SU_global_constants->new(); | ||
| 145 | my $Project = Project_config->new(); | ||
| 146 | my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU(); | ||
| 147 | my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN(); | ||
| 148 | my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT(); | ||
| 149 | |||
| 150 | my $PS_SEISMIC = $Project->PS_SEISMIC(); | ||
| 151 | |||
| 152 | my $var = $get->var(); | ||
| 153 | my $on = $var->{_on}; | ||
| 154 | my $off = $var->{_off}; | ||
| 155 | my $true = $var->{_true}; | ||
| 156 | my $false = $var->{_false}; | ||
| 157 | my $empty_string = $var->{_empty_string}; | ||
| 158 | |||
| 159 | =head2 Encapsulated | ||
| 160 | hash of private variables | ||
| 161 | |||
| 162 | =cut | ||
| 163 | |||
| 164 | my $supofilt = { | ||
| 165 | _dfile => '', | ||
| 166 | _dpow => '', | ||
| 167 | _dt => '', | ||
| 168 | _sl => '', | ||
| 169 | _smooth => '', | ||
| 170 | _verbose => '', | ||
| 171 | _wfile => '', | ||
| 172 | _wpow => '', | ||
| 173 | _Step => '', | ||
| 174 | _note => '', | ||
| 175 | |||
| 176 | }; | ||
| 177 | |||
| 178 | =head2 sub Step | ||
| 179 | |||
| 180 | collects switches and assembles bash instructions | ||
| 181 | by adding the program name | ||
| 182 | |||
| 183 | =cut | ||
| 184 | |||
| 185 | sub Step { | ||
| 186 | |||
| 187 | $supofilt->{_Step} = 'supofilt'.$supofilt->{_Step}; | ||
| 188 | return ( $supofilt->{_Step} ); | ||
| 189 | |||
| 190 | } | ||
| 191 | |||
| 192 | |||
| 193 | =head2 sub note | ||
| 194 | |||
| 195 | collects switches and assembles bash instructions | ||
| 196 | by adding the program name | ||
| 197 | |||
| 198 | =cut | ||
| 199 | |||
| 200 | sub note { | ||
| 201 | |||
| 202 | $supofilt->{_note} = 'supofilt'.$supofilt->{_note}; | ||
| 203 | return ( $supofilt->{_note} ); | ||
| 204 | |||
| 205 | } | ||
| 206 | |||
| 207 | |||
| 208 | |||
| 209 | =head2 sub clear | ||
| 210 | |||
| 211 | =cut | ||
| 212 | |||
| 213 | sub clear { | ||
| 214 | |||
| 215 | $supofilt->{_dfile} = ''; | ||
| 216 | $supofilt->{_dpow} = ''; | ||
| 217 | $supofilt->{_dt} = ''; | ||
| 218 | $supofilt->{_sl} = ''; | ||
| 219 | $supofilt->{_smooth} = ''; | ||
| 220 | $supofilt->{_verbose} = ''; | ||
| 221 | $supofilt->{_wfile} = ''; | ||
| 222 | $supofilt->{_wpow} = ''; | ||
| 223 | $supofilt->{_Step} = ''; | ||
| 224 | $supofilt->{_note} = ''; | ||
| 225 | } | ||
| 226 | |||
| 227 | |||
| 228 | =head2 sub dfile | ||
| 229 | |||
| 230 | |||
| 231 | =cut | ||
| 232 | |||
| 233 | sub dfile { | ||
| 234 | |||
| 235 | my ( $self,$dfile ) = @_; | ||
| 236 | if ( $dfile ne $empty_string ) { | ||
| 237 | |||
| 238 | $supofilt->{_dfile} = $dfile; | ||
| 239 | $supofilt->{_note} = $supofilt->{_note}.' dfile='.$supofilt->{_dfile}; | ||
| 240 | $supofilt->{_Step} = $supofilt->{_Step}.' dfile='.$supofilt->{_dfile}; | ||
| 241 | |||
| 242 | } else { | ||
| 243 | print("supofilt, dfile, missing dfile,\n"); | ||
| 244 | } | ||
| 245 | } | ||
| 246 | |||
| 247 | |||
| 248 | =head2 sub dpow | ||
| 249 | |||
| 250 | |||
| 251 | =cut | ||
| 252 | |||
| 253 | sub dpow { | ||
| 254 | |||
| 255 | my ( $self,$dpow ) = @_; | ||
| 256 | if ( $dpow ne $empty_string ) { | ||
| 257 | |||
| 258 | $supofilt->{_dpow} = $dpow; | ||
| 259 | $supofilt->{_note} = $supofilt->{_note}.' dpow='.$supofilt->{_dpow}; | ||
| 260 | $supofilt->{_Step} = $supofilt->{_Step}.' dpow='.$supofilt->{_dpow}; | ||
| 261 | |||
| 262 | } else { | ||
| 263 | print("supofilt, dpow, missing dpow,\n"); | ||
| 264 | } | ||
| 265 | } | ||
| 266 | |||
| 267 | |||
| 268 | =head2 sub dt | ||
| 269 | |||
| 270 | |||
| 271 | =cut | ||
| 272 | |||
| 273 | sub dt { | ||
| 274 | |||
| 275 | my ( $self,$dt ) = @_; | ||
| 276 | if ( $dt ne $empty_string ) { | ||
| 277 | |||
| 278 | $supofilt->{_dt} = $dt; | ||
| 279 | $supofilt->{_note} = $supofilt->{_note}.' dt='.$supofilt->{_dt}; | ||
| 280 | $supofilt->{_Step} = $supofilt->{_Step}.' dt='.$supofilt->{_dt}; | ||
| 281 | |||
| 282 | } else { | ||
| 283 | print("supofilt, dt, missing dt,\n"); | ||
| 284 | } | ||
| 285 | } | ||
| 286 | |||
| 287 | |||
| 288 | =head2 sub sl | ||
| 289 | |||
| 290 | |||
| 291 | =cut | ||
| 292 | |||
| 293 | sub sl { | ||
| 294 | |||
| 295 | my ( $self,$sl ) = @_; | ||
| 296 | if ( $sl ne $empty_string ) { | ||
| 297 | |||
| 298 | $supofilt->{_sl} = $sl; | ||
| 299 | $supofilt->{_note} = $supofilt->{_note}.' sl='.$supofilt->{_sl}; | ||
| 300 | $supofilt->{_Step} = $supofilt->{_Step}.' sl='.$supofilt->{_sl}; | ||
| 301 | |||
| 302 | } else { | ||
| 303 | print("supofilt, sl, missing sl,\n"); | ||
| 304 | } | ||
| 305 | } | ||
| 306 | |||
| 307 | |||
| 308 | =head2 sub smooth | ||
| 309 | |||
| 310 | |||
| 311 | =cut | ||
| 312 | |||
| 313 | sub smooth { | ||
| 314 | |||
| 315 | my ( $self,$smooth ) = @_; | ||
| 316 | if ( $smooth ne $empty_string ) { | ||
| 317 | |||
| 318 | $supofilt->{_smooth} = $smooth; | ||
| 319 | $supofilt->{_note} = $supofilt->{_note}.' smooth='.$supofilt->{_smooth}; | ||
| 320 | $supofilt->{_Step} = $supofilt->{_Step}.' smooth='.$supofilt->{_smooth}; | ||
| 321 | |||
| 322 | } else { | ||
| 323 | print("supofilt, smooth, missing smooth,\n"); | ||
| 324 | } | ||
| 325 | } | ||
| 326 | |||
| 327 | |||
| 328 | =head2 sub verbose | ||
| 329 | |||
| 330 | |||
| 331 | =cut | ||
| 332 | |||
| 333 | sub verbose { | ||
| 334 | |||
| 335 | my ( $self,$verbose ) = @_; | ||
| 336 | if ( $verbose ne $empty_string ) { | ||
| 337 | |||
| 338 | $supofilt->{_verbose} = $verbose; | ||
| 339 | $supofilt->{_note} = $supofilt->{_note}.' verbose='.$supofilt->{_verbose}; | ||
| 340 | $supofilt->{_Step} = $supofilt->{_Step}.' verbose='.$supofilt->{_verbose}; | ||
| 341 | |||
| 342 | } else { | ||
| 343 | print("supofilt, verbose, missing verbose,\n"); | ||
| 344 | } | ||
| 345 | } | ||
| 346 | |||
| 347 | |||
| 348 | =head2 sub wfile | ||
| 349 | |||
| 350 | |||
| 351 | =cut | ||
| 352 | |||
| 353 | sub wfile { | ||
| 354 | |||
| 355 | my ( $self,$wfile ) = @_; | ||
| 356 | if ( $wfile ne $empty_string ) { | ||
| 357 | |||
| 358 | $supofilt->{_wfile} = $wfile; | ||
| 359 | $supofilt->{_note} = $supofilt->{_note}.' wfile='.$supofilt->{_wfile}; | ||
| 360 | $supofilt->{_Step} = $supofilt->{_Step}.' wfile='.$supofilt->{_wfile}; | ||
| 361 | |||
| 362 | } else { | ||
| 363 | print("supofilt, wfile, missing wfile,\n"); | ||
| 364 | } | ||
| 365 | } | ||
| 366 | |||
| 367 | |||
| 368 | =head2 sub wpow | ||
| 369 | |||
| 370 | |||
| 371 | =cut | ||
| 372 | |||
| 373 | sub wpow { | ||
| 374 | |||
| 375 | my ( $self,$wpow ) = @_; | ||
| 376 | if ( $wpow ne $empty_string ) { | ||
| 377 | |||
| 378 | $supofilt->{_wpow} = $wpow; | ||
| 379 | $supofilt->{_note} = $supofilt->{_note}.' wpow='.$supofilt->{_wpow}; | ||
| 380 | $supofilt->{_Step} = $supofilt->{_Step}.' wpow='.$supofilt->{_wpow}; | ||
| 381 | |||
| 382 | } else { | ||
| 383 | print("supofilt, wpow, missing wpow,\n"); | ||
| 384 | } | ||
| 385 | } | ||
| 386 | |||
| 387 | |||
| 388 | =head2 sub get_max_index | ||
| 389 | |||
| 390 | max index = number of input variables -1 | ||
| 391 | |||
| 392 | =cut | ||
| 393 | |||
| 394 | sub get_max_index { | ||
| 395 | my ($self) = @_; | ||
| 396 | my $max_index = 7; | ||
| 397 | |||
| 398 | return($max_index); | ||
| 399 | } | ||
| 400 | |||
| 401 | |||
| 402 | 1; |