栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

[python调试笔记]set plot is

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

[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())

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/488578.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号