Skip to content

Commit 11a15ee

Browse files
add docstring and news
1 parent 1f9f142 commit 11a15ee

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

news/xtype.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* functionality to return the 2D array based on the specified xtype
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

src/diffpy/utils/diffraction_objects.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,17 @@ def scale_to(self, target_diff_object, xtype=None, xvalue=None):
376376
return scaled
377377

378378
def on_xtype(self, xtype):
379-
"""
379+
f"""
380380
return a 2D np array with x in the first column and y in the second for x of type type
381381
382382
Parameters
383383
----------
384-
xtype
384+
xtype str
385+
the type of quantity for the independent variable from {*XQUANTITIES, }
385386
386387
Returns
387388
-------
388-
389+
a 2D np array with x and y data
389390
"""
390391
if xtype.lower() in ANGLEQUANTITIES:
391392
return self.on_tth()

0 commit comments

Comments
 (0)