1234567891011121314151617181920212223242526272829 |
- import argparse
- from code.simulations.lif_simulation import main as run_simulations
- from code.simulations.lif_simulation import command_line_parser as lif_parser
- from code.simulations.lif_surface import command_line_parser as surface_parser
- def create_parser():
- parser = argparse.ArgumentParser(description="Command line tool for running the LIF simulations of the Hladnik & Grewe population coding project. This may take a while! On a single core, this may easily exceed 6 hours ...")
- subparsers = parser.add_subparsers(title="commands",
- help="Sub commands for plotting different tasks",
- description="")
- lif_parser(subparsers)
- surface_parser(subparsers)
- return parser
- def main():
- parser = create_parser()
- args = parser.parse_args()
- if hasattr(args, "func"):
- args.func(args)
- else:
- parser.print_help()
- if __name__ == "__main__":
- main()
|