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