Skip to content

Commit 19d7cc5

Browse files
authored
Merge pull request #153 from yucongalicechen/dump
add xtype=d in dump function
2 parents 73eb3c2 + 7e25316 commit 19d7cc5

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Diff for: news/dump.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* functionality in dump to allow writing data on dspace
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>

Diff for: src/diffpy/utils/scattering_objects/diffraction_objects.py

+2
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ def dump(self, filepath, xtype=None):
445445
data_to_save = np.column_stack((self.on_q[0], self.on_q[1]))
446446
elif xtype == "tth":
447447
data_to_save = np.column_stack((self.on_tth[0], self.on_tth[1]))
448+
elif xtype == "d":
449+
data_to_save = np.column_stack((self.on_d[0], self.on_d[1]))
448450
else:
449451
print(f"WARNING: cannot handle the xtype '{xtype}'")
450452
self.metadata.update(get_package_info("diffpy.utils", metadata=self.metadata))

0 commit comments

Comments
 (0)