2
2
import argparse
3
3
from pathlib import Path
4
4
5
+ ALLOWED_DATA_TYPES = ['powder_diffraction' , 'pd' , 'pair_distribution_function' , 'pdf' ]
6
+
5
7
6
8
def create_parser ():
7
9
parser = argparse .ArgumentParser (
@@ -12,15 +14,16 @@ def create_parser():
12
14
help = "Directory containing experimental data. Defaults to current working directory." )
13
15
parser .add_argument ('-o' , '--output-directory' , type = str ,
14
16
help = "The directory where the results will be written. Defaults to '<input_directory/snmf_results>'." )
15
- parser .add_argument ('t' , '--data-type' , type = str , choices = [ 'powder_diffraction' , 'pdf' ] ,
17
+ parser .add_argument ('t' , '--data-type' , type = str , choices = ALLOWED_DATA_TYPES ,
16
18
help = "The type of the experimental data." )
17
- parser .add_argument ('-l' , '--lift' , type = float , default = 1 ,
19
+ parser .add_argument ('-l' , '--lift-factor ' , type = float , default = 1 ,
18
20
help = "The lifting factor. Data will be lifted by lifted_data = data + abs(min(data) * lift). Default is 1." )
19
- parser .add_argument ('components' , type = int ,
20
- help = "he number of component signals for the NMF decomposition. Must be an integer greater than 0" )
21
+ parser .add_argument ('number-of- components' , type = int ,
22
+ help = "The number of component signals for the NMF decomposition. Must be an integer greater than 0" )
21
23
parser .add_argument ('-v' , '--version' , action = 'version' , help = 'Print the software version number' )
22
24
args = parser .parse_args ()
23
25
return args
24
26
27
+
25
28
def main ():
26
29
pass
0 commit comments