App-SeismicUnixGui

 view release on metacpan or  search on metacpan

lib/App/SeismicUnixGui/big_streams/iPicks2sort.pm  view on Meta::CPAN

=head3

 Import file-name  and directory definitions

=cut 

use App::SeismicUnixGui::misc::SeismicUnix qw($true $false $in $out $to
  $itemp_picks_ $itemp_picks_sorted_
  $out $suffix_su);

my ($DATA_SEISMIC_TXT) = $Project->DATA_SEISMIC_TXT();

=head2 subroutine calc 

 main processing flow
 sorts data 
 
=cut

sub calc {

=head2 establish pfile names


=cut

    my $pick_file_in = $itemp_picks_ . $iPicks2sort->{_file_in};

    my $sorted_pick_file_out = $itemp_picks_sorted_ . $iPicks2sort->{_file_in};

    $iPicks2sort->{_TX_inbound} = $DATA_SEISMIC_TXT . '/' . $pick_file_in;
    $iPicks2sort->{_TX_outbound} =
      $DATA_SEISMIC_TXT . '/' . $sorted_pick_file_out;

    # SORT a TEXT FILE
    my @sort;
    $sort[1] = (
        " sort 			\\
		-n								\\
		"
    );

=head2 DEFINE FLOW(S)

=cut

    #   print("Regular xt data\n\n");

    @items = (
        $sort[1], $in, $iPicks2sort->{_TX_inbound},
        $out, $iPicks2sort->{_TX_outbound}
    );

    $flow[1] = $run->modules( \@items );

=head2

  RUN FLOW(S)
  output copy of picked data points
  only occurs after the number of tries
  is updated

=cut

    $run->flow( \$flow[1] );

=pod

  LOG FLOW(S)TO SCREEN AND FILE

=cut

    # print  "$flow[1]\n";
    # $log->file($flow[1]);

}    # end calc subroutine

=head2 subroutine clear

  sets all variable strings to '' 

=cut

sub clear {
    $iPicks2sort->{_TX_inbound}   = '';
    $iPicks2sort->{_TX_outbound}  = '';
    $iPicks2sort->{_gather_num}   = '';
    $iPicks2sort->{_exists}       = '';
    $iPicks2sort->{_file_in}      = '';
    $iPicks2sort->{_textfile_in}  = '';
    $iPicks2sort->{_textfile_out} = '';
    $iPicks2sort->{_type}         = '';
}

=head2 subroutine file_in

 Required file name
 on which to pick x,t values

=cut

sub file_in {

    my ( $self, $file_in ) = @_;

    if ( defined $file_in && $file_in ne $empty_string ) {

        # e.g. 'sp1' becomes sp1
        $control->set_infection($file_in);
        $file_in = control->get_ticksBgone();
        $iPicks2sort->{_file_in} = $file_in;

        # print("iPicks2sort, file_in: $iPicks2sort->{_file_in} \n");

    }
    else {
        print("iPicks2sort, file_in: unexpected file_in \n");
    }
}

=head2 sub type



( run in 0.439 second using v1.01-cache-2.11-cpan-39bf76dae61 )