11import datetime
2- from copy import deepcopy
32import warnings
3+ from copy import deepcopy
4+
45import numpy as np
56
67from diffpy .utils .tools import get_package_info
@@ -24,14 +25,14 @@ class Diffraction_object:
2425 `Diffraction_object` is deprecated and will be removed in diffpy.utils 3.6.0. It is replaced by
2526 `DiffractionObject` to follow the class naming convention.
2627 """
27-
28+
2829 warnings .warn (
2930 "Diffraction_object` is deprecated and will be removed in diffpy.utils 3.6.0, It is replaced by "
3031 "DiffractionObject` to follow the class naming convention." ,
3132 DeprecationWarning ,
3233 stacklevel = 2 ,
3334 )
34-
35+
3536 def __init__ (self , name = "" , wavelength = None ):
3637 self .name = name
3738 self .wavelength = wavelength
@@ -477,25 +478,6 @@ def dump(self, filepath, xtype=None):
477478 np .savetxt (f , data_to_save , delimiter = " " )
478479
479480
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-
499481class DiffractionObject :
500482 def __init__ (self , name = "" , wavelength = None ):
501483 self .name = name
0 commit comments