Update arguments for animate + black reformat
This commit is contained in:
parent
d8ef2cddfd
commit
d681acb703
4 changed files with 29 additions and 23 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import argparse
|
||||
import configparser
|
||||
import gzip
|
||||
import logging
|
||||
import multiprocessing as mp
|
||||
|
|
@ -16,16 +15,20 @@ from .olaflow import OFModel
|
|||
|
||||
parser = argparse.ArgumentParser(description="Post-process olaflow results")
|
||||
parser.add_argument("-v", "--verbose", action="count", default=0)
|
||||
parser.add_argument("-c", "--config", default="config.ini")
|
||||
parser.add_argument(
|
||||
"-o",
|
||||
"--output",
|
||||
type=pathlib.Path,
|
||||
help="Output directory for pickled data",
|
||||
required=True,
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
logging.basicConfig(level=max((10, 20 - 10 * args.verbose)))
|
||||
log = logging.getLogger("ola_post")
|
||||
|
||||
log.info("Animating olaFlow output")
|
||||
config = configparser.ConfigParser()
|
||||
config.read(args.config)
|
||||
out = pathlib.Path(config.get("post", "out"))
|
||||
out = args.output
|
||||
out.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
with (
|
||||
|
|
@ -35,9 +38,6 @@ with (
|
|||
) as f:
|
||||
model = pickle.load(f)
|
||||
|
||||
x0 = config.getfloat("post", "x")
|
||||
z0 = config.getfloat("post", "z")
|
||||
|
||||
flt = np.where((model.x >= -60) & (model.x <= -20) & (model.z >= 0) & (model.z <= 10))[
|
||||
0
|
||||
]
|
||||
|
|
|
|||
Reference in a new issue