Ensure blank scenes list created even from CLI

这个提交包含在:
Craig Warren
2023-09-01 14:49:01 +01:00
父节点 b5fe96ae21
当前提交 8dbb673d67

查看文件

@@ -25,7 +25,7 @@ from .utilities.logging import logging_config
# Arguments (used for API) and their default values (used for API and CLI) # Arguments (used for API) and their default values (used for API and CLI)
args_defaults = { args_defaults = {
"scenes": None, "scenes": [],
"inputfile": None, "inputfile": None,
"outputfile": None, "outputfile": None,
"n": 1, "n": 1,
@@ -44,37 +44,39 @@ args_defaults = {
# Argument help messages (used for CLI argparse) # Argument help messages (used for CLI argparse)
help_msg = { help_msg = {
"scenes": "(list, req): Scenes to run the model. " "scenes": "(list, req): Scenes to run the model. Multiple scene objects "
"Multiple scene objects can given in order to run multiple " "can given in order to run multiple simulation runs. Each scene "
"simulation runs. Each scene must contain the essential " "must contain the essential simulation objects",
"simulation objects", "inputfile": "(str, opt): Input file path. Can also run simulation by "
"inputfile": "(str, opt): Input file path. Can also run simulation " "by providing an input file.", "providing an input file.",
"outputfile": "(str, req): File path to the output data file.", "outputfile": "(str, req): File path to the output data file.",
"n": "(int, req): Number of required simulation runs.", "n": "(int, req): Number of required simulation runs.",
"i": "(int, opt): Model number to start/restart simulation " "i": "(int, opt): Model number to start/restart simulation from. It would "
"from. It would typically be used to restart a series of " "typically be used to restart a series of models from a specific "
"models from a specific model number, with the n argument, " "model number, with the n argument, e.g. to restart from A-scan 45 "
"e.g. to restart from A-scan 45 when creating a B-scan " "when creating a B-scan with 60 traces.",
"with 60 traces.", "mpi": "(bool, opt): Flag to use Message Passing Interface (MPI) task farm. "
"mpi": "(bool, opt): Flag to use Message Passing Interface (MPI) " "This option is most usefully combined with n to allow individual "
"task farm. This option is most usefully combined with n to " "models to be farmed out using a MPI task farm, e.g. to create a "
"allow individual models to be farmed out using a MPI task " "B-scan with 60 traces and use MPI to farm out each trace. For "
"farm, e.g. to create a B-scan with 60 traces and use MPI to " "further details see the performance section of the User Guide.",
"farm out each trace. For further details see the parallel " "gpu": "(list/bool, opt): Flag to use NVIDIA GPU or list of NVIDIA GPU "
"performance section of the User Guide.", "device ID(s) for specific GPU card(s).",
"gpu": "(list/bool, opt): Flag to use NVIDIA GPU or list of NVIDIA " "GPU device ID(s) for specific GPU card(s).", "opencl": "(list/bool, opt): Flag to use OpenCL or list of OpenCL device "
"opencl": "(list/bool, opt): Flag to use OpenCL or list of OpenCL " "device ID(s) for specific compute device(s).", "ID(s) for specific compute device(s).",
"subgrid": "(bool, opt): Flag to use sub-gridding.", "subgrid": "(bool, opt): Flag to use sub-gridding.",
"autotranslate": "(bool, opt): For sub-gridding - auto translate " "autotranslate": "(bool, opt): For sub-gridding - auto translate objects "
"objects with main grid coordinates to their " "with main grid coordinates to their equivalent local "
"equivalent local grid coordinate within the " "grid coordinate within the subgrid. If this option is "
"subgrid. If this option is off users must specify " "off users must specify sub-grid object point within the "
"sub-grid object point within the global subgrid space.", "global subgrid space.",
"geometry_only": "(bool, opt): Build a model and produce any " "geometry views but do not run the simulation.", "geometry_only": "(bool, opt): Build a model and produce any geometry "
"geometry_fixed": "(bool, opt): Run a series of models where the " "geometry does not change between models.", "views but do not run the simulation.",
"write_processed": "(bool, opt): Writes another input file after " "geometry_fixed": "(bool, opt): Run a series of models where the geometry "
"any Python code (#python blocks) and in the " "does not change between models.",
"original input file has been processed.", "write_processed": "(bool, opt): Writes another input file after any "
"Python code (#python blocks) and in the original input "
"file has been processed.",
"log_level": "(int, opt): Level of logging to use.", "log_level": "(int, opt): Level of logging to use.",
"log_file": "(bool, opt): Write logging information to file.", "log_file": "(bool, opt): Write logging information to file.",
} }