-
Notifications
You must be signed in to change notification settings - Fork 1
/
analyse
executable file
·43 lines (35 loc) · 1.93 KB
/
analyse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/python
import argparse
from src.main import *
import src.infile as infile
################################################################################
if __name__ == '__main__':
pd.set_option('display.width', None)
# TODO: replace that by with statement
try:
##################################################################################
# Argument parsing ###############################################################
parser = argparse.ArgumentParser()
# parse the name of the infile and load its contents into the parser
parser.add_argument("infile", help="name of input file")
# verbosity is also parsed
parser.add_argument("-v", "--verbose", action="count", default=0, \
help="increase output verbosity")
parser.add_argument("--use-imim", action="store_true", \
help="Assume that of 2pt function contains physically relevant information")
# TODO: Only allow certain options, specify standard behavior, etc.
parser.add_argument("-b", "--basis", choices=['cartesian', 'cyclic', \
'cyclic-christian', 'dudek', 'marcus-cov', 'marcus-con', 'test'], \
default='marcus-con',
help="continuum basis to be used in the program")
parser.add_argument('-p', '--momentum', type=int, nargs='+')
parser.add_argument('-d', '--diagram', nargs='+')
args = parser.parse_args()
verbose = args.verbose
use_imim = args.use_imim
continuum_basis_string = args.basis
list_of_pcm_sq = args.momentum
list_of_diagrams = args.diagram
main(continuum_basis_string=continuum_basis_string, use_imim=use_imim, verbose=verbose, **infile.read(args.infile, list_of_pcm_sq, list_of_diagrams, verbose))
except KeyboardInterrupt:
pass