@@ -418,12 +418,33 @@ def _get_original_array(self):
418418 return self .on_d (), "d"
419419
420420 def on_q (self ):
421+ """Return the tuple of two 1D numpy arrays containing q and y data.
422+
423+ Returns
424+ -------
425+ (xarray, yarray) : tuple of ndarray
426+ The tuple containing two 1D numpy arrays with q and y data
427+ """
421428 return [self .all_arrays [:, 1 ], self .all_arrays [:, 0 ]]
422429
423430 def on_tth (self ):
431+ """Return the tuple of two 1D numpy arrays containing tth and y data.
432+
433+ Returns
434+ -------
435+ (xarray, yarray) : tuple of ndarray
436+ The tuple containing two 1D numpy arrays with tth and y data
437+ """
424438 return [self .all_arrays [:, 2 ], self .all_arrays [:, 0 ]]
425439
426440 def on_d (self ):
441+ """Return the tuple of two 1D numpy arrays containing d and y data.
442+
443+ Returns
444+ -------
445+ (xarray, yarray) : tuple of ndarray
446+ The tuple containing two 1D numpy arrays with d and y data
447+ """
427448 return [self .all_arrays [:, 3 ], self .all_arrays [:, 0 ]]
428449
429450 def scale_to (self , target_diff_object , q = None , tth = None , d = None , offset = None ):
@@ -507,6 +528,16 @@ def on_xtype(self, xtype):
507528 raise ValueError (_xtype_wmsg (xtype ))
508529
509530 def dump (self , filepath , xtype = None ):
531+ """Dump the xarray and yarray of the diffraction object to a two-column
532+ file, with the associated information included in the header.
533+
534+ Parameters
535+ ----------
536+ filepath : str
537+ The filepath where the diffraction object will be dumped
538+ xtype : str, optional, default is q
539+ The type of quantity for the independent variable chosen from {*XQUANTITIES, }
540+ """
510541 if xtype is None :
511542 xtype = "q"
512543 if xtype in QQUANTITIES :
0 commit comments