« lib/App/SeismicUnixGui/developer/code/sunix/sudoc.pm
↑ Summary
lib/App/SeismicUnixGui/developer/code/sunix/sunix_package_clear.pm »
| 1 | package App::SeismicUnixGui::developer::code::sunix::sudoc2pm_nameNnumber; | ||
| 2 | |||
| 3 | =head1 DOCUMENTATION | ||
| 4 | |||
| 5 | |||
| 6 | =head2 SYNOPSIS | ||
| 7 | |||
| 8 | PERL PROGRAM NAME: sudoc2pm_nameNnumber.pm | ||
| 9 | AUTHOR: Juan Lorenzo | ||
| 10 | DATE: June 7 2022 | ||
| 11 | |||
| 12 | DESCRIPTION | ||
| 13 | Name of the program | ||
| 14 | and its program-group number | ||
| 15 | which will be used to incorporate this sunix module | ||
| 16 | into the L_SU GUIB | ||
| 17 | |||
| 18 | BASED ON: | ||
| 19 | Version 0.1 | ||
| 20 | |||
| 21 | |||
| 22 | =cut | ||
| 23 | |||
| 24 | =head2 USE | ||
| 25 | state program name and its program name group | ||
| 26 | |||
| 27 | =head3 NOTES | ||
| 28 | |||
| 29 | Array of program group names, | ||
| 30 | and their directory namesakes: | ||
| 31 | |||
| 32 | $developer_sunix_categories[0] = 'data'; | ||
| 33 | $developer_sunix_categories[1] = 'datum'; | ||
| 34 | $developer_sunix_categories[2] = 'plot'; | ||
| 35 | $developer_sunix_categories[3] = 'filter'; | ||
| 36 | $developer_sunix_categories[4] = 'header'; | ||
| 37 | $developer_sunix_categories[5] = 'inversion'; | ||
| 38 | $developer_sunix_categories[6] = 'migration'; | ||
| 39 | $developer_sunix_categories[7] = 'model'; | ||
| 40 | $developer_sunix_categories[8] = 'NMO_Vel_Stk'; | ||
| 41 | $developer_sunix_categories[9] = 'par'; | ||
| 42 | $developer_sunix_categories[10] = 'picks'; | ||
| 43 | $developer_sunix_categories[11] = 'shapeNcut'; | ||
| 44 | $developer_sunix_categories[12] = 'shell'; | ||
| 45 | $developer_sunix_categories[13] = 'statsMath'; | ||
| 46 | $developer_sunix_categories[14] = 'transform'; | ||
| 47 | $developer_sunix_categories[15] = 'well'; | ||
| 48 | $developer_sunix_categories[16] = 'unix'; | ||
| 49 | $developer_sunix_categories[17] = ''; | ||
| 50 | |||
| 51 | =head4 Examples | ||
| 52 | |||
| 53 | sudoc2pm_pt1.pl uses this package | ||
| 54 | |||
| 55 | |||
| 56 | sudoc | ||
| 57 | |||
| 58 | =head3 SEISMIC UNIX NOTES | ||
| 59 | |||
| 60 | =head2 CHANGES and their DATES | ||
| 61 | |||
| 62 | =cut | ||
| 63 | |||
| 64 | =head2 Notes from bash | ||
| 65 | |||
| 66 | =cut | ||
| 67 | |||
| 68 | use Moose; | ||
| 69 | our $VERSION = '0.1.0'; | ||
| 70 | |||
| 71 | use aliased 'App::SeismicUnixGui::misc::manage_files_by2'; | ||
| 72 | my $file = manage_files_by2->new(); | ||
| 73 | |||
| 74 | #my $sunix_category_number = 8; | ||
| 75 | #my $selected_program_name = 'sustkvel'; | ||
| 76 | |||
| 77 | my $inbound = './' . 'nameNnumber'.'.txt'; | ||
| 78 | |||
| 79 | my $spacer = " "; | ||
| 80 | my $aref = $file->read_2cols_aref( $inbound, $spacer ); | ||
| 81 | my @array = @$aref; | ||
| 82 | my $selected_program_name_aref = $array[0]; | ||
| 83 | my $sunix_category_number_aref = $array[1]; | ||
| 84 | my @selected_program_name = @$selected_program_name_aref; | ||
| 85 | my @sunix_category_number = @$sunix_category_number_aref; | ||
| 86 | |||
| 87 | |||
| 88 | # print("sudoc2pm_nameNnumber,selected_program_name=@{$array[0]}\n"); | ||
| 89 | # print("sudoc2pm_nameNnumber,selected_program_name=@selected_program_name\n"); | ||
| 90 | # print("sudoc2pm_nameNnumber,sunix_category_number=@sunix_category_number\n"); | ||
| 91 | |||
| 92 | sub get_selected_program_name { | ||
| 93 | |||
| 94 | my ($self) = @_; | ||
| 95 | my $result; | ||
| 96 | |||
| 97 | if ( length $selected_program_name[0] ) { | ||
| 98 | |||
| 99 | $result = $selected_program_name[0]; | ||
| 100 | |||
| 101 | } | ||
| 102 | else { | ||
| 103 | print("sudoc2pm missing program name\n"); | ||
| 104 | } | ||
| 105 | return ($result); | ||
| 106 | } | ||
| 107 | |||
| 108 | sub get_category_number { | ||
| 109 | |||
| 110 | my ($self) = @_; | ||
| 111 | my $result; | ||
| 112 | |||
| 113 | if ( length $sunix_category_number[0] ) { | ||
| 114 | |||
| 115 | $result = $sunix_category_number[0]; | ||
| 116 | } | ||
| 117 | else { | ||
| 118 | print("sudoc2pm missing sunix category number\n"); | ||
| 119 | } | ||
| 120 | |||
| 121 | return ($result); | ||
| 122 | |||
| 123 | } | ||
| 124 | |||
| 125 | 1; |