run_simulation.py 976 B

1234567891011121314151617181920212223242526272829
  1. import argparse
  2. from code.simulations.lif_simulation import main as run_simulations
  3. from code.simulations.lif_simulation import command_line_parser as lif_parser
  4. from code.simulations.lif_surface import command_line_parser as surface_parser
  5. def create_parser():
  6. 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 ...")
  7. subparsers = parser.add_subparsers(title="commands",
  8. help="Sub commands for plotting different tasks",
  9. description="")
  10. lif_parser(subparsers)
  11. surface_parser(subparsers)
  12. return parser
  13. def main():
  14. parser = create_parser()
  15. args = parser.parse_args()
  16. if hasattr(args, "func"):
  17. args.func(args)
  18. else:
  19. parser.print_help()
  20. if __name__ == "__main__":
  21. main()