當前位置: 首頁>>代碼示例>>Python>>正文


Python Relax_data_store.chi2方法代碼示例

本文整理匯總了Python中data_store.Relax_data_store.chi2方法的典型用法代碼示例。如果您正苦於以下問題:Python Relax_data_store.chi2方法的具體用法?Python Relax_data_store.chi2怎麽用?Python Relax_data_store.chi2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在data_store.Relax_data_store的用法示例。


在下文中一共展示了Relax_data_store.chi2方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: array

# 需要導入模塊: from data_store import Relax_data_store [as 別名]
# 或者: from data_store.Relax_data_store import chi2 [as 別名]
vect_z = array([2, 1, 3], float64)
r, theta, phi = cartesian_to_spherical(vect_z)

# Load the tensors.
self._execute_uf(uf_name='script', file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'tensors'+sep+'free_rotor_axis2_1_3_rot_tensors.py')

# Data init.
cdp.ave_pos_beta = 0.5
cdp.ave_pos_gamma = 0.2
cdp.axis_theta  = theta
cdp.axis_phi = phi

# Select the Frame Order model.
self._execute_uf(uf_name='frame_order.select_model', model='free rotor')

# Set the reference domain.
self._execute_uf(uf_name='frame_order.ref_domain', ref='full')

# Calculate the chi2.
self._execute_uf(uf_name='calc')
#cdp.chi2b = cdp.chi2
#self._execute_uf(uf_name='minimise', min_algor='simplex')
ds.chi2 = cdp.chi2

# Save the program state.
#self._execute_uf(uf_name='state.save', state="free_rotor", force=True)

# Chi2 printout.
print("\n\n")
print("Chi2: %s" % cdp.chi2)
開發者ID:belisario21,項目名稱:relax_trunk,代碼行數:32,代碼來源:free_rotor.py

示例2: get_angle

# 需要導入模塊: from data_store import Relax_data_store [as 別名]
# 或者: from data_store.Relax_data_store import chi2 [as 別名]
            # The incremented angle.
            if val == 'var':
                val = get_angle(i, incs=INC, deg=False)

            # Set the parameter name, storing an original copy for optimisation comparison.
            setattr(cdp, params[j], val)
            setattr(cdp, 'orig_' + params[j], val)

        # Select the Frame Order model.
        self._execute_uf(uf_name='frame_order.select_model', model='pseudo-ellipse, free rotor')

        # Set the reference domain.
        self._execute_uf(uf_name='frame_order.ref_domain', ref='full')

        # Calculate the chi2.
        self._execute_uf(uf_name='calc')
        #cdp.chi2b = cdp.chi2
        #self._execute_uf(uf_name='minimise', min_algor='simplex')
        chi2[round].append(cdp.chi2)

    # Save the program state.
    #self._execute_uf(uf_name='state.save', state="pseudo_ellipse_free_rotor%s" % round, force=True)

# Chi2 printout.
ds.chi2 = chi2
print("\n\n")
for round in range(len(files)):
    print("\n\nFile: %s\n" % files[round])
    for i in range(INC):
        print("Cone %3i deg, chi2: %s" % (get_angle(i, incs=INC, deg=True), chi2[round][i]))
開發者ID:belisario21,項目名稱:relax_trunk,代碼行數:32,代碼來源:pseudo_ellipse_free_rotor.py

示例3: norm

# 需要導入模塊: from data_store import Relax_data_store [as 別名]
# 或者: from data_store.Relax_data_store import chi2 [as 別名]
vect_x = vect_x / norm(vect_x)
vect_y = vect_y / norm(vect_y)
vect_z = vect_z / norm(vect_z)

# Build the frame.
EIG_FRAME = zeros((3, 3), float64)
EIG_FRAME[:, 0] = vect_x
EIG_FRAME[:, 1] = vect_y
EIG_FRAME[:, 2] = vect_z
a, b, g = R_to_euler_zyz(EIG_FRAME)

# Load the tensors.
self._execute_uf(uf_name='script', file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'tensors'+sep+'iso_cone_free_rotor_axis2_1_3_tensors_beta78_75.py')

# Data stores.
ds.chi2 = []
ds.angles = []

# Loop over the cones.
for i in range(INC):
    # Switch data pipes.
    ds.angles.append(get_angle(i, incs=INC, deg=True))
    self._execute_uf(uf_name='pipe.switch', pipe_name='cone_%.1f_deg' % ds.angles[-1])

    # Data init.
    cdp.ave_pos_alpha  = cdp.ave_pos_alpha2  = 0.0
    cdp.ave_pos_beta   = cdp.ave_pos_beta2   = 78.75 / 360.0 * 2.0 * pi
    cdp.ave_pos_gamma  = cdp.ave_pos_gamma2  = 0.0
    cdp.eigen_alpha    = cdp.eigen_alpha2    = a
    cdp.eigen_beta     = cdp.eigen_beta2     = b
    cdp.eigen_gamma    = cdp.eigen_gamma2    = g
開發者ID:belisario21,項目名稱:relax_trunk,代碼行數:33,代碼來源:pseudo_ellipse_free_rotor_to_iso_cone_free_rotor.py


注:本文中的data_store.Relax_data_store.chi2方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。