Beispiel #1
0
def runHELIOSprep(SHOT,pathNAM,fnamH5,fnamMAT,CHDsetupNum=6,downSAMPfac=100,bacPNTSM=5,bacinterppnt=350,bacfrac=30,quiet=True):
	rawDF,header = prep.loadtoPDS(SHOT,quiet=False)
	downsamDF,smDF,bacoffDF = prep.makWavs(rawDF,header,baseNum=downSAMPfac,bacPNTSM=bacPNTSM,bacinterppnt=bacinterppnt,bacfrac=bacfrac,quiet=quiet)
	truncDF = prep.truncWavs(SHOT,bacoffDF,fnamH5,quiet=quiet)
	SHEdata = gST.load2DICT(fnamH5)
	finDF = mR.run(SHOT,truncDF,CHDsetNum=CHDsetupNum,CHDpath=pathNAM,quiet=quiet)
	return rawDF,downsamDF,smDF,bacoffDF,truncDF,finDF,SHEdata
Beispiel #2
0
def getTimes(shot,fnamH5,truncVal=0.9,fnamMAT=None,load2HDF=False,fixSHE=True,quiet=True,debug=False):
	if load2HDF:
		if fnamMAT == None:
			fnamMAT='/Users/unterbee/Desktop/shot_118800.mat'
		gST.getShotmat(118800,fnamMAT)
	dataDICT = gST.load2DICT(fnamH5)
	if fixSHE:
		oldX=dataDICT['x_she1']
		oldY=dataDICT['y_she1']
		dataDICT['x_she_corr']=oldX[:]+0.04
		dataDICT['y_she_corr']=oldY[:]-np.mean(oldY[0:10])
		ind = np.where((dataDICT['y_she_corr']/dataDICT['y_she_corr'].max()) > truncVal)
	else:
		ind = np.where((dataDICT['y_she1']/dataDICT['y_she1'].max()) > truncVal)
	tValues = dataDICT['x_she_corr'][ind]
	if debug and not quiet:
		print "num data, num trunc {} {}".format(dataDICT['x_she_corr'].shape,tValues.shape)
	return tValues,ind