|
3 | 3 | from pathlib import Path
|
4 | 4 |
|
5 | 5 | from diffpy.labpdfproc.functions import apply_corr, compute_cve
|
6 |
| -from diffpy.labpdfproc.tools import set_wavelength |
| 6 | +from diffpy.labpdfproc.tools import known_sources, set_wavelength |
7 | 7 | from diffpy.utils.parsers.loaddata import loadData
|
8 | 8 | from diffpy.utils.scattering_objects.diffraction_objects import XQUANTITIES, Diffraction_object
|
9 | 9 |
|
10 |
| -WAVELENGTHS = {"Mo": 0.71, "Ag": 0.59, "Cu": 1.54} |
11 |
| -known_sources = [key for key in WAVELENGTHS.keys()] |
12 |
| - |
13 | 10 |
|
14 | 11 | def get_args():
|
15 | 12 | p = ArgumentParser()
|
16 | 13 | p.add_argument("mud", help="Value of mu*D for your " "sample. Required.", type=float)
|
17 | 14 | p.add_argument("-i", "--input-file", help="The filename of the " "datafile to load")
|
18 | 15 | p.add_argument(
|
19 |
| - "-a", "--anode-type", help=f"X-ray source, allowed " f"values: {*[known_sources], }", default="Mo" |
| 16 | + "-a", |
| 17 | + "--anode-type", |
| 18 | + help=f"The type of the x-ray source. Allowed values are " |
| 19 | + f"{*[known_sources], }. Either specify a known x-ray source or specify wavelength", |
| 20 | + default="Mo", |
20 | 21 | )
|
21 | 22 | p.add_argument(
|
22 | 23 | "-w",
|
23 | 24 | "--wavelength",
|
24 |
| - help="X-ray source wavelength. Not needed if the anode-type " |
25 |
| - "is specified. This will override the wavelength if anode " |
26 |
| - "type is specified", |
| 25 | + help="X-ray source wavelength in angstroms. Not needed if the anode-type " |
| 26 | + "is specified. This wavelength will override the anode wavelength if both are specified", |
27 | 27 | default=None,
|
28 | 28 | type=float,
|
29 | 29 | )
|
@@ -55,7 +55,7 @@ def get_args():
|
55 | 55 | "-f",
|
56 | 56 | "--force-overwrite",
|
57 | 57 | action="store_true",
|
58 |
| - help="outputs will not overwrite existing file unless --force is spacified", |
| 58 | + help="outputs will not overwrite existing files unless --force is spacified", |
59 | 59 | )
|
60 | 60 | args = p.parse_args()
|
61 | 61 | return args
|
|
0 commit comments