« lib/App/SeismicUnixGui/misc/L_SU_global_constants.pm
↑ Summary
lib/App/SeismicUnixGui/developer/code/sunix/sunix_package.pm »
| 1 | package App::SeismicUnixGui::sunix::shapeNcut::sugprfb; | ||
| 2 | |||
| 3 | =head1 DOCUMENTATION | ||
| 4 | |||
| 5 | =head2 SYNOPSIS | ||
| 6 | |||
| 7 | PERL PROGRAM NAME: SUGPRFB - SU program to remove First Breaks from GPR data | ||
| 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 | SUGPRFB - SU program to remove First Breaks from GPR data | ||
| 22 | |||
| 23 | sugprfb < radar traces >outfile | ||
| 24 | |||
| 25 | nx=51 number of traces to sum to create pilot trace (odd) | ||
| 26 | fbt=60 length of first break in number of samples | ||
| 27 | |||
| 28 | Notes: | ||
| 29 | The first fbt samples from nx traces are stacked to form a pilot | ||
| 30 | first break trace, this is fitted to the actual traces by shifting | ||
| 31 | and scaling. The nx traces long spatial window is | ||
| 32 | slided along the section and a new pilot traces is formed for each | ||
| 33 | position. The scalers in percent and the time shifts are stored in | ||
| 34 | header words trwf and grnors. | ||
| 35 | =head2 CHANGES and their DATES | ||
| 36 | |||
| 37 | =cut | ||
| 38 | |||
| 39 | use Moose; | ||
| 40 | our $VERSION = '0.0.1'; | ||
| 41 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 42 | |||
| 43 | my $get = L_SU_global_constants->new(); | ||
| 44 | |||
| 45 | my $var = $get->var(); | ||
| 46 | my $empty_string = $var->{_empty_string}; | ||
| 47 | |||
| 48 | my $sugprfb = { | ||
| 49 | _fbt => '', | ||
| 50 | _nx => '', | ||
| 51 | _Step => '', | ||
| 52 | _note => '', | ||
| 53 | }; | ||
| 54 | |||
| 55 | =head2 sub Step | ||
| 56 | |||
| 57 | collects switches and assembles bash instructions | ||
| 58 | by adding the program name | ||
| 59 | |||
| 60 | =cut | ||
| 61 | |||
| 62 | sub Step { | ||
| 63 | |||
| 64 | $sugprfb->{_Step} = 'sugprfb' . $sugprfb->{_Step}; | ||
| 65 | return ( $sugprfb->{_Step} ); | ||
| 66 | |||
| 67 | } | ||
| 68 | |||
| 69 | =head2 sub note | ||
| 70 | |||
| 71 | collects switches and assembles bash instructions | ||
| 72 | by adding the program name | ||
| 73 | |||
| 74 | =cut | ||
| 75 | |||
| 76 | sub note { | ||
| 77 | |||
| 78 | $sugprfb->{_note} = 'sugprfb' . $sugprfb->{_note}; | ||
| 79 | return ( $sugprfb->{_note} ); | ||
| 80 | |||
| 81 | } | ||
| 82 | |||
| 83 | =head2 sub clear | ||
| 84 | |||
| 85 | =cut | ||
| 86 | |||
| 87 | sub clear { | ||
| 88 | |||
| 89 | $sugprfb->{_fbt} = ''; | ||
| 90 | $sugprfb->{_nx} = ''; | ||
| 91 | $sugprfb->{_Step} = ''; | ||
| 92 | $sugprfb->{_note} = ''; | ||
| 93 | } | ||
| 94 | |||
| 95 | =head2 sub fbt | ||
| 96 | |||
| 97 | |||
| 98 | =cut | ||
| 99 | |||
| 100 | sub fbt { | ||
| 101 | |||
| 102 | my ( $self, $fbt ) = @_; | ||
| 103 | if ( $fbt ne $empty_string ) { | ||
| 104 | |||
| 105 | $sugprfb->{_fbt} = $fbt; | ||
| 106 | $sugprfb->{_note} = $sugprfb->{_note} . ' fbt=' . $sugprfb->{_fbt}; | ||
| 107 | $sugprfb->{_Step} = $sugprfb->{_Step} . ' fbt=' . $sugprfb->{_fbt}; | ||
| 108 | |||
| 109 | } | ||
| 110 | else { | ||
| 111 | print("sugprfb, fbt, missing fbt,\n"); | ||
| 112 | } | ||
| 113 | } | ||
| 114 | |||
| 115 | =head2 sub nx | ||
| 116 | |||
| 117 | |||
| 118 | =cut | ||
| 119 | |||
| 120 | sub nx { | ||
| 121 | |||
| 122 | my ( $self, $nx ) = @_; | ||
| 123 | if ( $nx ne $empty_string ) { | ||
| 124 | |||
| 125 | $sugprfb->{_nx} = $nx; | ||
| 126 | $sugprfb->{_note} = $sugprfb->{_note} . ' nx=' . $sugprfb->{_nx}; | ||
| 127 | $sugprfb->{_Step} = $sugprfb->{_Step} . ' nx=' . $sugprfb->{_nx}; | ||
| 128 | |||
| 129 | } | ||
| 130 | else { | ||
| 131 | print("sugprfb, nx, missing nx,\n"); | ||
| 132 | } | ||
| 133 | } | ||
| 134 | |||
| 135 | =head2 sub get_max_index | ||
| 136 | |||
| 137 | max index = number of input variables -1 | ||
| 138 | |||
| 139 | =cut | ||
| 140 | |||
| 141 | sub get_max_index { | ||
| 142 | my ($self) = @_; | ||
| 143 | my $max_index = 1; | ||
| 144 | |||
| 145 | return ($max_index); | ||
| 146 | } | ||
| 147 | |||
| 148 | 1; |