lib/App/SeismicUnixGui/sunix/NMO_Vel_Stk/surecip.pm untested

filter: Statementstmt 0.0% 0 / 37 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 51 CC 1 SCAR 6.9
CC
1
Cov
0%
Step
2.0
note
2.0
clear
2.0
CRAP 2.0
1 package App::SeismicUnixGui::sunix::NMO_Vel_Stk::surecip;
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 SURECIP - sum opposing offsets in prepared data (see below)
25  
26  
27  
28 surecip <stdin >stdout
29  
30  
31  
32 opt=null
33  
34 Sum traces with equal positive and negative offsets (i.e. assume
35  
36 reciprocity holds).
37  
38  
39  
40 Usage:
41  
42 suabshw <data >absdata
43  
44 susort cdp offset <absdata | surecip >sumdata
45  
46  
47  
48 Note that this processing stream can be simply evoked by:
49  
50  
51  
52 recip data sumdata
53  
54  
55  
56  
57  
58 Credits:
59  
60 SEP: Shuki Ronen
61  
62 CWP: Jack Cohen
63  
64  
65  
66 Caveat:
67  
68 The assumption is that this operation is not a mainstay processing
69  
70 item. Hence the recommended implemention via the 'recip' shell
71  
72 script. If it becomes a mainstay, then a much faster code can
73  
74 quickly drummed up by incorporating portions of suabshw and
75  
76 susort.
77  
78  
79  
80 Trace header fields accessed: ns
81  
82 Trace header fields modified: nhs, tracl, sx, gx
83  
84  
85  
86 =head2 User's notes (Juan Lorenzo)
87 untested
88  
89 =cut
90  
91  
92 =head2 CHANGES and their DATES
93  
94 =cut
95  
96 use Moose;
97 our $VERSION = '0.0.1';
98  
99  
100 =head2 Import packages
101  
102 =cut
103  
104 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
105  
106 use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su);
107 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
108  
109  
110 =head2 instantiation of packages
111  
112 =cut
113  
114 my $get = L_SU_global_constants->new();
115 my $Project = Project_config->new();
116 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
117 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
118 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
119  
120 my $PS_SEISMIC = $Project->PS_SEISMIC();
121  
122 my $var = $get->var();
123 my $on = $var->{_on};
124 my $off = $var->{_off};
125 my $true = $var->{_true};
126 my $false = $var->{_false};
127 my $empty_string = $var->{_empty_string};
128  
129 =head2 Encapsulated
130 hash of private variables
131  
132 =cut
133  
134 my $surecip = {
135 _opt => '',
136 _Step => '',
137 _note => '',
138  
139 };
140  
141 =head2 sub Step
142  
143 collects switches and assembles bash instructions
144 by adding the program name
145  
146 =cut
147  
148 sub Step {
149  
150 $surecip->{_Step} = 'surecip'.$surecip->{_Step};
151 return ( $surecip->{_Step} );
152  
153 }
154  
155  
156 =head2 sub note
157  
158 collects switches and assembles bash instructions
159 by adding the program name
160  
161 =cut
162  
163 sub note {
164  
165 $surecip->{_note} = 'surecip'.$surecip->{_note};
166 return ( $surecip->{_note} );
167  
168 }
169  
170  
171  
172 =head2 sub clear
173  
174 =cut
175  
176 sub clear {
177  
178 $surecip->{_opt} = '';
179 $surecip->{_Step} = '';
180 $surecip->{_note} = '';
181 }
182  
183  
184 =head2 sub opt
185  
186  
187 =cut
188  
189 sub opt {
190  
191 my ( $self,$opt ) = @_;
192 # if ( $opt ne $empty_string ) {
193 #
194 # $surecip->{_opt} = $opt;
195 # $surecip->{_note} = $surecip->{_note}.' opt='.$surecip->{_opt};
196 # $surecip->{_Step} = $surecip->{_Step}.' opt='.$surecip->{_opt};
197 #
198 # } else {
199 # print("surecip, opt, missing opt,\n");
200 # }
201 }
202  
203  
204 =head2 sub get_max_index
205  
206 max index = number of input variables -1
207
208 =cut
209
210 sub get_max_index {
211 my ($self) = @_;
212 my $max_index = 0;
213  
214 return($max_index);
215 }
216
217
218 1;