grid_visualization.py
def make_dx(filename, num_on_axis, min_point, val_delta):
	'''
	Function that takes the filename IE output of jobs, and makes a dx file from the results for visualization
	'''

	with open(filename) as fin:
		data=fin.readlines()

        if len(data) == 0:
            return None,None
	l=filename.split('_predictscores')[0]

	pattern=re.compile("^[0-9]")
	data=[float(x.split()[0]) for x in data if pattern.match(x)]
	scores=np.array(data)
	dxdata=scores.reshape(num_on_axis,num_on_axis,num_on_axis)
	test=dxdata.round(4)
	g=gridData.Grid(dxdata,origin=min_point, delta=val_delta)
	g.export(l+"grid","DX")
	return dxdata,test

	Function that takes the filename IE output of jobs, and makes a dx file from the results for visualization
	
Function that takes the filename IE output of jobs, and makes a dx file from the results for visualization
Function that takes the filename IE output of jobs and makes a dx file from the results for visualization
def make_dx(filename, num_on_axis, min_point, val_delta):
	with open(filename) as fin:
		data=fin.readlines()
        if len(data) == 0:
            return None,None
	l=filename.split('_predictscores')[0]
	pattern=re.compile("^[0-9]")
	data=[float(x.split()[0]) for x in data if pattern.match(x)]
	scores=np.array(data)
	dxdata=scores.reshape(num_on_axis,num_on_axis,num_on_axis)
	test=dxdata.round(4)
	g=gridData.Grid(dxdata,origin=min_point, delta=val_delta)
	g.export(l+"grid","DX")
	return dxdata,test
def make_dx ( filename , num_on_axis , min_point , val_delta ) : with open ( filename ) as fin : data = fin . readlines ( ) if len ( data ) == 0 : return None , None l = filename . split ( '_predictscores' ) [ 0 ] pattern = re . compile ( "^[0-9]" ) data = [ float ( x . split ( ) [ 0 ] ) for x in data if pattern . match ( x ) ] scores = np . array ( data ) dxdata = scores . reshape ( num_on_axis , num_on_axis , num_on_axis ) test = dxdata . round ( 4 ) g = gridData . Grid ( dxdata , origin = min_point , delta = val_delta ) g . export ( l + "grid" , "DX" ) return dxdata , test
Function that takes the filename IE output of jobs, and makes a dx file from the results for visualization
Function that takes the filename IE output of jobs and makes a dx file from the results for visualization
'''
	Function that takes the filename IE output of jobs, and makes a dx file from the results for visualization
	'''
filename
num_on_axis
min_point
val_delta