App-SeismicUnixGui

 view release on metacpan or  search on metacpan

lib/App/SeismicUnixGui/big_streams/Sseg2su.pl  view on Meta::CPAN

for ( $i = 1 ; $i <= $number_of_files ; $i++ ) {

	$cp_dat2DAT[$i] = (
		" cp $DATA_SEISMIC_SEG2/$file_name[$i].dat \\
	$DATA_SEISMIC_SEG2/$file_name[$i].DAT
		"
	);

	#	print $cp_dat2DAT[$i] . "\n";

=pod INPUT FILE NAMES

convert seg2 files to su files

=cut

	$sioseis[$i] = ( "
cd $DATA_SEISMIC_SEG2;
echo 'moving to' `pwd`;
sioseis << eof
procs seg2in diskoa end

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


=head2 LOG FLOW(S)

  TO SCREEN AND FILE

=cut

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

=head2 WRITE OUTPUT FILE

 write Vint file 

=cut

    $files->write_2cols( $ref_T, $ref_Vint, $num_points_Vint,
        \$Vint_outbound[1], \$format[1] );
}

# END calcNdisplay

lib/App/SeismicUnixGui/c/synseis/src/synseis.c  view on Meta::CPAN

/*    fprintf (stderr, " -LVresampled velocity filename*\n");*/
/*    fprintf (stderr, " -Roresampled output source filename*\n");*/
/*    fprintf (stderr, " -Rresample source=TRUE, otherwise don't resample\n");*/
/*    fprintf (stderr, " -Ssource_file_name (resampling=FALSE)\n");*/
/*    fprintf (stderr, " -Vspill all the details of the modelin\n");*/
/*    fprintf (stderr, " -Zname of file with depth(mbsf),density(g/cc),velocity(m/s)*\n");*/
/*    fprintf (stderr, "\n\n\n\n\n * ALWAYS USE\n");*/
/* */
/*  } */

  /*DATA INPUT */

  /*SOURCE IN A FILE */
  /* read source file*/
if(read_source == TRUE) {

	if(  (fpin = fopen(source_filename,"r") ) == NULL) {
		printf("Can't open file1 %s, try again\n", source_filename);
		exit(0);
	}

lib/App/SeismicUnixGui/c/synseis/src/synseis.c  view on Meta::CPAN

		for (i=0; i< num_pts_conv;  i++){
			Convolve_time = (t_increment * (float)i  ) + xstart;
			printf("%f\t%f\n", Convolve_time, Convolve_Amplitude[i]);
		}
    } */

 }
  
  /*CONVOLVE SOURCE AND DATA -----------------END-----------------*/
  
  /*OUTPUT CONVOLVED SIGNAL TO STDOUT*/
for (i=0;  i< num_pts_conv;  i++){
	tmin = 2. * water_depth /Vp_water_mps; /*in secs*/
    Convolve_time = (t_increment * (float)i  ) + tmin;
    fprintf(stdout,"%lf\t%lf\n", Convolve_time, Convolve_Amplitude[i] );
 }
	fclose(stdout);

  
} /*end main*/

lib/App/SeismicUnixGui/c/synseis/src/synseis_bck.c  view on Meta::CPAN

//    fprintf (stderr, " -LVresampled velocity filename*\n");
//    fprintf (stderr, " -Roresampled output source filename*\n");
//    fprintf (stderr, " -Rresample source=TRUE, otherwise don't resample\n");
//    fprintf (stderr, " -Ssource_file_name (resampling=FALSE)\n");
//    fprintf (stderr, " -Vspill all the details of the modelin\n");
//    fprintf (stderr, " -Zname of file with depth(mbsf),density(g/cc),velocity(m/s)*\n");
//    fprintf (stderr, "\n\n\n\n\n * ALWAYS USE\n");
//
//  }
//
//  /*DATA INPUT */
//
//  /*SOURCE IN A FILE ----------------START-----------------------------*/
//  /* read source file*/
//  if(read_source == TRUE) {
//    if(  (fpin = fopen(source_filename,"r") ) == NULL) {
//      printf("Can't open file1 %s, try again\n", source_filename);
//      exit(0);
//    }
//
//    if(resample_source == TRUE) {

