1
1
import datetime
2
- from copy import deepcopy
3
2
import warnings
3
+ from copy import deepcopy
4
+
4
5
import numpy as np
5
6
6
7
from diffpy .utils .tools import get_package_info
@@ -24,14 +25,14 @@ class Diffraction_object:
24
25
`Diffraction_object` is deprecated and will be removed in diffpy.utils 3.6.0. It is replaced by
25
26
`DiffractionObject` to follow the class naming convention.
26
27
"""
27
-
28
+
28
29
warnings .warn (
29
30
"Diffraction_object` is deprecated and will be removed in diffpy.utils 3.6.0, It is replaced by "
30
31
"DiffractionObject` to follow the class naming convention." ,
31
32
DeprecationWarning ,
32
33
stacklevel = 2 ,
33
34
)
34
-
35
+
35
36
def __init__ (self , name = "" , wavelength = None ):
36
37
self .name = name
37
38
self .wavelength = wavelength
@@ -477,25 +478,6 @@ def dump(self, filepath, xtype=None):
477
478
np .savetxt (f , data_to_save , delimiter = " " )
478
479
479
480
480
- import datetime
481
- from copy import deepcopy
482
-
483
- import numpy as np
484
-
485
- from diffpy .utils .tools import get_package_info
486
-
487
- QQUANTITIES = ["q" ]
488
- ANGLEQUANTITIES = ["angle" , "tth" , "twotheta" , "2theta" ]
489
- DQUANTITIES = ["d" , "dspace" ]
490
- XQUANTITIES = ANGLEQUANTITIES + DQUANTITIES + QQUANTITIES
491
- XUNITS = ["degrees" , "radians" , "rad" , "deg" , "inv_angs" , "inv_nm" , "nm-1" , "A-1" ]
492
-
493
- x_grid_emsg = (
494
- "objects are not on the same x-grid. You may add them using the self.add method "
495
- "and specifying how to handle the mismatch."
496
- )
497
-
498
-
499
481
class DiffractionObject :
500
482
def __init__ (self , name = "" , wavelength = None ):
501
483
self .name = name
0 commit comments