adapt postprocess
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# coding: utf-8
|
||||
import sys
|
||||
import numpy as np
|
||||
import module_extract as me
|
||||
import extract_disk as d
|
||||
import pymses
|
||||
import os
|
||||
import argparse
|
||||
import disk_postprocess as dp
|
||||
|
||||
|
||||
storage_in = "/drf/projets/alfven-data/"
|
||||
storage_out = "/dsm/anais/storageA/"
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("runs", help="name of runs", nargs="*", default=["015_iso"])
|
||||
parser.add_argument(
|
||||
"-f", "--first_output", help="id of first output", type=int, default=1
|
||||
)
|
||||
parser.add_argument(
|
||||
"-l", "--last_output", help="id of last output", type=int, default=100
|
||||
)
|
||||
parser.add_argument("-s", "--step", help="step between two output", type=int, default=1)
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
user = "nbrucy"
|
||||
folder = "simus"
|
||||
project = "disk"
|
||||
runs = args.runs
|
||||
|
||||
first = args.first_output
|
||||
last = args.last_output
|
||||
step = args.step
|
||||
|
||||
for run in runs:
|
||||
path_suffix = user + "/" + folder + "/" + project + "/" + run
|
||||
path_in = storage_in + path_suffix
|
||||
path_out = storage_out + path_suffix
|
||||
|
||||
if not os.path.exists(path_out):
|
||||
os.makedirs(path_out)
|
||||
|
||||
for i in range(first, last + 1, step):
|
||||
me.make_image_zoom(
|
||||
path_in,
|
||||
i,
|
||||
[0.5],
|
||||
sinks=False,
|
||||
force=False,
|
||||
path_out=path_out,
|
||||
tag=run + "_",
|
||||
cpuamr=False,
|
||||
mag_im=False,
|
||||
AU_units=False,
|
||||
)
|
||||
dp.disk_prop(path_in, i, path_out=path_out, rad_ext=50000)
|
||||
dp.plot_disk_prop(path_out, i, tag=run + "_")
|
||||
Reference in New Issue
Block a user