12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import argparse
- from code.plots.data_analyses import command_line_parser as analysis_parser
- from code.plots.property_correlations import command_line_parser as correlations_parser
- from code.plots.population_coding import command_line_parser as popcoding_parser
- from code.plots.delay_filtering import command_line_parser as delayfilter_parser
- from code.plots.lif_results import command_line_parser as lif_parser
- from code.plots.info_surface import command_line_parser as infosurface_parser
- from code.plots.supp_figure4 import command_line_parser as supfig4_parser
- from code.plots.supp_figure5 import command_line_parser as supfig5_parser
- from code.plots.intro_figure import command_line_parser as introfig_parser
- from code.plots.populations_method import command_line_parser as popmethods_parser
- from code.plots.intro_figure2 import command_line_parser as introfig2_parser
- def create_parser():
- parser = argparse.ArgumentParser(description="Tool for plotting figures of the Hladnik & Grewe population coding project.")
- subparsers = parser.add_subparsers(title="commands",
- help="Sub commands for plotting different figures",
- description="")
- introfig_parser(subparsers)
- introfig2_parser(subparsers)
- analysis_parser(subparsers)
- correlations_parser(subparsers)
- popcoding_parser(subparsers)
- delayfilter_parser(subparsers)
- lif_parser(subparsers)
- infosurface_parser(subparsers)
- supfig4_parser(subparsers)
- supfig5_parser(subparsers)
- popmethods_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()
|