-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathpeakwidthmodel.py
More file actions
69 lines (53 loc) · 2.22 KB
/
peakwidthmodel.py
File metadata and controls
69 lines (53 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env python
##############################################################################
#
# diffpy.srreal by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2010 The Trustees of Columbia University
# in the City of New York. All rights reserved.
#
# File coded by: Pavol Juhas
#
# See AUTHORS.txt for a list of people who contributed.
# See LICENSE_DANSE.txt for license information.
#
##############################################################################
"""
Classes for configuring peak width evaluation in PDF calculations:
PeakWidthModel,
ConstantPeakWidth, DebyeWallerPeakWidth, JeongPeakWidth
"""
# exported items
__all__ = [
'PeakWidthModel',
'ConstantPeakWidth',
'DebyeWallerPeakWidth',
'JeongPeakWidth'
]
from diffpy.srreal import _final_imports
from diffpy.srreal.srreal_ext import PeakWidthModel, ConstantPeakWidth
from diffpy.srreal.srreal_ext import DebyeWallerPeakWidth, JeongPeakWidth
from diffpy.srreal.wraputils import propertyFromExtDoubleAttr
# class PeakWidthModel -------------------------------------------------------
# add attribute wrappers for the derived classes
ConstantPeakWidth.width = propertyFromExtDoubleAttr('width',
'''Constant FWHM value returned by this model.
''')
ConstantPeakWidth.bisowidth = propertyFromExtDoubleAttr('bisowidth',
'''Equivalent uniform Biso for this constant `width`.
''')
ConstantPeakWidth.uisowidth = propertyFromExtDoubleAttr('uisowidth',
'''Equivalent uniform Uiso for this constant `width`.
''')
JeongPeakWidth.delta1 = propertyFromExtDoubleAttr('delta1',
'Coefficient for (1/r) contribution to the peak sharpening.')
JeongPeakWidth.delta2 = propertyFromExtDoubleAttr('delta2',
'Coefficient for (1/r**2) contribution to the peak sharpening.')
JeongPeakWidth.qbroad = propertyFromExtDoubleAttr('qbroad',
'PDF peak broadening from increased intensity noise at high Q.')
JeongPeakWidth.qbroad_new = propertyFromExtDoubleAttr('qbroad_new',
'PDF peak broadening from non-constant instrumental broadening in Q-space.')
# Import delayed tweaks of the extension classes.
_final_imports.import_now()
del _final_imports
# End of file