rfinn / halphagui

development of gui interface for H-alpha narrowband imaging
GNU General Public License v3.0
0 stars 0 forks source link

no legacy image exception #106

Open ethanjone-s opened 11 months ago

ethanjone-s commented 11 months ago
legacyImgs, wiseImgs = display_legacy_unwise(ra,dec,galID,imsize_arcsec=imsize)
UnboundLocalError                         Traceback (most recent call last)
Cell In[78], line 1
----> 1 ptab,e,logMstar_mag,logMstar_flux = getMass(
      2     
      3     matchedTab[3], 
      4 
      5     massTab,
      6     
      7     plotting=False,
      8     
      9     imsize=120, 
     10     
     11     makeMask=True,
     12     
     13     changeSize=False,
     14 
     15     verbose=True
     16     
     17 )

Cell In[77], line 40, in getMass(myGal, galTable, plotting, imsize, makeMask, changeSize, verbose)
     37             os.remove(f)
     39 # gets the W1-4 and legacy images for the galaxy
---> 40 legacyImgs, wiseImgs = display_legacy_unwise(ra,dec,galID,imsize_arcsec=imsize)
     42 # can be changed to different bands
     43 imname = wiseImgs[0]

File ~/github/halphagui/image_functions.py:468, in display_legacy_unwise(ra, dec, galname, imsize_arcsec, plotdir)
    466 plt.savefig(plotdir+galname+"cutouts.png",transparent=False)
    467 #plt.close()
--> 468 return legacy_images, imagefiles

UnboundLocalError: local variable 'legacy_images' referenced before assignment