- generate_reflections(cell, slmin, slmax, spg, **kwargs)¶
Generates a list of reflections from a given cell and space group in the range defined by slmin and slmax. Object cell is created by calling (set_crystal_cell). Object spg is created by calling (set_spacegroup_from_dbase).
- Parameters:
cell (dict (cell_g_type)) – the crystal cell.
slmin (float.) – Minimum value of sin(theta) / lambda.
slmax (float.) – Maximum value of sin(theta) / lambda.
spg (dict (spg_type or superspacegroup_type)) – the space group.
kwargs['friedel'] (bool) – if True, apply Friedel’s law. Defaul value: True.
kwargs['hlim'] (ndarray, dim=(3,2), type=np.int32) – h,k,l limits.
kwargs['mag_only'] (bool) – if True, only magnetic reflections are generated. Default value: False.
kwargs['order'] (bool) – if True, reflections ordered by increasing sin(theta) / lambda. Default value: False.
kwargs['seqindx'] (ndarray, dim=(3), type=np.int32) – sequence in which index changes in the reflection list. [3,2,1] indicates l changes first, then k, finally h.
kwargs['unique'] (bool) – if given, unique reflections are generated.
kwargs['ref_typ'] (str.) – type of the returned dictionary. It can be refl or srefl or mrefl. Default value: ‘refl’.
- Returns:
reflection list.
- Return type:
dict (refl_type or srefl_type or mrefl_type)
>>> from pycrysfml import cfml_metrics >>> from pycrysfml import cfml_gspacegroups >>> from pycrysfml import cfml_reflections >>> import numpy as np >>> vcell = np.array([4.0,5.0,6.0],dtype=np.float32) >>> vang = np.array([90.0,90.0,90.0],dtype=np.float32) >>> cell = cfml_metrics.set_cell(vcell,vang) >>> sg = cfml_gspacegroups.set_spacegroup_from_dbase("P222","shubn") >>> ref = cfml_reflections.generate_reflections(cell,0.0,0.6,sg,order=True) >>> ref['nref'] 868 >>> ref['ref'][0] {'fortran_type': 'refl_type', 'h': array([ 0, 0, -1], dtype=int32), 'mult': 2, 's': 0.0833333358168602, 'imag': 0, 'pcoeff': 0}