lib/App/SeismicUnixGui/c/synseis/src/synseis_bck.c  view on Meta::CPAN

//      for (i=0; i< num_pts_conv;  i++){
//	Convolve_time = (t_increment * (float)i  ) + xstart;
//	printf("%f\t%f\n", Convolve_time, Convolve_Amplitude[i]);
//      }
//    }
//
//  }
  
  /*CONVOLVE SOURCE AND DATA -----------------END-----------------*/
  
  /*OUTPUT CONVOLVED SIGNAL TO STDOUT*/

//  for (i=0;  i< num_pts_conv;  i++){
//    tmin = 2. * water_depth /1500.; /*in secs*/
//    Convolve_time = (t_increment * (float)i  ) + tmin;
//    fprintf(stdout,"%lf\t%lf\n", Convolve_time, Convolve_Amplitude[i] );
// }
//  fclose(stdout);

  
} /*end main*/

lib/App/SeismicUnixGui/developer/Stripped/shapeNcut/suputgthr.su.main.windowing_sorting_muting  view on Meta::CPAN

 SUPUTGTHR - split the stdout flow to gathers on the bases of given	
 		key parameter. 						

	suputgthr <stdin   dir= [Optional parameters]			

 Required parameters:							
 dir=		Name of directory where to put the gathers		
 Optional parameters: 							
 key=ep		header key word to watch   			
 suffix=".hsu"	extension of the output files			
 verbose=0		verbose = 1 echos information			

lib/App/SeismicUnixGui/developer/Stripped/shell/suputgthr.su.main.windowing_sorting_muting  view on Meta::CPAN

 SUPUTGTHR - split the stdout flow to gathers on the bases of given	
 		key parameter. 						

	suputgthr <stdin   dir= [Optional parameters]			

 Required parameters:							
 dir=		Name of directory where to put the gathers		
 Optional parameters: 							
 key=ep		header key word to watch   			
 suffix=".hsu"	extension of the output files			
 verbose=0		verbose = 1 echos information			

lib/App/SeismicUnixGui/fortran/src/denfvp.for  view on Meta::CPAN

	SUBROUTINE DENFVP(VP,D,IOP)
C
C COMPUTES DENSITY D (GR/CC) FROM P-WAVE VELOCITY VP (KM/SEC)
C
C IOP=1 : D=1.74*VP**0.25 ,GARDNER ET AL.,GEOPHYSICS 39,P 770-780,1974
C
C IOP=2 : D=1.85+0.165*VP ,CHRISTENSEN AND SHAW, GEOPHYS.J.R.ASTR.SOC
C                          20,P 271-284,1970. FOR BASALTIC SAMPLES AT
C                          1 KBAR.
C
C IOP=3 : NAFE AND DRAKE, THE SEA, VOL.4,PART 1,WILEY-INTERSCIENCES,NEW
C         YORK,1970.
C

lib/App/SeismicUnixGui/fortran/src/immodpg.for  view on Meta::CPAN

	   do i=1,nl-1
         IR(i)=0 
    	 if(ABS(VT(i+1)-VB(i)).GT.A3) IR(i)=1     
        end do 
        
! No reflection at the bottom of model
	   IR(nl) = 0  
	
!	print*,'reflection at layer i,=',i,IR(i)

!      COMPUTATIONS ***
	   DZ1TEM=DZ(1)

!      Correct only if 1st layer is a constant vel. layer.
	   DZ(1)=DZ(1)-(SDEPTH+RDEPTH)/2.

	   call txpr(nl,VT,VB,DZ,PMIN,PMAX,DP,IR,multin,ntp,ILA,P,X,T)
	   DZ(1)=DZ1TEM

55	   continue

lib/App/SeismicUnixGui/fortran/src/mmodpg4L_SU_Aug27_20_emilio/mmodpg.for  view on Meta::CPAN

