diff --git a/losoto/operations/structure.py b/losoto/operations/structure.py index 05f00c4..f7bf4ed 100644 --- a/losoto/operations/structure.py +++ b/losoto/operations/structure.py @@ -130,6 +130,7 @@ def run( soltab, doUnwrap=False, refAnt='', plotName='', ndiv=1 ): if plotName != '': if plotName.split('.')[-1] != 'png': plotName += '.png' # add png + import sys if not 'matplotlib' in sys.modules: import matplotlib as mpl mpl.use("Agg") @@ -158,8 +159,8 @@ def run( soltab, doUnwrap=False, refAnt='', plotName='', ndiv=1 ): ax.set_xscale('log') ax.set_yscale('log') - ymin = np.max(1e-9,np.min(variance[myselect])) - ymax = np.max(variance[myselect]) + ymin = np.max([1e-9,np.min(variance[myselect])]) + ymax = np.max([variance[myselect]]) ax.set_xlim(xmin=0.1,xmax=3) ax.set_ylim(ymin,ymax) ax1.set_ylim(np.log10(ymin),np.log10(ymax))