def Test_from_xyz_file(): pvecs = np.genfromtxt(kFile_xyz, delimiter=',') for elem in pvecs: beta_rad = pac.calc_beta_rad(elem) gamma_rad = pac.calc_gamma_rad(elem) beta_deg = np.rad2deg(beta_rad) gamma_deg = np.rad2deg(gamma_rad) fmt = "{0} \tbeta:{1:6.1f} gamma:{2:6.1f}" msg = fmt.format(elem, beta_deg, gamma_deg) print(msg)
def make_beta_gamma_tbl_gFN(nodeNumber): xs = gFN.getFibonacciNodes(nodeNumber) outlst = [] for elem in xs: beta_rad = pAC.calc_beta_rad(elem) gamma_rad = pAC.calc_gamma_rad(elem) beta_deg = np.rad2deg(beta_rad) gamma_deg = np.rad2deg(gamma_rad) outlst += [[beta_deg, gamma_deg]] output_file(outlst, kFile_output_gFN)
def make_beta_gamma_tbl_gIN(kIndex, typeIndex): xs, tris = gIN.getIcosNodes(kIndex, typeIndex) outlst = [] for elem in xs: beta_rad = pAC.calc_beta_rad(elem) gamma_rad = pAC.calc_gamma_rad(elem) beta_deg = np.rad2deg(beta_rad) gamma_deg = np.rad2deg(gamma_rad) outlst += [[beta_deg, gamma_deg]] output_file(outlst, kFile_output_gIN)
def test_pySpherepts_IcosNodes(): xs, tris = gIN.getIcosNodes(4, 0) pvecs = xs for elem in pvecs: beta_rad = pac.calc_beta_rad(elem) gamma_rad = pac.calc_gamma_rad(elem) beta_deg = np.rad2deg(beta_rad) gamma_deg = np.rad2deg(gamma_rad) fmt = "{0} \tbeta:{1:6.1f} gamma:{2:6.1f}" msg = fmt.format(elem, beta_deg, gamma_deg) print(msg)
def Test_group_run_axes(): print('---Test_group_run_axes---') pvecs = [ [0, 0, 1], # z direction [0, 0, -1], # z direction [0, 1, 0], # y direction [0, -1, 0], # y direction [1, 0, 0], # x direction [-1, 0, 0], # x direction ] for elem in pvecs: beta_rad = pac.calc_beta_rad(elem) gamma_rad = pac.calc_gamma_rad(elem) beta_deg = np.rad2deg(beta_rad) gamma_deg = np.rad2deg(gamma_rad) fmt = "{0} \tbeta:{1:6.1f} gamma:{2:6.1f}" msg = fmt.format(elem, beta_deg, gamma_deg) print(msg)