I am quite new to working in the prompt for image analysis and data handling, so I realize this might very well be a very silly problem. In any occasion, I am using my tutor's code in order to radiometrically, atmospherically and topographically correct my images, which are in .tif format. I want to correct each band separately. So far the code looks like this:
# import libraries import numpy as np #numerical python import matplotlib.pyplot as plt #plotting libraries from pylab import * from matplotlib import cm from matplotlib.colors import ListedColormap from spectral.io import envi #envi files library import gdal #Geospatial Data Abstraction Library wdir = 'E:/MOMUT1/Bansko_Sat_Img/OutputII/Ipython/copies/' def readtiff (): filename1 = 'band1' info = envi.open(wdir+'band1') data = info.load() return data, info [Wallow_TM,infoa]=readtiff(band1.tif) # This load a Landsat 5 Thematic Mapper (TM) image
It is at this particular point that it returns a name error, saying "band1 is not define".