Skip to content

Commit

Permalink
Merge pull request #123 from yucongalicechen/output-wavelength
Browse files Browse the repository at this point in the history
remove wavelength from loading metadata
  • Loading branch information
sbillinge authored Nov 1, 2024
2 parents 666a5eb + ef0f62a commit 79a32e7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
23 changes: 23 additions & 0 deletions news/output-wavelength.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* duplicated wavelength information in output files

**Security:**

* <news item>
5 changes: 4 additions & 1 deletion src/diffpy/labpdfproc/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 79a32e7

Please sign in to comment.