Skip to content

Commit 16b8bbe

Browse files
committed
Add The in front of each parameter description in docstring
1 parent 7c73140 commit 16b8bbe

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

src/diffpy/utils/scattering_objects/diffraction_object.py

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,32 @@
2020
class DiffractionObject:
2121
"""
2222
A class to manipulate diffraction data, supporting basic arithmetic operations and
23-
conversions between different diffraction data metrics such as Q, two-theta, and d-spacing.
23+
conversions between independent variables such as Q, two-theta,
24+
and d-spacing.
2425
2526
Parameters
2627
----------
2728
name : str, optional
28-
Identifier for the diffraction object. Defaults to an empty string.
29+
The name or identifier for the diffraction experiment.
2930
wavelength : float, optional
30-
Wavelength of the radiation used in the diffraction experiment. Defaults to None.
31+
The wavelength of the radiation used in the diffraction experiment. Defaults to None.
3132
3233
Attributes
3334
----------
3435
name : str
35-
Name or identifier for the diffraction experiment.
36+
The name or identifier for the diffraction experiment.
3637
wavelength : float
37-
Wavelength of the incoming x-rays.
38+
The wavelength of the incoming x-rays.
3839
scat_quantity : str
39-
Description of the type of scattering data stored.
40+
The description of the type of scattering data stored.
4041
on_q : list of numpy.ndarray
41-
A list containing two numpy arrays: [Q values, Intensities].
42+
The list containing two numpy arrays: [Q values, Intensities].
4243
on_tth : list of numpy.ndarray
43-
A list containing two numpy arrays: [two-theta angles, Intensities].
44+
The list containing two numpy arrays: [two-theta angles, Intensities].
4445
on_d : list of numpy.ndarray
45-
A list containing two numpy arrays: [d-spacing values, Intensities].
46+
The list containing two numpy arrays: [d-spacing values, Intensities].
4647
metadata : dict
47-
Dictionary containing additional metadata about the diffraction data.
48+
The dictionary containing additional metadata about the diffraction data.
4849
"""
4950

5051
def __init__(self, name="", wavelength=None):
@@ -284,13 +285,13 @@ def insert_scattering_quantity(
284285
Parameters
285286
----------
286287
xarray array-like of floats
287-
the independent variable array
288+
The independent variable array
288289
yarray array-like of floats
289-
the dependent variable array
290+
The dependent variable array
290291
xtype string
291-
the type of quantity for the independent variable from {*XQUANTITIES, }
292+
The type of quantity for the independent variable from {*XQUANTITIES, }
292293
metadata: dict
293-
the metadata in the form of a dictionary of user-supplied key:value pairs
294+
The metadata in the form of a dictionary of user-supplied key:value pairs
294295
295296
Returns
296297
-------
@@ -334,10 +335,10 @@ def q_to_tth(self):
334335
Parameters
335336
----------
336337
q : array
337-
An array of :math:`q` values
338+
The array of :math:`q` values
338339
339340
wavelength : float
340-
Wavelength of the incoming x-rays
341+
The Wavelength of the incoming x-rays
341342
342343
Function adapted from scikit-beam. Thanks to those developers
343344
@@ -373,17 +374,17 @@ def tth_to_q(self):
373374
Parameters
374375
----------
375376
two_theta : array
376-
An array of :math:`2\theta` values in units of degrees
377+
The array of :math:`2\theta` values in units of degrees
377378
378379
wavelength : float
379-
Wavelength of the incoming x-rays
380+
The wavelength of the incoming x-rays
380381
381382
Function adapted from scikit-beam. Thanks to those developers.
382383
383384
Returns
384385
-------
385386
q : array
386-
An array of :math:`q` values in the inverse of the units
387+
The array of :math:`q` values in the inverse of the units
387388
of ``wavelength``
388389
"""
389390
two_theta = np.asarray(np.deg2rad(self.on_tth[0]))
@@ -419,11 +420,11 @@ def scale_to(self, target_diff_object, xtype=None, xvalue=None):
419420
Parameters
420421
----------
421422
target_diff_object: DiffractionObject
422-
the diffractoin object you want to scale the current one on to
423+
The diffractoin object you want to scale the current one on to
423424
xtype: string, optional. Default is Q
424-
the xtype, from {XQUANTITIES}, that you will specify a point from to scale to
425+
The xtype, from {XQUANTITIES}, that you will specify a point from to scale to
425426
xvalue: float. Default is the midpoint of the array
426-
the y-value in the target at this x-value will be used as the factor to scale to.
427+
The y-value in the target at this x-value will be used as the factor to scale to.
427428
The entire array is scaled be the factor that places on on top of the other at that point.
428429
xvalue does not have to be in the x-array, the point closest to this point will be used for the scaling.
429430

0 commit comments

Comments
 (0)