lib/App/SeismicUnixGui/sunix/transform/suhilb.pm untested

filter: Statementstmt 0.0% 0 / 42 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 58 CC 2 SCAR 10.3
CC
2
Cov
0%
opt
6.0
Step
2.0
note
2.0
CRAP 2.8
1 package App::SeismicUnixGui::sunix::transform::suhilb;
2  
3 =head2 SYNOPSIS
4  
5 PERL PROGRAM NAME:
6  
7 AUTHOR:
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 SUHILB - Hilbert transform
25  
26  
27  
28 suhilb <stdin >sdout
29  
30  
31  
32 Note: the transform is computed in the direct (time) domain
33  
34  
35  
36 Optional parameters: none
37  
38  
39  
40 Required parameters: none
41  
42  
43  
44 opt=null
45  
46  
47  
48 Credits:
49  
50 CWP: Jack Cohen
51  
52 CWP: John Stockwell, modified to use Dave Hale's hilbert() subroutine
53  
54  
55  
56 Trace header fields accessed: ns, trid
57  
58  
59  
60 =head2 User's notes (Juan Lorenzo)
61 untested
62  
63 =cut
64  
65  
66 =head2 CHANGES and their DATES
67  
68 =cut
69  
70 use Moose;
71 our $VERSION = '0.0.1';
72  
73  
74 =head2 Import packages
75  
76 =cut
77  
78 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
79  
80 use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su);
81 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
82  
83  
84 =head2 instantiation of packages
85  
86 =cut
87  
88 my $get = L_SU_global_constants->new();
89 my $Project = Project_config->new();
90 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
91 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
92 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
93  
94 my $PS_SEISMIC = $Project->PS_SEISMIC();
95  
96 my $var = $get->var();
97 my $on = $var->{_on};
98 my $off = $var->{_off};
99 my $true = $var->{_true};
100 my $false = $var->{_false};
101 my $empty_string = $var->{_empty_string};
102  
103 =head2 Encapsulated
104 hash of private variables
105  
106 =cut
107  
108 my $suhilb = {
109 _opt => '',
110 _Step => '',
111 _note => '',
112  
113 };
114  
115 =head2 sub Step
116  
117 collects switches and assembles bash instructions
118 by adding the program name
119  
120 =cut
121  
122 sub Step {
123  
124 $suhilb->{_Step} = 'suhilb'.$suhilb->{_Step};
125 return ( $suhilb->{_Step} );
126  
127 }
128  
129  
130 =head2 sub note
131  
132 collects switches and assembles bash instructions
133 by adding the program name
134  
135 =cut
136  
137 sub note {
138  
139 $suhilb->{_note} = 'suhilb'.$suhilb->{_note};
140 return ( $suhilb->{_note} );
141  
142 }
143  
144  
145  
146 =head2 sub clear
147  
148 =cut
149  
150 sub clear {
151  
152 $suhilb->{_opt} = '';
153 $suhilb->{_Step} = '';
154 $suhilb->{_note} = '';
155 }
156  
157  
158 =head2 sub opt
159  
160  
161 =cut
162  
163 sub opt {
164  
165 my ( $self,$opt ) = @_;
166 if ( $opt ne $empty_string ) {
167  
168 $suhilb->{_opt} = $opt;
169 $suhilb->{_note} = $suhilb->{_note}.' opt='.$suhilb->{_opt};
170 $suhilb->{_Step} = $suhilb->{_Step}.' opt='.$suhilb->{_opt};
171  
172 } else {
173 print("suhilb, opt, missing opt,\n");
174 }
175 }
176  
177  
178 =head2 sub get_max_index
179  
180 max index = number of input variables -1
181
182 =cut
183
184 sub get_max_index {
185 my ($self) = @_;
186 my $max_index = 0;
187  
188 return($max_index);
189 }
190
191
192 1;