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