# Path: janus_const.py

# 
# Path: janus_helper.py
# def calc_arr_norm( v ):
# 
# 	mag = sqrt( fsum( [ c**2 for c in v ]) )
# 
# 	return tuple( [ ( c/mag) for c in v ] )
# 
# def calc_arr_dot( u,v ) :
# 	if ( len(u) != len(v) ) :
# 		raise TypeError( 'Unequal lengths.' )
# 	return fsum([ x[0]*x[1] for x in zip(u,v) ]) 


from math import sqrt, acos, pi
from numpy import interp, sin, cos, deg2rad, exp, array
from scipy.special import erf
from janus_const import const
from janus_helper import calc_arr_norm, calc_arr_dot
		elif ( key == 'dir_z' ) :
			return self._dir_z
		elif ( key == 'dir' ) :
			return ( self._dir_x, self._dir_y, self._dir_z )
		elif ( key == 'norm_b_x' ) :
			return self._norm_b_x
		elif ( key == 'norm_b_y' ) :
			return self._norm_b_y
		elif ( key == 'norm_b_z' ) :
			return self._norm_b_z
		elif ( key == 'norm_b' ) :
			return ( self._norm_b_x,self._norm_b_y,self._norm_b_z )
		elif ( key == 'maglook' ) :
			return ( self._maglook )
		else :
			raise KeyError( 'Invalid key for "fc_dat ".' )

	def __setitem__( self, key, val ) :

		raise KeyError('Reassignment not allowed after initialization.')


	#-----------------------------------------------------------------------
	# DEFINE THE FUNCTION FOR SETIING THE MAGNETIC FIELD DIRECTION.
	#-----------------------------------------------------------------------

	def set_mag( self, b_vec ) :

		# Normalize the magnetic-field vector.


# Path: janus_const.py

# 
# Path: janus_helper.py
# def calc_arr_norm( v ):
# 
# 	mag = sqrt( fsum( [ c**2 for c in v ]) )
# 
# 	return tuple( [ ( c/mag) for c in v ] )
# 
# def calc_arr_dot( u,v ) :
# 	if ( len(u) != len(v) ) :
# 		raise TypeError( 'Unequal lengths.' )
# 	return fsum([ x[0]*x[1] for x in zip(u,v) ]) 


# Path: janus_fc_dat.py
from math import sqrt, acos, pi
from numpy import interp, sin, cos, deg2rad, exp, array
from scipy.special import erf
from janus_const import const
from janus_helper import calc_arr_norm, calc_arr_dot

		elif ( key == 'dir_z' ) :
			return self._dir_z
		elif ( key == 'dir' ) :
			return ( self._dir_x, self._dir_y, self._dir_z )
		elif ( key == 'norm_b_x' ) :
			return self._norm_b_x
		elif ( key == 'norm_b_y' ) :
			return self._norm_b_y
		elif ( key == 'norm_b_z' ) :
			return self._norm_b_z
		elif ( key == 'norm_b' ) :
			return ( self._norm_b_x,self._norm_b_y,self._norm_b_z )
		elif ( key == 'maglook' ) :
			return ( self._maglook )
		else :
			raise KeyError( 'Invalid key for "fc_dat ".' )

	def __setitem__( self, key, val ) :

		raise KeyError('Reassignment not allowed after initialization.')


	#-----------------------------------------------------------------------
	# DEFINE THE FUNCTION FOR SETIING THE MAGNETIC FIELD DIRECTION.
	#-----------------------------------------------------------------------

	def set_mag( self, b_vec ) :

		# Normalize the magnetic-field vector.


		norm_b = calc_arr_norm( b_vec )