亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sudipfilt.c

?? 忍痛割愛!上傳我的地震數據處理中的傾角濾波程序!
?? C
字號:
/* Copyright (c) Colorado School of Mines, 2008.*//* All rights reserved.                       *//* SUDIPFILT: $Revision: 1.19 $ ; $Date: 2003/06/09 16:17:07 $		*/#include "su.h"#include "segy.h"#include "header.h"#include <signal.h>/*********************** self documentation **********************/char *sdoc[] = {" 								"," SUDIPFILT - DIP--or better--SLOPE Filter in f-k domain	"," 								"," sudipfilt <infile >outfile [optional parameters]		","								"," Required Parameters:						"," dt=(from header)	if not set in header then mandatory	"," dx=(from header, d1)	if not set in header then mandatory	","								"," Optional parameters:						"," slopes=0.0		monotonically increasing slopes		"," amps=1.0		amplitudes corresponding to slopes	"," bias=0.0		slope made horizontal before filtering	","								"," verbose=0	verbose = 1 echoes information			","								"," tmpdir= 	 if non-empty, use the value as a directory path","		 prefix for storing temporary files; else if the","	         the CWP_TMPDIR environment variable is set use	","	         its value for the path; else use tmpfile()	"," 								"," Notes:							"," d2 is an acceptable alias for dx in the getpar		","								"," Slopes are defined by delta_t/delta_x, where delta		"," means change. Units of delta_t and delta_x are the same	"," as dt and dx. It is sometimes useful to fool the program	"," with dx=1 dt=1, thus avoiding units and small slope values.	","								"," Linear interpolation and constant extrapolation are used to	"," determine amplitudes for slopes that are not specified.	"," Linear moveout is removed before slope filtering to make	"," slopes equal to bias appear horizontal.  This linear moveout	"," is restored after filtering.  The bias parameter may be	"," useful for spatially aliased data.  The slopes parameter is	"," compensated for bias, so you need not change slopes when you	"," change bias.							"," 								",NULL};/* Credits: * *	CWP: Dave (algorithm--originally called slopef) *	     Jack (reformatting for SU) * * Trace header fields accessed: ns, dt, d2 *//**************** end self doc ***********************************/#define PFA_MAX	720720	/* Largest allowed nfft	          *//* prototypes */void slopefilter (int nslopes, float slopes[], float amps[], float bias,	int nt, float dt, int ntr, float dx, FILE *datafp);static void closefiles(void);/* Globals (so can trap signal) defining temporary disk files */char tracefile[BUFSIZ];	/* filename for the file of traces	*/char headerfile[BUFSIZ];/* filename for the file of headers	*/FILE *tracefp;		/* fp for trace storage file		*/FILE *headerfp;		/* fp for header storage file		*/segy tr;intmain(int argc, char **argv){	int nt;		/* number of time samples			*/	float dt;	/* time sampling interval			*/	int ntr;	/* number of traces				*/	float dx;	/* trace spacing (spatial sampling interval)	*/	int nslopes;	/* number of slopes specified			*/	float *slopes;	/* slopes at which amplitudes are specified	*/	int namps;	/* number of amplitudes specified		*/	float *amps;	/* amplitudes corresponding to slopes		*/	float bias;	/* slope bias					*/	int verbose;	/* flag for echoing info			*/	char *tmpdir;	/* directory path for tmp files			*/	cwp_Bool istmpdir=cwp_false;/* true for user-given path		*/	/* Hook up getpar to handle the parameters */	initargs(argc,argv);	requestdoc(1);	/* Get info from first trace */ 	if (!gettr(&tr))  err("can't get first trace");	nt = tr.ns;	/* Get parameters */	if (!getparint("verbose", &verbose))	verbose = 0;	/* Look for user-supplied tmpdir */	if (!getparstring("tmpdir",&tmpdir) &&	    !(tmpdir = getenv("CWP_TMPDIR"))) tmpdir="";	if (!STREQ(tmpdir, "") && access(tmpdir, WRITE_OK))		err("you can't write in %s (or it doesn't exist)", tmpdir);	if (!getparfloat("dt", &dt))	dt = ((double) tr.dt)/1000000.0;	if (!dt) err("dt field is zero and not getparred");	if (!getparfloat("dx", &dx) && !getparfloat("d2", &dx))	dx = tr.d2;	if (!dx) err("d2 field is zero and dx not getparred");	nslopes = countparval("slopes");	if (nslopes) {		slopes = alloc1float(nslopes);		getparfloat("slopes", slopes);	} else {		nslopes = 1;		slopes = alloc1float(nslopes);		slopes[0] = 0.0;	}	namps = countparval("amps");	if (namps) {		amps = alloc1float(namps);		getparfloat("amps", amps);	} else {		namps = 1;		amps = alloc1float(namps);		amps[0] = 1.0;		warn("no amps given--doing no-op");	}	if (!getparfloat("bias", &bias)) bias = 0.0;	/* Check parameters */	if (nslopes != namps)		err("number of slopes (%d) must equal number of amps(%d)",			nslopes, namps);	{ register int i;	  for (i=1; i<nslopes; ++i)		if (slopes[i] <= slopes[i-1])			err("slopes must be monotonically increasing");	}	/* Store traces and headers in tmpfile while getting a count */	if (STREQ(tmpdir,"")) {		tracefp = etmpfile();		headerfp = etmpfile();		if (verbose) warn("using tmpfile() call");	} else { /* user-supplied tmpdir */		char directory[BUFSIZ];		strcpy(directory, tmpdir);		strcpy(tracefile, temporary_filename(directory));		strcpy(headerfile, temporary_filename(directory));		/* Trap signals so can remove temp files */		signal(SIGINT,  (void (*) (int)) closefiles);		signal(SIGQUIT, (void (*) (int)) closefiles);		signal(SIGHUP,  (void (*) (int)) closefiles);		signal(SIGTERM, (void (*) (int)) closefiles);		tracefp = efopen(tracefile, "w+");		headerfp = efopen(headerfile, "w+");      		istmpdir=cwp_true;				if (verbose) warn("putting temporary files in %s", directory);	}	ntr = 0;	do { 		++ntr;		efwrite(&tr, 1, HDRBYTES, headerfp);		efwrite(tr.data, FSIZE, nt, tracefp);	} while (gettr(&tr));		/* Apply slope filter */	slopefilter(nslopes,slopes,amps,bias,nt,dt,ntr,dx,tracefp);	/* Output filtered traces */	erewind(headerfp);	erewind(tracefp);	{ register int itr;	  for (itr = 0; itr < ntr; ++itr) {		efread(&tr, 1, HDRBYTES, headerfp);		efread(tr.data, FSIZE, nt, tracefp);		puttr(&tr);	  }	}	/* Clean up */	efclose(headerfp);	if (istmpdir) eremove(headerfile);	efclose(tracefp);	if (istmpdir) eremove(tracefile);	free1float(slopes);	free1float(amps);	return(CWP_Exit());}void slopefilter (int nslopes, float slopes[], float amps[], float bias,	int nt, float dt, int nx, float dx, FILE *tracefp)/******************************************************************************apply slope filter in frequency-wavenumber domain*******************************************************************************Input:nslopes		number of slopes (and amplitudes) specifiedslopes		slopes at which amplitudes are specified (see notes below)amps		amplitudes corresponding to slopes (see notes below)bias		linear moveout slope before and after filteringnt		number of time samplesdt		time sampling intervalnx		number of tracesdx		trace space (spatial sampling interval)tracefp		file pointer to data to be filteredOutput:tracefp		file pointer to filtered data*******************************************************************************Notes:Linear interpolation and constant extrapolation are used todetermine amplitudes for slopes that are not specified.******************************************************************************/{	int ntfft;		/* nt after padding for FFT */	int nxfft;		/* nx after padding for FFT */	float sfft;		/* scale factor for FFT */	int nw;			/* number of frequencies */	float dw;		/* frequency sampling interval */	float fw;		/* first frequency */	int nk;			/* number of wavenumbers */	float dk;		/* wavenumber sampling interval */	float w,k;		/* frequency and wavenumber */	int it,ix,iw,ik;	/* sample indices */	float slope,amp;	/* slope and amplitude for particular w,k */	complex **cpfft;	/* complex FFT workspace */	float **pfft;		/* float FFT workspace */	float phase;		/* phase shift for bias */	complex cshift;		/* complex phase shifter for bias */	/* determine lengths and scale factors for prime-factor FFTs */	ntfft = npfar(nt);	nxfft = npfa(nx);	sfft = 1.0/(ntfft*nxfft);		/* determine frequency and wavenumber sampling */	nw = ntfft/2+1;	dw = 2.0*PI/(ntfft*dt);	fw = 0.000001*dw; /* non-zero to avoid divide by zero w */	nk = nxfft;	dk = 2.0*PI/(nxfft*dx);	/* allocate real and complex workspace for FFTs */	cpfft = alloc2complex(nw,nk);	pfft = alloc2float(ntfft,nxfft);	/* copy data from input to FFT array and pad with zeros */	rewind(tracefp);	for (ix=0; ix<nx; ix++) {		efread(pfft[ix], FSIZE, nt, tracefp);		for (it=nt; it<ntfft; it++)			pfft[ix][it] = 0.0;	}	for (ix=nx; ix<nxfft; ix++)		for (it=0; it<ntfft; it++)			pfft[ix][it] = 0.0;		/* Fourier transform t to w */	pfa2rc(1,1,ntfft,nx,pfft[0],cpfft[0]);		/* do linear moveout bias via phase shift */	for (ix=0; ix<nx; ix++) {		for (iw=0,w=0.0; iw<nw; iw++,w+=dw) {			phase = -ix*dx*w*bias;			cshift = cmplx(cos(phase),sin(phase));			cpfft[ix][iw] = cmul(cpfft[ix][iw],cshift);		}	}		/* Fourier transform x to k */	pfa2cc(-1,2,nw,nxfft,cpfft[0]);		/* loop over wavenumbers */	for (ik=0; ik<nk; ik++) {			/* determine wavenumber */		k = (ik<=nk/2) ? ik*dk : (ik-nk)*dk;				/* loop over frequencies */		for (iw=0,w=fw; iw<nw; iw++,w+=dw) {					/* determine biased slope */			slope = k/w+bias;						/* linearly interpolate to find amplitude */			intlin(nslopes,slopes,amps,amps[0],amps[nslopes-1],				1,&slope,&amp);						/* include fft scaling */			amp *= sfft;						/* filter real and imaginary parts */			cpfft[ik][iw].r *= amp;			cpfft[ik][iw].i *= amp;		}	}	/* Fourier transform k to x */	pfa2cc(1,2,nw,nxfft,cpfft[0]);	/* undo linear moveout bias via phase shift */	for (ix=0; ix<nx; ix++) {		for (iw=0,w=0.0; iw<nw; iw++,w+=dw) {			phase = ix*dx*w*bias;			cshift = cmplx(cos(phase),sin(phase));			cpfft[ix][iw] = cmul(cpfft[ix][iw],cshift);		}	}	/* Fourier transform w to t */	pfa2cr(-1,1,ntfft,nx,cpfft[0],pfft[0]);		/* copy filtered data from FFT array to output */	rewind(tracefp);	for (ix=0; ix<nx; ix++)		efwrite(pfft[ix], FSIZE, nt, tracefp);	/* free workspace */	free2complex(cpfft);	free2float(pfft);}/* for graceful interrupt termination */static void closefiles(void){	efclose(headerfp);	efclose(tracefp);	eremove(headerfile);	eremove(tracefile);	exit(EXIT_FAILURE);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美制服丝袜第一页| 国产精品久久久久久久久搜平片| 日韩一区二区在线免费观看| 久久久久久久综合| 亚洲摸摸操操av| 国产麻豆日韩欧美久久| 欧美日韩综合在线| 欧美激情一区三区| 日韩av中文在线观看| 色综合视频一区二区三区高清| 欧美一级黄色片| 亚洲激情校园春色| 成人精品国产福利| 欧美一级免费观看| 亚洲国产成人tv| 日本高清不卡在线观看| 国产性色一区二区| 狠狠久久亚洲欧美| 欧美一级一区二区| 亚洲va天堂va国产va久| 日本久久电影网| 亚洲欧美自拍偷拍色图| 国产激情视频一区二区三区欧美| 日韩精品一区二区三区中文精品| 夜夜揉揉日日人人青青一国产精品| 不卡高清视频专区| 国产欧美精品国产国产专区| 国内精品国产三级国产a久久 | 亚洲第一综合色| 色噜噜狠狠一区二区三区果冻| 一区视频在线播放| 成人的网站免费观看| 国产精品无遮挡| av电影在线观看完整版一区二区| 国产亚洲短视频| 国产成人午夜精品5599| 国产视频在线观看一区二区三区| 国产真实乱对白精彩久久| 欧美v国产在线一区二区三区| 青青草一区二区三区| 欧美一区二区三区喷汁尤物| 麻豆国产精品官网| 精品福利一区二区三区免费视频| 精品一区二区三区的国产在线播放| 日韩欧美一级二级三级久久久| 美女视频黄 久久| 久久精品欧美一区二区三区麻豆| 成人午夜在线播放| 亚洲女同一区二区| 欧美日韩一级黄| 99国产精品视频免费观看| 亚洲国产精品高清| 欧美性色黄大片手机版| 亚洲综合精品久久| 日韩精品在线一区二区| 国内久久婷婷综合| 中文一区一区三区高中清不卡| 99精品黄色片免费大全| 香蕉久久夜色精品国产使用方法| 日韩欧美精品在线| 国产成a人无v码亚洲福利| 自拍偷拍欧美精品| 欧美日韩国产在线播放网站| 精品一区二区三区蜜桃| 国产精品盗摄一区二区三区| 欧美亚洲国产一卡| 国产一区二区三区免费在线观看| 国产精品素人一区二区| 精品视频在线看| 国产精品一区2区| 亚洲激情图片一区| 精品国产免费一区二区三区四区 | 91精品欧美久久久久久动漫| 免费观看一级特黄欧美大片| 亚洲国产电影在线观看| 欧美日韩和欧美的一区二区| 国产一区福利在线| 一级精品视频在线观看宜春院| 亚洲乱码国产乱码精品精小说 | 国产精品自拍网站| 亚洲狠狠丁香婷婷综合久久久| 欧美一区二区性放荡片| 99久久精品国产网站| 美国十次综合导航| 亚洲视频综合在线| 久久精品亚洲麻豆av一区二区| 91国产丝袜在线播放| 国产一区二区三区四区在线观看| 亚洲主播在线播放| 国产精品免费视频网站| 欧美mv日韩mv亚洲| 欧美日韩一区不卡| 成人av电影在线网| 国产精品888| 乱一区二区av| 日韩av电影免费观看高清完整版 | 欧美无乱码久久久免费午夜一区 | 久久精品一区二区三区四区 | 91丨九色丨蝌蚪富婆spa| 久久99九九99精品| 亚洲高清一区二区三区| 亚洲精品乱码久久久久久黑人| 国产欧美日韩视频在线观看| 欧美mv和日韩mv国产网站| 欧美精品v日韩精品v韩国精品v| 色网综合在线观看| 99久久婷婷国产综合精品电影| 国产麻豆精品theporn| 蜜臀av在线播放一区二区三区| 性做久久久久久久免费看| 亚洲一区二区三区在线播放| 亚洲人成影院在线观看| 中文字幕亚洲欧美在线不卡| 国产精品三级久久久久三级| 久久蜜桃一区二区| 欧美激情综合五月色丁香小说| 久久久精品tv| 国产欧美一区二区精品性| 欧美激情综合五月色丁香小说| 久久人人爽人人爽| 国产亚洲一区二区三区四区| 国产亚洲成年网址在线观看| 国产偷v国产偷v亚洲高清| 国产欧美视频在线观看| 中文字幕精品一区二区三区精品| 国产欧美一区二区三区鸳鸯浴 | 日韩欧美一区二区三区在线| 欧美一区二区三区啪啪| 欧美电视剧免费观看| 精品999在线播放| 国产午夜精品美女毛片视频| 国产精品免费视频观看| 亚洲男人的天堂av| 日韩av一区二| 国产精品一区二区免费不卡 | 日本高清免费不卡视频| 欧美色综合网站| 日韩欧美一区二区免费| 久久久三级国产网站| 国产精品国产a| 亚洲成av人片www| 国产麻豆欧美日韩一区| 91在线国产观看| 欧美一区二区私人影院日本| 久久影视一区二区| 国产精品久久久久久亚洲毛片| 国产中文字幕一区| www.亚洲精品| 欧美日本在线观看| 久久精品在线免费观看| 一区二区三区日韩精品视频| 日韩和欧美的一区| 成人免费高清在线| 欧美日韩黄色一区二区| 国产欧美精品日韩区二区麻豆天美| 尤物av一区二区| 激情成人午夜视频| 欧美亚洲图片小说| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲在线视频免费观看| 国产在线日韩欧美| 欧美日韩在线亚洲一区蜜芽| 久久影院午夜片一区| 亚洲成人综合视频| av一区二区三区在线| 日韩欧美成人一区二区| 亚洲综合男人的天堂| 成人午夜私人影院| 日韩精品中文字幕在线一区| 樱桃视频在线观看一区| 国产激情一区二区三区四区| 欧美精品v国产精品v日韩精品| 欧美激情一区二区三区不卡 | 一区二区三区视频在线看| 国产高清在线观看免费不卡| 欧美日韩一区二区欧美激情| 国产精品国产a| 国产一区二区三区免费看| 欧美日本乱大交xxxxx| 亚洲欧美另类小说视频| 国内成人精品2018免费看| 欧美丰满一区二区免费视频| 亚洲人成伊人成综合网小说| 成人精品免费看| 日本一区二区三区久久久久久久久不| 五月激情丁香一区二区三区| 色婷婷久久久综合中文字幕| 国产欧美一区在线| 国产精品羞羞答答xxdd| 日韩女优制服丝袜电影| 麻豆精品一区二区| 欧美一区二区三区四区五区| 亚洲成av人片一区二区梦乃| 欧美做爰猛烈大尺度电影无法无天| 国产精品久久一级| 成人网男人的天堂| 国产日韩av一区| 床上的激情91.| 国产精品久久国产精麻豆99网站| 成人免费视频一区|