print 'finished reading file: ', key
	print '(removed bad scans)'
	IR_analysis.write_file(key, data[key+'_wavelength'], data[key+'_reflectance'])

#PASA cashbox txt (2015, and later, current format)
#same analysis as PASA-Lite
for index, file in enumerate(sample_filenames_PASA_cashbox):
	#data stored in dictionary
	#define key based on file name
	key=file.split('samples/',1)[-1]
	key=key.rstrip('.txt')
	#store wavelength and reflectance data in key
	data[key+'_wavelength']=[]
	data[key+'_reflectance']=[]
	#obtain Infragold calibrated data
	data[key+'_wavelength'], data[key+'_reflectance'] = IR_analysis.calibrate_data_PASA_lite(file, IG_filenames_PASA_cashbox[index])
	print 'finished reading file: ', key
	IR_analysis.write_file(key, data[key+'_wavelength'], data[key+'_reflectance'])

#PASA-Lite .txt files (2015 and later, current format)
#same analysis file as PASA cashbox
for index, file in enumerate(sample_filenames_PASA_lite):
	#data stored in dictionary
	#define key based on file name
	key=file.split('samples/',1)[-1]
	key=key.rstrip('.txt')
	#store wavelength and reflectance data in key
	data[key+'_wavelength']=[]
	data[key+'_reflectance']=[]
	#obtain Infragold calibrated data
	data[key+'_wavelength'], data[key+'_reflectance'] = IR_analysis.calibrate_data_PASA_lite(file, IG_filenames_PASA_lite[index])