20      if(ABS(VT(I)-VB(I)).le.A3) vb(i) = vt(i)
c
c Reflections at the bottom of layers decided automatically
c based on velocity discontinuities
c
        do 34 I=1,nl-1
        IR(I)=0
34      if(ABS(VT(I+1)-VB(I)).GT.A3) IR(I)=1
        IR(nl) = 0  !** No reflection at the bottom of model
c
c *** COMPUTATIONS ***
c
        DZ1TEM=DZ(1)
        DZ(1)=DZ(1)-(SDEPTH+RDEPTH)/2. ! Correct only if 1rst layer
c                                        is a constant vel. layer. 
        call txpr(nl,VT,VB,DZ,PMIN,PMAX,DP,IR,multin,ntp,ILA,P,X,T)
        DZ(1)=DZ1TEM
c       write(*,*) 'total # of computed points ',ntp
c
c *** PLOTTING ***
c

lib/App/SeismicUnixGui/fortran/src/mmodpg4L_SU_Aug27_20_emilio/mmodpg.for  view on Meta::CPAN

	LOGICAL EX
c
c Read data parameters
c
        iin=26
        OPEN(UNIT=iin,FILE='parmmod',STATUS='OLD')
        read(iin,*) ntr,ns,idtusec
        close(iin)
        datadt = float(idtusec) * 1e-6
c
c115    write(*,*) 'INPUT DATA FILE NAME ?? '
c       READ(5,'(A)') FIN
c       INQUIRE(FILE=FIN,EXIST=EX)
c       if(.NOT.EX) then
c       write(*,*)'FILE DOES NOT EXIST, TRY AGAIN WITH A NEW NAME'
c       go to 115
c       endif
c
c       OPEN(UNIT=iin,FILE=FIN,STATUS='OLD',FORM='UNFORMATTED')
c
c Read data File

lib/App/SeismicUnixGui/fortran/src/mmodpg4L_SU_Aug27_20_emilio/mmodpg2.for  view on Meta::CPAN

20      if(ABS(VT(I)-VB(I)).le.A3) vb(i) = vt(i)
c
c Reflections at the bottom of layers decided automatically
c based on velocity discontinuities
c
        do 34 I=1,nl-1
        IR(I)=0
34      if(ABS(VT(I+1)-VB(I)).GT.A3) IR(I)=1
        IR(nl) = 0  !** No reflection at the bottom of model
c
c *** COMPUTATIONS ***
c
        DZ1TEM=DZ(1)
        DZ(1)=DZ(1)-(SDEPTH+RDEPTH)/2. ! Correct only if 1rst layer
c                                        is a constant vel. layer. 
        call txpr(nl,VT,VB,DZ,PMIN,PMAX,DP,IR,multin,ntp,ILA,P,X,T)
        DZ(1)=DZ1TEM
c       write(*,*) 'total # of computed points ',ntp
c
c *** PLOTTING ***
c

lib/App/SeismicUnixGui/fortran/src/mmodpg4L_SU_Aug27_20_emilio/mmodpg2.for  view on Meta::CPAN

        LOGICAL EX
c
c Read data parameters
c
        iin=26
        OPEN(UNIT=iin,FILE='parmmod',STATUS='OLD')
        read(iin,*) ntr,ns,idtusec
        close(iin)
        datadt = float(idtusec) * 1e-6
c
c115    write(*,*) 'INPUT DATA FILE NAME ?? '
c	READ(5,'(A)') FIN
c       INQUIRE(FILE=FIN,EXIST=EX)
c	if(.NOT.EX) then
c	write(*,*)'FILE DOES NOT EXIST, TRY AGAIN WITH A NEW NAME'
c	go to 115
c	endif
c
c	OPEN(UNIT=iin,FILE=FIN,STATUS='OLD',FORM='UNFORMATTED')
c
c Read data File

lib/App/SeismicUnixGui/fortran/src/readmmod.for  view on Meta::CPAN

	VSB(I)=0.0
	RHOT(I)=0.0
	RHOB(I)=0.0
c
c *** WRITE MODEL IN FILE ***
c
97      ID=1
  	CALL READ_PAR_I4('1- WRITE MODEL IN FILE, 0- NO',ID)
	IF(ID.EQ.0) GO TO 135
	STAT='NEW'
