plot_figures.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import argparse
  2. from code.plots.data_analyses import command_line_parser as analysis_parser
  3. from code.plots.property_correlations import command_line_parser as correlations_parser
  4. from code.plots.population_coding import command_line_parser as popcoding_parser
  5. from code.plots.delay_filtering import command_line_parser as delayfilter_parser
  6. from code.plots.lif_results import command_line_parser as lif_parser
  7. from code.plots.info_surface import command_line_parser as infosurface_parser
  8. from code.plots.supp_figure4 import command_line_parser as supfig4_parser
  9. from code.plots.supp_figure5 import command_line_parser as supfig5_parser
  10. from code.plots.intro_figure import command_line_parser as introfig_parser
  11. from code.plots.populations_method import command_line_parser as popmethods_parser
  12. from code.plots.intro_figure2 import command_line_parser as introfig2_parser
  13. def create_parser():
  14. parser = argparse.ArgumentParser(description="Tool for plotting figures of the Hladnik & Grewe population coding project.")
  15. subparsers = parser.add_subparsers(title="commands",
  16. help="Sub commands for plotting different figures",
  17. description="")
  18. introfig_parser(subparsers)
  19. introfig2_parser(subparsers)
  20. analysis_parser(subparsers)
  21. correlations_parser(subparsers)
  22. popcoding_parser(subparsers)
  23. delayfilter_parser(subparsers)
  24. lif_parser(subparsers)
  25. infosurface_parser(subparsers)
  26. supfig4_parser(subparsers)
  27. supfig5_parser(subparsers)
  28. popmethods_parser(subparsers)
  29. return parser
  30. def main():
  31. parser = create_parser()
  32. args = parser.parse_args()
  33. if hasattr(args, "func"):
  34. args.func(args)
  35. else:
  36. parser.print_help()
  37. if __name__ == "__main__":
  38. main()