@@ -49,7 +49,33 @@ def __init__(
4949 self ._id = uuid .uuid4 ()
5050 self .input_data (xarray , yarray , xtype , wavelength , scat_quantity , name , metadata )
5151
52- def input_data (self , xarray , yarray , xtype , wavelength , scat_quantity , name , metadata ):
52+ def input_data (self , xarray , yarray , xtype , wavelength , scat_quantity = None , name = "" , metadata = {}):
53+ """
54+ Insert a new scattering quantity into the scattering object.
55+
56+ Parameters
57+ ----------
58+ xarray : array-like
59+ The independent variable array (e.g., q, tth, or d).
60+ yarray : array-like
61+ The dependent variable array corresponding to intensity values
62+ xtype : str
63+ The type of the independent variable in `xarray`. Must be one of {*XQUANTITIES},
64+ such as "q", "tth", or "d".
65+ wavelength : float
66+ The wavelength of the incoming beam, specified in angstroms (Å).
67+ scat_quantity : str, optional
68+ The type of scattering experiment (e.g., "x-ray", "neutron"). Default is "".
69+ name : str, optional
70+ The name or label for the scattering data. Default is an empty string "".
71+ metadata : dict, optional
72+ The additional metadata associated with the diffraction object. Default is {}.
73+
74+ Returns
75+ -------
76+ None
77+ This method updates the object in place and does not return a value.
78+ """
5379
5480 # Check xtype is valid. An empty string is the default value.
5581 if xtype not in XQUANTITIES :
0 commit comments