- set_cell(vcell, vang, **kwargs)¶
Creates an object of type cell_g_type.
- Parameters:
vang (ndarray, dim=(3), type=float32) – lattice parameters \(\alpha^*\), \(\beta^*\) and \(\gamma^*\).
vcell (ndarray, dim=(3), type=float32) – lattice parameters \(a^*\), \(b^*\) and \(c^*\).
kwargs – optional arguments.
kwargs['carttype'] (str) – cartesian coordinate system.
kwargs['vsang'] (ndarray, dim=(3), type=np.float32) – vang standard deviations.
kwargs['vscell'] (ndarray, dim=(3), type=np.float32) – vcell standard deviations.
- Returns:
crystal cell
- Return type:
dict (cell_g_type)
>>> from pycrysfml import cfml_metrics >>> import numpy as np >>> vcell = np.array([4.0,4.0,7.0],dtype=np.float32) >>> vang = np.array([90.0,90.0,120.0],dtype=np.float32) >>> cell = cfml_metrics.set_cell(vcell,vang,carttype='AC') >>> for k in cell: ... print(f'{k :>10}: {cell[k]}') ... cell: [4. 4. 7.] scell: [0. 0. 0.] ang: [ 90. 90. 120.] sang: [0. 0. 0.] vol: 96.99484252929688 svol: 0.0 rcell: [0.28867513 0.28867513 0.14285715] rang: [90. 90. 60.] rvol: 0.010309826582670212 gd: [[16. -8. 0.] [-8. 16. 0.] [ 0. 0. 49.]] gr: [[0.08333333 0.04166666 0. ] [0.04166666 0.08333333 0. ] [0. 0. 0.02040816]] cr_orth_cel: [[ 4. -2. 0. ] [ 0. 3.4641016 0. ] [ 0. 0. 7. ]] orth_cr_cel: [[ 0.25 0.14433756 -0. ] [-0. 0.28867513 -0. ] [ 0. -0. 0.14285715]] bl_m: [[ 0.28867513 0.14433756 0. ] [ 0. 0.24999999 -0. ] [ 0. 0. 0.14285715]] inv_bl_m: [[ 3.4641016 -2.0000002 -0. ] [-0. 4.0000005 0. ] [ 0. -0. 6.9999995]] carttype: AC