Skip to content

Commit 79a32e7

Browse files
authored
Merge pull request #123 from yucongalicechen/output-wavelength
remove wavelength from loading metadata
2 parents 666a5eb + ef0f62a commit 79a32e7

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

Diff for: news/output-wavelength.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
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+
* duplicated wavelength information in output files
20+
21+
**Security:**
22+
23+
* <news item>

Diff for: src/diffpy/labpdfproc/tools.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
WAVELENGTHS = {"Mo": 0.71, "Ag": 0.59, "Cu": 1.54}
88
known_sources = [key for key in WAVELENGTHS.keys()]
9-
METADATA_KEYS_TO_EXCLUDE = ["output_correction", "force_overwrite", "input", "input_paths"]
9+
10+
# Exclude wavelength from metadata to prevent duplication,
11+
# as the dump function in diffpy.utils writes it explicitly.
12+
METADATA_KEYS_TO_EXCLUDE = ["output_correction", "force_overwrite", "input", "input_paths", "wavelength"]
1013

1114

1215
def set_output_directory(args):

Diff for: tests/test_tools.py

-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ def test_load_metadata(mocker, user_filesystem):
336336
"mud": 2.5,
337337
"input_directory": str(filepath),
338338
"anode_type": "Mo",
339-
"wavelength": 0.71,
340339
"output_directory": str(Path.cwd().resolve()),
341340
"xtype": "tth",
342341
"method": "polynomial_interpolation",

0 commit comments

Comments
 (0)