예제 #1
0
    def get_coordinates(*args):
    	"""
	Returns the array of coordinates of the elements of the other arrays :
		either an array of tuples (theta, phi) or of tuples (rho, phi, z) - either in (degrees, degrees) or in (meters, degrees, meters).
	"""
    	_ifar = _get_ifar(*args)
	n_theta=_get_n_theta(*args)
        n_phi=_get_n_phi(*args)
	theta_start = _get_theta_start(*args)
	delta_theta = _get_delta_theta(*args)
	phi_start = _get_phi_start(*args)
	delta_phi = _get_delta_phi(*args)
	l=[]
	
	if _ifar == 1 :
		rho = _PyNEC.nec_radiation_pattern_get_range(*args)
		for i in range(n_phi) :
			for j in range(n_theta) :
				l.append((rho, phi_start+i*delta_phi,theta_start+j*delta_theta))
		ar = numarray.array(l);
		ar = numarray.reshape(ar, (n_phi,n_theta,3))
	
	else :
		for i in range(n_phi) :
			for j in range(n_theta) :
				l.append((theta_start+j*delta_theta, phi_start+i*delta_phi))
		ar = numarray.array(l);
		ar = numarray.reshape(ar, (n_phi,n_theta,2))
	
	return ar  
예제 #2
0
def _get_range(arg0):
	"""
	Returns the radial distance in meters ( or the rho cylindrical coordinate in meters if the calculation mode chosen is mode 1 ).
	"""
	return _PyNEC.nec_radiation_pattern_get_range(arg0)