« lib/App/SeismicUnixGui/sunix/data/wpcuncompress.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/data/wtuncomp.pm »
| 1 | package App::SeismicUnixGui::sunix::data::wptuncomp; | ||
| 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 | WPTUNCOMP - Uncompress WPT compressed data | ||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | wptuncomp < stdin > sdtout | ||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | Required Parameters: | ||
| 33 | |||
| 34 | none | ||
| 35 | |||
| 36 | Optional Parameters: | ||
| 37 | |||
| 38 | none | ||
| 39 | |||
| 40 | |||
| 41 | |||
| 42 | opt=null | ||
| 43 | |||
| 44 | |||
| 45 | |||
| 46 | Author: CWP: Tong Chen, Dec 1995 | ||
| 47 | |||
| 48 | |||
| 49 | |||
| 50 | =head2 User's notes (Juan Lorenzo) | ||
| 51 | untested | ||
| 52 | |||
| 53 | =cut | ||
| 54 | |||
| 55 | |||
| 56 | =head2 CHANGES and their DATES | ||
| 57 | |||
| 58 | =cut | ||
| 59 | |||
| 60 | use Moose; | ||
| 61 | our $VERSION = '0.0.1'; | ||
| 62 | |||
| 63 | |||
| 64 | =head2 Import packages | ||
| 65 | |||
| 66 | =cut | ||
| 67 | |||
| 68 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 69 | |||
| 70 | use App::SeismicUnixGui::misc::SeismicUnix qw($in $out $on $go $to $suffix_ascii $off $suffix_su $suffix_bin); | ||
| 71 | use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config'; | ||
| 72 | |||
| 73 | |||
| 74 | =head2 instantiation of packages | ||
| 75 | |||
| 76 | =cut | ||
| 77 | |||
| 78 | my $get = L_SU_global_constants->new(); | ||
| 79 | my $Project = Project_config->new(); | ||
| 80 | my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU(); | ||
| 81 | my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN(); | ||
| 82 | my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT(); | ||
| 83 | |||
| 84 | my $var = $get->var(); | ||
| 85 | my $on = $var->{_on}; | ||
| 86 | my $off = $var->{_off}; | ||
| 87 | my $true = $var->{_true}; | ||
| 88 | my $false = $var->{_false}; | ||
| 89 | my $empty_string = $var->{_empty_string}; | ||
| 90 | |||
| 91 | =head2 Encapsulated | ||
| 92 | hash of private variables | ||
| 93 | |||
| 94 | =cut | ||
| 95 | |||
| 96 | my $wptuncomp = { | ||
| 97 | _opt => '', | ||
| 98 | _Step => '', | ||
| 99 | _note => '', | ||
| 100 | |||
| 101 | }; | ||
| 102 | |||
| 103 | =head2 sub Step | ||
| 104 | |||
| 105 | collects switches and assembles bash instructions | ||
| 106 | by adding the program name | ||
| 107 | |||
| 108 | =cut | ||
| 109 | |||
| 110 | sub Step { | ||
| 111 | |||
| 112 | $wptuncomp->{_Step} = 'wptuncomp'.$wptuncomp->{_Step}; | ||
| 113 | return ( $wptuncomp->{_Step} ); | ||
| 114 | |||
| 115 | } | ||
| 116 | |||
| 117 | |||
| 118 | =head2 sub note | ||
| 119 | |||
| 120 | collects switches and assembles bash instructions | ||
| 121 | by adding the program name | ||
| 122 | |||
| 123 | =cut | ||
| 124 | |||
| 125 | sub note { | ||
| 126 | |||
| 127 | $wptuncomp->{_note} = 'wptuncomp'.$wptuncomp->{_note}; | ||
| 128 | return ( $wptuncomp->{_note} ); | ||
| 129 | |||
| 130 | } | ||
| 131 | |||
| 132 | |||
| 133 | |||
| 134 | =head2 sub clear | ||
| 135 | |||
| 136 | =cut | ||
| 137 | |||
| 138 | sub clear { | ||
| 139 | |||
| 140 | $wptuncomp->{_opt} = ''; | ||
| 141 | $wptuncomp->{_Step} = ''; | ||
| 142 | $wptuncomp->{_note} = ''; | ||
| 143 | } | ||
| 144 | |||
| 145 | |||
| 146 | =head2 sub opt | ||
| 147 | |||
| 148 | |||
| 149 | =cut | ||
| 150 | |||
| 151 | sub opt { | ||
| 152 | |||
| 153 | my ( $self,$opt ) = @_; | ||
| 154 | # if ( $opt ne $empty_string ) { | ||
| 155 | # | ||
| 156 | # $wptuncomp->{_opt} = $opt; | ||
| 157 | # $wptuncomp->{_note} = $wptuncomp->{_note}.' opt='.$wptuncomp->{_opt}; | ||
| 158 | # $wptuncomp->{_Step} = $wptuncomp->{_Step}.' opt='.$wptuncomp->{_opt}; | ||
| 159 | # | ||
| 160 | # } else { | ||
| 161 | # print("wptuncomp, opt, missing opt,\n"); | ||
| 162 | # } | ||
| 163 | } | ||
| 164 | |||
| 165 | |||
| 166 | =head2 sub get_max_index | ||
| 167 | |||
| 168 | max index = number of input variables -1 | ||
| 169 | |||
| 170 | =cut | ||
| 171 | |||
| 172 | sub get_max_index { | ||
| 173 | my ($self) = @_; | ||
| 174 | my $max_index = 0; | ||
| 175 | |||
| 176 | return($max_index); | ||
| 177 | } | ||
| 178 | |||
| 179 | |||
| 180 | 1; |