From 611d219f3402c0b0b26c51fca0a6b91bd32d6018 Mon Sep 17 00:00:00 2001 From: yucongalicechen Date: Mon, 4 Nov 2024 18:15:01 -0500 Subject: [PATCH 1/2] add xtype=d in dump function --- src/diffpy/utils/scattering_objects/diffraction_objects.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/diffpy/utils/scattering_objects/diffraction_objects.py b/src/diffpy/utils/scattering_objects/diffraction_objects.py index bd5b16db..94d2831a 100644 --- a/src/diffpy/utils/scattering_objects/diffraction_objects.py +++ b/src/diffpy/utils/scattering_objects/diffraction_objects.py @@ -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)) From 7e25316974d3426339b7520ddd8ed45c575d5f5b Mon Sep 17 00:00:00 2001 From: yucongalicechen Date: Wed, 6 Nov 2024 17:56:41 -0500 Subject: [PATCH 2/2] add news --- news/dump.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/dump.rst diff --git a/news/dump.rst b/news/dump.rst new file mode 100644 index 00000000..7f99d586 --- /dev/null +++ b/news/dump.rst @@ -0,0 +1,23 @@ +**Added:** + +* functionality in dump to allow writing data on dspace + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +*