@@ -65,7 +65,10 @@ class DiffractionObject:
6565 >>> x = np.array([0.12, 0.24, 0.31, 0.4]) # independent variable (e.g., q)
6666 >>> y = np.array([10, 20, 40, 60]) # intensity values
6767 >>> metadata = {
68- ... "package_info": {"version": "3.6.0"}
68+ ... "sample": "rock salt from the beach",
69+ ... "composition": "NaCl",
70+ ... "temperature": "300 K,",
71+ ... "experimenters": "Phill, Sally"
6972 ... }
7073 >>> do = DiffractionObject(
7174 ... xarray=x,
@@ -95,15 +98,13 @@ def __init__(
9598 def _input_data (self , xarray , yarray , xtype , wavelength , scat_quantity , name , metadata ):
9699 if xtype not in XQUANTITIES :
97100 raise ValueError (_xtype_wmsg (xtype ))
98-
99101 # Check xarray and yarray have the same length
100102 if len (xarray ) != len (yarray ):
101103 raise ValueError (
102104 "'xarray' and 'yarray' must have the same length. "
103105 "Please re-initialize 'DiffractionObject' or re-run the method 'input_data' "
104106 "with 'xarray' and 'yarray' of identical length."
105107 )
106-
107108 self .scat_quantity = scat_quantity
108109 self .wavelength = wavelength
109110 self .metadata = metadata
0 commit comments