Skip to content

Commit

Permalink
Merge pull request #153 from yucongalicechen/dump
Browse files Browse the repository at this point in the history
add xtype=d in dump function
  • Loading branch information
sbillinge authored Nov 6, 2024
2 parents 73eb3c2 + 7e25316 commit 19d7cc5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions news/dump.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* functionality in dump to allow writing data on dspace

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
2 changes: 2 additions & 0 deletions src/diffpy/utils/scattering_objects/diffraction_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ def dump(self, filepath, xtype=None):
data_to_save = np.column_stack((self.on_q[0], self.on_q[1]))
elif xtype == "tth":
data_to_save = np.column_stack((self.on_tth[0], self.on_tth[1]))
elif xtype == "d":
data_to_save = np.column_stack((self.on_d[0], self.on_d[1]))
else:
print(f"WARNING: cannot handle the xtype '{xtype}'")
self.metadata.update(get_package_info("diffpy.utils", metadata=self.metadata))
Expand Down

0 comments on commit 19d7cc5

Please sign in to comment.