22import argparse
33from pathlib import Path
44
5+ ALLOWED_DATA_TYPES = ['powder_diffraction' , 'pd' , 'pair_distribution_function' , 'pdf' ]
6+
57
68def create_parser ():
79 parser = argparse .ArgumentParser (
@@ -12,15 +14,16 @@ def create_parser():
1214 help = "Directory containing experimental data. Defaults to current working directory." )
1315 parser .add_argument ('-o' , '--output-directory' , type = str ,
1416 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 ,
1618 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 ,
1820 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" )
2123 parser .add_argument ('-v' , '--version' , action = 'version' , help = 'Print the software version number' )
2224 args = parser .parse_args ()
2325 return args
2426
27+
2528def main ():
2629 pass
0 commit comments