ess.diffraction.peaks.dspacing_peaks_from_cif#
- ess.diffraction.peaks.dspacing_peaks_from_cif(cif, intensity_threshold=None, **kwargs)[source]#
Retrieves a data array representing the bragg peaks of the given material.
The material is represented by a cif file or a codid or similar. The number of peaks retrieved can be controlled by setting the intensity threshold argument to only retrieve prominent peaks.
- Parameters:
cif –
Generalised CIF source, either in the form of text data, a file path, a database ID (in the form of a string like “codid::9008460” or “mpid::87)”, for either the Crystallography Open Database (https://www.crystallography.net/cod/) or the Materials Project (https://www.materialsproject.org/).
For more details, see
ncrystal.cifutils.CIFSource.intensity_threshold (default:
None) – The minimum intensity of the peaks to return. Intensity is here defined as the squared structure factor times the multiplicity of the peak. Theintensity_thresholdmust be convertible to unitbarn.kwargs – Can be anything that :py:`NCrystal.NCMATComposer.from_cif` supports. For example:
uiso_temperatureoroverride_spacegroup.
- Returns:
DataArray– Data array representing peak amplitudes and peak positions indspacing. The full NCrystal information object is added as a coordinate with the nameinfo. The input arguments are added as scalar coordinates.
Examples
>>> from ess.diffraction.peaks import dspacing_peaks_from_cif >>> dspacing_peaks_from_cif( ... 'codid::9008460', ... uiso_temperature=400, ... override_spacegroup='F d -3 m:1', ... ) <scipp.DataArray> Dimensions: Sizes[peaks:162, ] Coordinates: * cif string <no unit> () "codid::9008460" * dspacing float64 [Å] (peaks) [2.33803, 2.02479, ..., 0.243756, 0.243756] * info PyObject <no unit> () <NCrystal.core.Info object at ...> * override_spacegroup string <no unit> () "F d -3 m:1" * uiso_temperature int64 [dimensionless] () 400 Data: float64 [barn] (peaks) [13.3631, 9.59562, ..., 0.000556426, 0.000556426]