diff --git a/news/output-wavelength.rst b/news/output-wavelength.rst new file mode 100644 index 0000000..7522d38 --- /dev/null +++ b/news/output-wavelength.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* duplicated wavelength information in output files + +**Security:** + +* diff --git a/src/diffpy/labpdfproc/tools.py b/src/diffpy/labpdfproc/tools.py index a4301ed..f5f31da 100644 --- a/src/diffpy/labpdfproc/tools.py +++ b/src/diffpy/labpdfproc/tools.py @@ -6,7 +6,10 @@ WAVELENGTHS = {"Mo": 0.71, "Ag": 0.59, "Cu": 1.54} known_sources = [key for key in WAVELENGTHS.keys()] -METADATA_KEYS_TO_EXCLUDE = ["output_correction", "force_overwrite", "input", "input_paths"] + +# Exclude wavelength from metadata to prevent duplication, +# as the dump function in diffpy.utils writes it explicitly. +METADATA_KEYS_TO_EXCLUDE = ["output_correction", "force_overwrite", "input", "input_paths", "wavelength"] def set_output_directory(args): diff --git a/tests/test_tools.py b/tests/test_tools.py index 67773e4..afb7bee 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -336,7 +336,6 @@ def test_load_metadata(mocker, user_filesystem): "mud": 2.5, "input_directory": str(filepath), "anode_type": "Mo", - "wavelength": 0.71, "output_directory": str(Path.cwd().resolve()), "xtype": "tth", "method": "polynomial_interpolation",