コード例 #1
0
ファイル: velconv.c プロジェクト: JOravetz/SeisUnix
/* compute z(t) and t(z) from input t(z) */
void in_tz(int nt, float dt, float ft, int nz, float dz, float fz,
	float tzin[], float zt[], float tz[])
{
	int iz;
	float vfz,vlz;

	for (iz=0; iz<nz; iz++)
		tz[iz] = tzin[iz];
	vfz = 2.0*dz/(tz[1]-tz[0]);
	vlz = 2.0*dz/(tz[nz-1]-tz[nz-2]);
	tzzt(nz,dz,fz,tz,vfz,vlz,nt,dt,ft,zt);
}
コード例 #2
0
ファイル: velconv.c プロジェクト: JOravetz/SeisUnix
/* compute z(t) and t(z) from input vint(z) */
void in_vintz(int nt, float dt, float ft, int nz, float dz, float fz,
	float vintz[], float zt[], float tz[])
{
	int iz;
	float vfz,vlz;

	tz[0] = 2.0*fz/vintz[0];
	for (iz=1; iz<nz; iz++)
		tz[iz] = tz[iz-1]+2.0*dz/vintz[iz-1];
	vfz = vintz[0];
	vlz = vintz[nz-1];
	tzzt(nz,dz,fz,tz,vfz,vlz,nt,dt,ft,zt);
}
コード例 #3
0
ファイル: suztot.c プロジェクト: gwowen/seismicunix
static void makezt (int nz, float dz, float fz, float v[], 
	int nt, float dt, float ft, float z[])
/************************************************************************
makezt - compute z(t) from v(z)
*************************************************************************
Input:
nz	number of z values (output)
dz	depth sampling interval (output)
fz	first depth value (output)
v[]	array of velocities as a function of time t
nt	number of time samples
dt	time sampling interval
ft	first time sample
Output:
z[]	array of z values as a function of t
*************************************************************************
Author: CWP: based on maketz by Dave Hale (c. 1992)
*************************************************************************/
{
	int iz;			/* counter */
	float vfz;		/* velocity at the first depth sample */
	float vlz;		/* velocity at the last depth sample */
	float *t=NULL;		/* array of time values as a function of z */

	/* allocate space */
	t = ealloc1float(nz);

	/* calculate t(z) from v(z) */
	t[0] = 2.0*fz/v[0];
	for (iz=1; iz<nz; ++iz)
		t[iz] = t[iz-1]+2.0*dz/v[iz-1];
	vfz = v[0];
	vlz = v[nz-1];

	/* compute z(t) from t(z) */
	tzzt(nz,dz,fz,t,vfz,vlz,nt,dt,ft,z);
	free1float(t);
}