black without mortimer

This commit is contained in:
Noe Brucy
2022-11-28 18:01:18 +01:00
parent 7548ef7e0a
commit fa396178c6
14 changed files with 371 additions and 304 deletions
+3 -13
View File
@@ -13,7 +13,6 @@ import pymses.utils.misc
import tables as T
from numpy.fft import fftn, ifft
from pymses.analysis import Camera, ScalarOperator, cube3d
import os
__generator__ = "pspec.py"
__version__ = "0.2"
@@ -62,8 +61,6 @@ def degrade_cube(cube, lvl, integrate=False):
return cube_new
def calc_k(n, nbinsk, nbig, dkbig, dim=3, saxis=2):
"""Make cubes containing the wave vectors, a list of bins and the
associated normalization factors
@@ -433,9 +430,7 @@ parser = argparse.ArgumentParser(
parser.add_argument(
"repo", help="RAMSES output repository", type=str, default=".", nargs="?"
)
parser.add_argument(
"iouts", help="output numbers", type=int, default=[1], nargs="+"
)
parser.add_argument("iouts", help="output numbers", type=int, default=[1], nargs="+")
parser.add_argument(
"outfile",
help="output file format (see below for fields)",
@@ -525,12 +520,7 @@ def main(arg):
read_lvl = None
if True:
# Load output ------------------------------------------------------------------
# If ratarmount was used
if os.path.exists(f"{self.path}/output_{self.num:05}/output_{self.num:05}"):
path = f"{arg.repo}/output_{self.num:05}"
else:
path = arg.repo
ro = pymses.RamsesOutput(path, iout, order=arg.order)
ro = pymses.RamsesOutput(arg.repo, iout, order=arg.order)
if arg.magnetic:
amr = ro.amr_source(["rho", "vel", "Bl", "Br"])
else:
@@ -576,7 +566,7 @@ def main(arg):
]
cam = Camera(
center=[0.5, 0.5, 0.5], #arg.center,
center=[0.5, 0.5, 0.5], # arg.center,
line_of_sight_axis="z",
region_size=[arg.size, arg.size],
distance=arg.size / 2.0,