Skip to content

Commit

Permalink
Merge pull request #160 from revoltek/adrabent-patch-structure-1
Browse files Browse the repository at this point in the history
Fix TypeError for operation STRUCTURE
  • Loading branch information
adrabent authored Sep 13, 2024
2 parents ea8dbf0 + 76c223e commit 75fe55d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions losoto/operations/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 75fe55d

Please sign in to comment.