changed all __main__ scripts to console_main() functions to be used as entry points
This commit is contained in:
parent
f487691e03
commit
00124bbdcc
8 changed files with 45 additions and 18 deletions
|
@ -263,7 +263,9 @@ def get_ylims_and_yticks(ylims):
|
|||
return ylims, yticks
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
||||
def console_main():
|
||||
from argparse import ArgumentParser
|
||||
parser = ArgumentParser(description='Plot power spectra of fields')
|
||||
|
||||
|
@ -403,5 +405,8 @@ if __name__ == "__main__":
|
|||
fig.savefig(args.output)
|
||||
else:
|
||||
fig.savefig(args.directory+'power_spectrum.png')
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
console_main()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue