lib/App/SeismicUnixGui/sunix/filter/succfilt.pm untested

filter: Statementstmt 0.0% 0 / 70 Branchbran 0.0% 0 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 13 Podpod 0.0% 0 / 9 totaltotal 0.0% 0 / 102 CC 6 SCAR 14.4
CC
6
Cov
0%
cch
6.0
ccl
6.0
dir
6.0
CRAP 4.2
1 package App::SeismicUnixGui::sunix::filter::succfilt;
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 SUCCFILT - FX domain Correlation Coefficient FILTER
25  
26  
27  
28 sucff < stdin > stdout [optional parameters]
29  
30  
31  
32 Optional parameters:
33  
34 cch=1.0 Correlation coefficient high pass value
35  
36 ccl=0.3 Correlation coefficient low pass value
37  
38 key=ep ensemble identifier
39  
40 padd=25 FFT padding in percentage
41  
42  
43  
44 Notes:
45  
46 This program uses "get_gather" and "put_gather" so requires that
47  
48 the data be sorted into ensembles designated by "key", with the ntr
49  
50 field set to the number of traces in each respective ensemble.
51  
52  
53  
54 Example:
55  
56 susort ep offset < data.su > datasorted.su
57  
58 suputgthr dir=Data verbose=1 < datasorted.su
59  
60 sugetgthr dir=Data verbose=1 > dataupdated.su
61  
62 succfilt < dataupdated.su > ccfiltdata.su
63  
64  
65  
66 (Work in progress, editing required)
67  
68  
69  
70
71  
72 Credits:
73  
74 Potash Corporation: Balazs Nemeth, Saskatoon Canada. c. 2008
75  
76  
77  
78  
79  
80  
81  
82 =head2 User's notes (Juan Lorenzo)
83 untested
84  
85 =cut
86  
87  
88 =head2 CHANGES and their DATES
89  
90 =cut
91  
92 use Moose;
93 our $VERSION = '0.0.1';
94  
95  
96 =head2 Import packages
97  
98 =cut
99  
100 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
101  
102 use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su);
103 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
104  
105  
106 =head2 instantiation of packages
107  
108 =cut
109  
110 my $get = L_SU_global_constants->new();
111 my $Project = Project_config->new();
112 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
113 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
114 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
115  
116 my $PS_SEISMIC = $Project->PS_SEISMIC();
117  
118 my $var = $get->var();
119 my $on = $var->{_on};
120 my $off = $var->{_off};
121 my $true = $var->{_true};
122 my $false = $var->{_false};
123 my $empty_string = $var->{_empty_string};
124  
125 =head2 Encapsulated
126 hash of private variables
127  
128 =cut
129  
130 my $succfilt = {
131 _cch => '',
132 _ccl => '',
133 _dir => '',
134 _key => '',
135 _padd => '',
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 $succfilt->{_Step} = 'succfilt'.$succfilt->{_Step};
151 return ( $succfilt->{_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 $succfilt->{_note} = 'succfilt'.$succfilt->{_note};
166 return ( $succfilt->{_note} );
167  
168 }
169  
170  
171  
172 =head2 sub clear
173  
174 =cut
175  
176 sub clear {
177  
178 $succfilt->{_cch} = '';
179 $succfilt->{_ccl} = '';
180 $succfilt->{_dir} = '';
181 $succfilt->{_key} = '';
182 $succfilt->{_padd} = '';
183 $succfilt->{_Step} = '';
184 $succfilt->{_note} = '';
185 }
186  
187  
188 =head2 sub cch
189  
190  
191 =cut
192  
193 sub cch {
194  
195 my ( $self,$cch ) = @_;
196 if ( $cch ne $empty_string ) {
197  
198 $succfilt->{_cch} = $cch;
199 $succfilt->{_note} = $succfilt->{_note}.' cch='.$succfilt->{_cch};
200 $succfilt->{_Step} = $succfilt->{_Step}.' cch='.$succfilt->{_cch};
201  
202 } else {
203 print("succfilt, cch, missing cch,\n");
204 }
205 }
206  
207  
208 =head2 sub ccl
209  
210  
211 =cut
212  
213 sub ccl {
214  
215 my ( $self,$ccl ) = @_;
216 if ( $ccl ne $empty_string ) {
217  
218 $succfilt->{_ccl} = $ccl;
219 $succfilt->{_note} = $succfilt->{_note}.' ccl='.$succfilt->{_ccl};
220 $succfilt->{_Step} = $succfilt->{_Step}.' ccl='.$succfilt->{_ccl};
221  
222 } else {
223 print("succfilt, ccl, missing ccl,\n");
224 }
225 }
226  
227  
228 =head2 sub dir
229  
230  
231 =cut
232  
233 sub dir {
234  
235 my ( $self,$dir ) = @_;
236 if ( $dir ne $empty_string ) {
237  
238 $succfilt->{_dir} = $dir;
239 $succfilt->{_note} = $succfilt->{_note}.' dir='.$succfilt->{_dir};
240 $succfilt->{_Step} = $succfilt->{_Step}.' dir='.$succfilt->{_dir};
241  
242 } else {
243 print("succfilt, dir, missing dir,\n");
244 }
245 }
246  
247  
248 =head2 sub key
249  
250  
251 =cut
252  
253 sub key {
254  
255 my ( $self,$key ) = @_;
256 if ( $key ne $empty_string ) {
257  
258 $succfilt->{_key} = $key;
259 $succfilt->{_note} = $succfilt->{_note}.' key='.$succfilt->{_key};
260 $succfilt->{_Step} = $succfilt->{_Step}.' key='.$succfilt->{_key};
261  
262 } else {
263 print("succfilt, key, missing key,\n");
264 }
265 }
266  
267  
268 =head2 sub padd
269  
270  
271 =cut
272  
273 sub padd {
274  
275 my ( $self,$padd ) = @_;
276 if ( $padd ne $empty_string ) {
277  
278 $succfilt->{_padd} = $padd;
279 $succfilt->{_note} = $succfilt->{_note}.' padd='.$succfilt->{_padd};
280 $succfilt->{_Step} = $succfilt->{_Step}.' padd='.$succfilt->{_padd};
281  
282 } else {
283 print("succfilt, padd, missing padd,\n");
284 }
285 }
286  
287  
288 =head2 sub get_max_index
289  
290 max index = number of input variables -1
291
292 =cut
293
294 sub get_max_index {
295 my ($self) = @_;
296 my $max_index = 4;
297  
298 return($max_index);
299 }
300
301
302 1;