improve format
This commit is contained in:
+6
-42
@@ -1,25 +1,19 @@
|
||||
"""Compute power spectra"""
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
from builtins import range
|
||||
import argparse
|
||||
import sys
|
||||
import textwrap
|
||||
from builtins import range
|
||||
|
||||
import numpy as np
|
||||
from numpy.fft import fftn, ifft
|
||||
|
||||
import pymses
|
||||
from pymses.analysis import ScalarOperator, Camera
|
||||
from pymses.analysis import cube3d
|
||||
import pymses.utils.misc
|
||||
|
||||
import tables as T
|
||||
|
||||
from i_utils import args
|
||||
from i_utils import tools
|
||||
from i_utils import args, tools
|
||||
from numpy.fft import fftn, ifft
|
||||
from pymses.analysis import Camera, ScalarOperator, cube3d
|
||||
|
||||
__generator__ = "pspec_new.py"
|
||||
__version__ = "0.2"
|
||||
@@ -434,37 +428,6 @@ parser = argparse.ArgumentParser(
|
||||
"""
|
||||
),
|
||||
)
|
||||
parser.add_argument("repo", help="RAMSES output repository", type=str, default=".")
|
||||
parser.add_argument("iouts", help="output numbers", type=args.selection, default=":")
|
||||
parser.add_argument(
|
||||
"outfile", help="output file format (see below for fields)", type=str
|
||||
)
|
||||
parser.add_argument(
|
||||
"-n",
|
||||
"--nodename",
|
||||
help="node name format (see below for fields)",
|
||||
type=str,
|
||||
default="/out_%(iout)05d/d%(dim)d/%(varname)s",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-O",
|
||||
"--order",
|
||||
help="byte order (= for native)",
|
||||
type=str,
|
||||
default="=",
|
||||
choices=["<", ">", "="],
|
||||
)
|
||||
parser.add_argument(
|
||||
"-c",
|
||||
"--center",
|
||||
help="coordinates of the center",
|
||||
type=args.center,
|
||||
default=[0.5, 0.5, 0.5],
|
||||
)
|
||||
parser.add_argument("-s", "--size", help="cube size", type=float, default=1.0)
|
||||
parser.add_argument(
|
||||
"-l", "--level", help="cube level (default: levelMIN)", type=int, default=0
|
||||
)
|
||||
parser.add_argument(
|
||||
"repo", help="RAMSES output repository", type=str, default=".", nargs="?"
|
||||
)
|
||||
@@ -617,6 +580,7 @@ def main(arg):
|
||||
% (clvl, read_lvl)
|
||||
)
|
||||
clvl = read_lvl
|
||||
|
||||
# Degrade cubes ----------------------------------------------------------------
|
||||
if clvl < read_lvl:
|
||||
print("Degrade cubes")
|
||||
|
||||
Reference in New Issue
Block a user