Пример #1
0
#!/usr/bin/env python
import sys,math
import numpy as np
import scipy.optimize
import ogp_util

np.set_printoptions(precision=4)

if (len(sys.argv)!=11):
	print sys.argv[0]+' (top|bottom) noballs.PRT balls.PRT modules.PRT L1front.PRT L1back.PRT L2front.PRT L2back.PRT L3front.PRT L3back.PRT '
	sys.exit()

null_basis = ogp_util.make_basis(np.array([0.0, 0.0, 0.0]), #ball basis in ball frame
		np.array([1.0, 0.0, 0.0]),
		np.array([0.0, 1.0, 0.0]))

side = sys.argv[1]
if (side=='top'):
	dz = (11.973-0.5-0.375-0.3125)*25.4
	p0 = [-47.0,8.5,96.0,0.0,0.0,0.0]
	l2_basis = ogp_util.make_pin_basis(np.array([0.0, 0.0, 0.0]), #pin basis in U-channel survey frame
			np.array([1.0, 0.0, 0.0]),
			np.array([0.0, 0.0, 1.0]))
	modulesurvey_basis = ogp_util.make_basis(np.array([0.0, 0.0, 0.0]), #ball basis in module survey frame
			np.array([1.0, 0.0, 0.0]),
			np.array([0.0, 0.0, -1.0]))
	is_top = 1
elif (side=='bottom'):
	dz = (11.973-0.5-0.375+0.3125)*25.4
	p0 = [-45.0,-8.5,104.0,0.0,0.0,0.0]
	l2_basis = ogp_util.make_pin_basis(np.array([0.0, 0.0, 0.0]),
Пример #2
0
def get_basis(p):
	axis = get_axis(p)
	diaball = axis[0]+np.array([0.0,1.0,0.0])
	return ogp_util.make_basis(axis[0],axis[1],diaball)
Пример #3
0
#!/usr/bin/env python
import sys,math
import numpy as np
import scipy.optimize
import ogp_util

np.set_printoptions(precision=4)

if (len(sys.argv)!=11):
	print sys.argv[0]+' (top|bottom) noballs.PRT balls.PRT modules.PRT L1front.PRT L1back.PRT L2front.PRT L2back.PRT L3front.PRT L3back.PRT'
	sys.exit()

null_basis = ogp_util.make_basis(np.array([0.0, 0.0, 0.0]), #ball basis in ball frame
		np.array([1.0, 0.0, 0.0]),
		np.array([0.0, 1.0, 0.0]))

side = sys.argv[1]
if (side=='top'):
	dz = (11.973-0.5-0.375-0.3125)*25.4
	p0 = [-47.0,8.5,96.0,0.0,0.0,0.0]
	l5_basis = ogp_util.make_pin_basis(np.array([0.0, 0.0, 0.0]), #pin basis in U-channel survey frame
			np.array([1.0, 0.0, 0.0]),
			np.array([0.0, 0.0, 1.0]))
	modulesurvey_basis = ogp_util.make_basis(np.array([0.0, 0.0, 0.0]), #ball basis in module survey frame
			np.array([1.0, 0.0, 0.0]),
			np.array([0.0, 0.0, -1.0]))
	is_top = 1
elif (side=='bottom'):
	dz = (11.973-0.5-0.375+0.3125)*25.4
	p0 = [-45.0,-8.5,104.0,0.0,0.0,0.0]
	l5_basis = ogp_util.make_pin_basis(np.array([0.0, 0.0, 0.0]),
Пример #4
0
b13_positions.append(ogp_util.get_uchbasis(stepdict,'M_BOT13','_END'))
b13_positions.append(ogp_util.get_uchbasis(stepdict,'M_BOT13','_0'))

t13_positions = []
t13_positions.append(ogp_util.get_uchbasis(stepdict,'M_TOP13','_+1'))
t13_positions.append(ogp_util.get_uchbasis(stepdict,'M_TOP13','_+2'))
t13_positions.append(ogp_util.get_uchbasis(stepdict,'M_TOP13','_+3'))
t13_positions.append(ogp_util.get_uchbasis(stepdict,'M_TOP13','_+5'))
t13_positions.append(ogp_util.get_uchbasis(stepdict,'M_TOP13','_END'))
t13_positions.append(ogp_util.get_uchbasis(stepdict,'M_TOP13','_0'))
t13_positions.append(ogp_util.get_uchbasis(stepdict,'M_TOP13','_END2'))
t13_positions.append(ogp_util.get_uchbasis(stepdict,'M_TOP13','_02'))
#print b13_positions

null_basis = ogp_util.make_basis(np.array([0.0, 0.0, 0.0]), #ball basis in ball frame
		np.array([1.0, 0.0, 0.0]),
		np.array([0.0, 1.0, 0.0]))

p0 = [-50.0, 300.0,0.0,300.0]

def get_axis(p):
	#return np.array([[0.0,p[0],p[1]],
	#	[50.0,p[2],p[3]]])
	return np.array([[0.0,p[0],p[1]],
		[50.0,p[0],p[1]]])
def get_basis(p):
	axis = get_axis(p)
	diaball = axis[0]+np.array([0.0,1.0,0.0])
	return ogp_util.make_basis(axis[0],axis[1],diaball)

def transform_axis(null_basis,uch_basis,p):