11
11
def get_args ():
12
12
p = ArgumentParser ()
13
13
p .add_argument ("mud" , help = "Value of mu*D for your " "sample. Required." , type = float )
14
- p .add_argument ("-i" , "--input-file" , help = "The filename of the " "datafile to load" )
14
+ p .add_argument ("-i" , "--input-file" , help = "The filename of the " "datafile to load. " )
15
15
p .add_argument (
16
16
"-a" ,
17
17
"--anode-type" ,
18
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 ",
19
+ f"{* [known_sources ], }. Either specify a known x - ray source or specify wavelength . ",
20
20
default = "Mo" ,
21
21
)
22
22
p .add_argument (
23
23
"-w" ,
24
24
"--wavelength" ,
25
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" ,
26
+ "is specified. This wavelength will override the anode wavelength if both are specified. " ,
27
27
default = None ,
28
28
type = float ,
29
29
)
30
30
p .add_argument (
31
31
"-o" ,
32
32
"--output-directory" ,
33
- help = "the name of the output directory. If not specified "
33
+ help = "The name of the output directory. If not specified "
34
34
"then corrected files will be written to the current directory."
35
35
"If the specified directory doesn't exist it will be created." ,
36
36
default = None ,
37
37
)
38
38
p .add_argument (
39
39
"-x" ,
40
40
"--xtype" ,
41
- help = f"the quantity on the independent variable axis. allowed "
41
+ help = f"The quantity on the independent variable axis. Allowed "
42
42
f"values: { * XQUANTITIES , } . If not specified then two-theta "
43
43
f"is assumed for the independent variable. Only implemented for "
44
- f"tth currently" ,
44
+ f"tth currently. " ,
45
45
default = "tth" ,
46
46
)
47
47
p .add_argument (
48
48
"-c" ,
49
49
"--output-correction" ,
50
50
action = "store_true" ,
51
- help = "the absorption correction will be output to a file if this "
52
- "flag is set. Default is that it is not output" ,
51
+ help = "The absorption correction will be output to a file if this "
52
+ "flag is set. Default is that it is not output. " ,
53
53
default = "tth" ,
54
54
)
55
55
p .add_argument (
56
56
"-f" ,
57
57
"--force-overwrite" ,
58
58
action = "store_true" ,
59
- help = "outputs will not overwrite existing file unless --force is specified" ,
59
+ help = "Outputs will not overwrite existing file unless --force is specified. " ,
60
60
)
61
61
args = p .parse_args ()
62
62
return args
@@ -75,13 +75,13 @@ def main():
75
75
76
76
if outfile .exists () and not args .force_overwrite :
77
77
sys .exit (
78
- f"output file { str (outfile )} already exists. Please rerun "
79
- f"specifying -f if you want to overwrite it"
78
+ f"Output file { str (outfile )} already exists. Please rerun "
79
+ f"specifying -f if you want to overwrite it. "
80
80
)
81
81
if corrfile .exists () and args .output_correction and not args .force_overwrite :
82
82
sys .exit (
83
- f"corrections file { str (corrfile )} was requested and already "
84
- f"exists. Please rerun specifying -f if you want to overwrite it"
83
+ f"Corrections file { str (corrfile )} was requested and already "
84
+ f"exists. Please rerun specifying -f if you want to overwrite it. "
85
85
)
86
86
87
87
input_pattern = Diffraction_object (wavelength = args .wavelength )
0 commit comments