Commit d148b7fa authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Update help and inline documentation

parent c99afe2b
Loading
Loading
Loading
Loading
+17 −17
Original line number Diff line number Diff line
@@ -67,11 +67,11 @@ def main():
                    print(ex)
                    errors += 1
            elif (config['mode'] == 'geom'):
                #try:
                try:
                    errors += scale_legacy_geom(config)
                #except Exception as ex:
                #    print(ex)
                #    errors += 1
                except Exception as ex:
                    print(ex)
                    errors += 1
            else:
                print("ERROR: unknown mode \"%s\" (options are edfb|geom)"%(config['mode']))
                errors += 1
@@ -82,8 +82,8 @@ def main():
#  The script behaviour can be modified through a set of mandatory and optional
#  arguments. Mandatory arguments are those required to execute a meaningful
#  parsing and they are limited to the names of the files that need to be read
#  and written. The other arguments affect the format and the data fields that
#  are sought for.
#  and the operational mode ("edfb" for scattering model file, "geom" for
#  geometry model file).
#
#  \returns config: `dict` A dictionary containing the script configuration.
def parse_arguments():
@@ -259,12 +259,12 @@ def print_help():
    print("                                                  ")
    print("Scale model input files by multiplicative factor. ")
    print("                                                                           ")
    print("Usage: \"./scale_model.py --in INPUT --out OUTPUT [OPTIONS]\"")
    print("Usage: \"./scale_model.py --in INPUT --mode=MODE [--out OUTPUT] [OPTIONS]\"")
    print("                                                                           ")
    print("Valid options are:                                                         ")
    print("--in INPUT               Original model to be scaled (mandatory).          ")
    print("--out OUTPUT             Name for the rescaled model (optional).           ")
    print("--mode=[edfb|geom]       Type of input file to be processed (mandatory)")
    print("--mode=[edfb|geom]       Type of input to be processed (mandatory).        ")
    print("--scale=SCALE            Scale to be applied (optional, default is 1).     ")
    print("--help                   Print this help and exit.                         ")
    print("                                                                           ")