data[key+'_wavelength']=[]
	data[key+'_reflectance']=[]
	###########################################################
	#comment these next 2 lines out if you are not using bias correction
	data_bias[key+'_wavelength']=[]
	data_bias[key+'_reflectance']=[]
	data_corr[key+'_reflectance']=[]
	#obtain Infragold calibrated data
	data[key+'_wavelength'], data[key+'_reflectance'] = IR_analysis.calibrate_data(file, IG_filenames[index])

	###########################################################
	#comment these next lines out if you are not using bias correction
	#obtain Infragold calibrated bias files
	data_bias[key+'_wavelength'], data_bias[key+'_reflectance'] = IR_analysis.calibrate_data(bias_filenames[index], IG_filenames[index])
	#bias correction
	data_corr[key+'_reflectance'] = IR_analysis.bias_correct(data[key+'_reflectance'], data_bias[key+'_reflectance'])
	print 'finished reading file: ', key

print 'plotting...'


#########################################################
#plot IR spectra

#Four Windows comparison
#example of a single spectrum plot
#(wavelength, reflectance, xrange, title, save file, smoothing integer)
###########################################################
#replace "data_corr" with "data" if not use bias correction
IR_plot.plot_IR_spectrum(np.array(data['FW203_orange_01_wavelength']), np.array(data_corr['FW203_orange_01_reflectance']), [1.6,3.6], 'FW203: cashbox (no smoothing)', 'output/FW203_cashbox.png', 1)