103	write(*,*)'OUTPUT FILE NAME ?? '
	READ(*,'(A)') FOUT
	INQUIRE(FILE=FOUT,EXIST=EX)
	IF(EX) THEN
	write(*,*) 'FILE ALREADY EXISTS: 1- OVERWRITE IT,0- TRY ',
     +  'AGAIN WITH A NEW NAME'
	read(5,*) ID
		IF(ID.EQ.0) GO TO 103
		IF(ID.EQ.1) STAT='UNKNOWN'
	ENDIF
	OPEN(UNIT=IOUT,FILE=FOUT,STATUS=STAT,FORM='UNFORMATTED')

lib/App/SeismicUnixGui/fortran/src/readmmod.for  view on Meta::CPAN

!              if(idef.eq.1) 117
              go to 117
	 else
	       print *, 'Default file immodpg.out is missing!'
 !             if(idef.eq.1) go to 115
              go to 115

	end if

c
115     write(*,*) 'INPUT FILE NAME ?? '
	READ(5,'(A)') inbound_model
	INQUIRE(FILE=inbound_model,EXIST=EX)
	IF(.NOT.EX) THEN
	write(*,*)'FILE DOES NOT EXIST, TRY AGAIN WITH A NEW NAME'
	GO TO 115
	ENDIF
c
117	continue
	OPEN(UNIT=IIN,FILE=inbound_model,STATUS='OLD',FORM='UNFORMATTED')
	K=1

lib/App/SeismicUnixGui/fortran/src/thi.for  view on Meta::CPAN

	SUBROUTINE THI(TWTT,VT,VB,DZ)
C
C THIS SUBROUTINE COMPUTES THE THICKNESS DZ OF A CONSTANT VEL. GRADIENT 
C LAYER WHEN THE 2-WAY TRAVELTIME FOR THE LAYER (TWTT),TOP AND BOTTOM
C VELOCITIES (VT,VB) ARE KNOWN.THE SPECIAL CASE VT=VB(HOMOGENEOUS LAYER)
C IS ALSO INCLUDED.
C
	IF(VT.NE.VB) GO TO 1
	DZ=TWTT*VT/2.
c HOMOGENEOUS LAYER
	RETURN
C
 1	AUX=(VB-VT)/ALOG(VB/VT)

lib/App/SeismicUnixGui/fortran/src/txgrd.for  view on Meta::CPAN

	SUBROUTINE TXGRD(P,VT,VB,DZ,T,X,IN)
C THIS SUBROUTINE COMPUTES 2-WAY TRAVELTIME (T) AND HORIZONTAL DISTANCE (X)
C FOR A RAY OF RAY PARAMETER P TRAVELLING IN A CONSTANT VELOCITY GRADIENT
C LAYER OF THICKNESS DZ AND TOP AND BOTTOM VELOCITIES VT AND VB
C RESPECTIVELY.THE SORT OF COMPUTATION DONE IN THE SUBROUTINE IS TRANFERRED
C TO THE MAIN PROGRAM BY THE INTEGER  IN . WE HAVE THE FOLLOWING CODE:
C
C IN=0  IF 1/P L.E. VT  NO CONTUTATION IS CARRIED OUT IN THIS CASE
C
C IN=1 IF VB.L.E. 1/P.GT.VT. RAY IS TURNED WITHIN THE LAYER
C
C IN=2 IF 1/P.G.T.VB  RAY NOT TURNED WITHIN THE LAYER
C
C IN=3  IF  VT=VB (HOMOGENEOUS LAYER)
C

lib/App/SeismicUnixGui/fortran/src/txgrd.for  view on Meta::CPAN

C
	PM1=1./P
C *** TEST FOR 1/P ****
	IF(PM1.GT.VT) GO TO 10
	IN=0
	RETURN
C
C *** TEST FOR HOMOGENEUOS LAYER  ****
C
 10	IF(VT.NE.VB) GO TO 30
C ***COMPUTE X AND T FOR HOMOGENEOUS LAYER  ****
	A1=P*VT
	A2=2.*DZ/SQRT(1.-A1**2)
	T=A2/VT
	X=A2*A1
	IN=3
	RETURN
C
C **COMPUTE 2./GRADIENT :::
 30	GM1T2=2.*DZ/(VB-VT)
C
	A1=1./VB
	IF(P.GE.A1) GO TO 50
C ***COMPUTATION FOR RAY THAT PASSES THROUGH THE LAYER ***
C
	A1=VB/VT
	A2=SQRT(1.-(P*VT)**2)
	A3=SQRT(1.-(P*VB)**2)
	T=GM1T2*ALOG(A1*(1.+A2)/(1.+A3))
	X=0.
	IF(P.EQ.0.) GO TO 45
	X=GM1T2*(A2-A3)/P
 45	IN=2
	RETURN
C *** COMPUTATION FOR TURNING RAY ***
C
 50	A1=P*VT
	A2=SQRT(1.-A1**2)
	T=GM1T2*ALOG((1.+A2)/A1)
	X=GM1T2*A2/P
	IN=1
	RETURN
	END

lib/App/SeismicUnixGui/fortran/src/txpr.for  view on Meta::CPAN

		IF(ABP.LT.A2) ILA(NTP) = -I !**PRE CRITICAL REFLECTION
	  ENDIF
C
	ENDIF
5	CONTINUE
	GO TO 62
50	NL1=I-1
62	P=P+DP
   	IF(P.GT.PMAX) GO TO 65
	GO TO 45
C **** COMPUTATION  FINISHED ****
65	CONTINUE
	RETURN
	END

lib/App/SeismicUnixGui/fortran/src/wrimod2.for  view on Meta::CPAN

C
	ICH = 6
	WRITE(ICH,50)
	WRITE(ICH,100)
	WRITE(ICH,50)
C
	A1=0.
	A2=0.
	DO 20 I=1,NL
	A1=A1+DZ(I)
C COMPUTES 2-WAY TRAVELTIME ASSUMING EITHER CONSTANT VELOCITY OR
C CONSTANT VELOCITY GRADIENT LAYERS.
C
	IF(VT(I).EQ.VB(I)) THEN
		A2=A2+2.*DZ(I)/VT(I)
	ELSE
		A2=A2+2.*DZ(I)*ALOG(VB(I)/VT(I))/(VB(I)-VT(I))
	ENDIF
C
  	WRITE(ICH,200) I,VT(I),VB(I),DZ(I),A1,A2,VST(I),VSB(I),
     +  RHOT(I),RHOB(I)

lib/App/SeismicUnixGui/fortran/src/write_model_file_text.f  view on Meta::CPAN

       open (unit=ICH,file=outbound,status='replace')

       WRITE(ICH,50)
       WRITE(ICH,100)
       WRITE(ICH,50)
!
       A1=0.
       A2=0.
       DO 20 I=1,NL
       A1=A1+DZ(I)
!COMPUTES 2-WAY TRAVELTIME ASSUMING EITHER CONSTANT VELOCITY OR
!CONSTANT VELOCITY GRADIENT LAYERS.
!
       IF(VT(I).EQ.VB(I)) THEN
              A2=A2+2.*DZ(I)/VT(I)
       ELSE
              A2=A2+2.*DZ(I)*ALOG(VB(I)/VT(I))/(VB(I)-VT(I))
       ENDIF
!
       WRITE(ICH,200) I,VT(I),VB(I),DZ(I),A1,A2,VST(I),VSB(I),RHOT(I),RHOB(I)
20     CONTINUE

lib/App/SeismicUnixGui/misc/oop_prog_params.pm  view on Meta::CPAN

			#            $control->set_value($value);
			#            $control->reset_suffix4loop();
			#            $control->set_suffix4oop($suffix);
			#            $value = $control->get_value4oop();

	    # print(" 4. oop_prog_params, get_a_section value =$value\n ");
	    
			if ( length $prefix && length $suffix ) {

			# print(" 1. oop_prog_params, get_a_section CASE #1 Both suffix and prefix are present\n ");
			# OUTPUT TEXT is set here
				$oop_prog_params[$j] =
					" \t " . '$'
				  . $prog_name
				  . " \t \t \t \t " . '->'
				  . $label
				  . '(quotemeta('
				  . $prefix
				  . $value . ').'
				  . $suffix . ');';

				# print(" 1. oop_prog_params, get_a_section CASE #1 OUTPUT TEXT: $oop_prog_params[$j] \n");
				# print(
# " 1. oop_prog_params, get_a_section CASE #1 suffix=$suffix---prefix=$prefix---value=$value---\n"
				# );

				#				 					. '.'
			}
			elsif ( !( length($prefix) ) && length($suffix) ) {

# print(" oop_prog_params, get_a_section CASE #2  No prefix but there is a suffix \n ");
# OUTPUT TEXT is set here
				$oop_prog_params[$j] =
					" \t " . '$'
				  . $prog_name
				  . " \t \t \t \t " . '->'
				  . $label
				  . '(quotemeta('
				  . $value
				  . $suffix . '));';

			}
			elsif ( $prefix && !($suffix) ) {

				# CASE 3
				#				print("CASE #3 : oop_prog_params,prefix but no suffix \n");
				# OUTPUT TEXT is set here first
				# First part is:
				$oop_prog_params[$j] =
					" \t " . '$'
				  . $prog_name
				  . " \t \t \t \t " . '->'
				  . $label
				  . '(quotemeta(';

				# check for multiple values
				my $length = scalar $value;

lib/App/SeismicUnixGui/misc/oop_prog_params.pm  view on Meta::CPAN

						  . $prefix . "'"
						  . $sub_values[$i] . "'" . '));';

# print("CASE #3A-3: oop_prog_params,get_a,section,Final part is $oop_prog_params[$j]\n");

					}
					elsif ( $num_values == 1 ) {

	  # print(" oop_prog_params, get_a_section CASE #3B, single-value case\n ");

						# OUTPUT TEXT is set here
						# otherwise the prefix is set here , only ONCE
						$oop_prog_params[$j] =
						  $oop_prog_params[$j] . $prefix . $value . '));';

# print("CASE #3B: oop_prog_params,get_a,section,Complete:$oop_prog_params[$j]\n");

					}
					else {

						#						print("oop_prog_params,get_a,section,NADA\n");

lib/App/SeismicUnixGui/misc/oop_prog_params.pm  view on Meta::CPAN

					print(
"oop_prog_params,get_a,section,strange values, WARNING\n"
					);
				}

				# CASE _for_
			}
			elsif ( $suffix && !($prefix) ) {

 #				print(" Case 4 oop_prog_params, get_a_section = suffix but no prefix\n ");
 # OUTPUT TEXT is set here
				$oop_prog_params[$j] =
					" \t " . '$'
				  . $prog_name
				  . " \t \t \t \t " . '->'
				  . $label
				  . '(quotemeta('
				  . $value
				  . $suffix . '));';

			}
			elsif ( !($suffix) && !($prefix) ) {

 # CASE 5
# 				print(" oop_prog_params, get_a_section = CASE 5; neither suffix nor prefix\n ");
 # OUTPUT TEXT is set here
#				$oop_prog_params[$j] =
#					" \t " . '$'
#				  . $prog_name
#				  . " \t \t \t \t " . '->'
#				  . $label
#				  . '("'
#				  . $value . '");';
				  
				$oop_prog_params[$j] =
					" \t " . '$'

lib/App/SeismicUnixGui/sunix/shell/suputgthr.pm  view on Meta::CPAN


=head2 USE

=head3 NOTES

=head4 Examples

=head2 SYNOPSIS

=head3 SEISMIC UNIX NOTES
 SUPUTGTHR - split the stdout flow to gathers on the bases of given	

 		key parameter. 						

	suputgthr <stdin   dir= [Optional parameters]			

 Required parameters:							

 dir=		Name of directory where to put the gathers		

 Optional parameters: 							



( run in 0.505 second using v1.01-cache-2.11-cpan-4e96b696675 )