[python调试笔记]set plot is

[python调试笔记]set plot is,第1张

[python调试笔记]set plot is
import datetime
import h5py
import numpy as np
from scipy import signal
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from matplotlib.colors import Normalize

from sys import exit
import argparse
import os

#*********Turn off devide zero error in numpy**********#
np.seterr(divide = 'ignore')

#*********parser for get filename and select plot**********#
parser = argparse.ArgumentParser(description='Data plotter for KEMPO1')
#---关键语句---#
parser.add_argument('filename', nargs='*', help='file names of data  parabolic_051.h5')
#---关键语句---#
parser.add_argument('-p', '--power', action='store_true', help="plot the temporal and spatial profile of Bw")
parser.add_argument('-d', '--dynamic-spectrum', action='store_true', help='plot dynamic spectrum at x=20, 60')
parser.add_argument('-v', '--velocity-dist', action='store_true', help='plot velocity distribution at x=20')
parser.add_argument('-r', '--resonant-current', action='store_true', help='plot -je, jb and jb/Bw')
args = parser.parse_args()

if not args.filename:
    exit("Error: Filename is missing. Please specify data file.n  python plot_data.py parabolic_05.h5")

"""
Set plot 
"""
is_power = args.power
is_dynamic = args.dynamic_spectrum
is_vdist = args.velocity_dist
is_res = args.resonant_current

print(is_power)
print(is_dynamic)
print(is_vdist)
print(is_res)
print(datetime.datetime.now())

 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5480707.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-12
下一篇 2022-12-12

发表评论

登录后才能评论

评论列表(0条)

保存