Commit 3a8a56b1 authored by Mijian Xu's avatar Mijian Xu 😷

update rasing error

parent 375d84c7
Pipeline #1158 passed with stage
in 54 seconds
......@@ -201,9 +201,19 @@ Syntax: plot [data|result]
Specify 'data' or 'result' to draw map view of the raw data or the result (default)
'''
if arg.lower() == 'data':
self.mg.pltmap(self.mg.data_expand[self.mg.row_begin: self.mg.row_end + 1, self.mg.col_begin: self.mg.col_end + 1])
try:
self.mg
except:
print('Error: please read data first')
return
else:
self.mg.pltmap(self.mg.data)
elif arg.lower() == 'result' or arg == '':
self.mg.pltmap(self.result)
if self.result is not None:
self.mg.pltmap(self.result)
else:
print('Error: No result in the memory')
return
else:
print('Error: argument should be in \'data\' and \'result\'')
......@@ -222,14 +232,14 @@ Syntax: powspec [w1, w2]
try:
w1, w2 = [float(w) for w in arg.split()]
except:
print('arguments should be in float type')
print('Error: arguments should be in float type')
return
if w1 >= w2:
print('w1 should be less than w2')
print('Error: w1 should be less than w2')
self.mg.power_fit(w1, w2)
self.mg.plotpower()
else:
print('Only two arguments can be accepted')
print('Error: only two arguments can be accepted')
def completedefault(self, *args):
readline.set_completer_delims(' \t\n;')
......
......@@ -5,7 +5,7 @@ packages = find_packages()
with open("README.md", "r") as fh:
long_description = fh.read()
VERSION = "0.1.16"
VERSION = "0.1.17"
setup(name='mgpro',
version=VERSION,
author='Mijian Xu',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment