def processCSVInputFiles(self, filePattern = '*.csv'):
		if (not S.readCSVFiles):
			appLogger.info('Reading CSV input files disabled. You can enable it by setting "readCSVFiles = True" in Settings.py')
			return
		# Read each input file
		for fileName in glob.glob(os.path.join(S.inputFolder, filePattern)):
			dataName, _ = os.path.splitext(os.path.basename(fileName))
			appLogger.info('From input file "{}" reading columns ({}, {}) ...'.format(
						fileName, S.csvPressureChannel, S.csvTemperatureChannel))
			#appLogger.info('Temperature unit: {}'.format(S.temperatureUnit))
			data = np.genfromtxt(fileName, delimiter = ',', names = True)
			appLogger.info('... {} values read'.format(len(data)))
			pTData = data[[S.csvPressureChannel[0], S.csvTemperatureChannel[0]]].copy()
			# Clean up the data
			pTData, stat = RecArrayManipulator.removeNaN(pTData, maxConsecutiveNaNs = S.maxConsecutiveNaNs)
			if (stat['numRemoved'] > 0):
				appLogger.warning('{numRemoved} rows with NaN values removed from the input data, max NaN sequence length: {maxConsecutiveNaN}'.format(**stat))			
			pData = pTData[S.csvPressureChannel[0]]
			TData = pTData[S.csvTemperatureChannel[0]]
			# Convert units if necessary
			Q.convertUnit(pData, quantity = 'Pressure', 
				fromUnit = S.csvPressureChannel[1], toUnit = 'bar')
			Q.convertUnit(TData, quantity = 'Temperature', 
				fromUnit = S.csvTemperatureChannel[1], toUnit = 'K')
			# Compute damage
			self.compute(dataName, 
						pData = pData, TData = TData)
	def processAMRInputFiles(self, filePattern = '*.amr'):
		if (not S.readAMRFiles):
			appLogger.info('Reading AMR input files disabled. You can enable it by setting "readAMRFiles = True" in Settings.py')
			return
		from smo.math.io import AMRFileReader
		# Read each input file
		for fileName in glob.glob(os.path.join(S.inputFolder, filePattern)):
			dataName, _ = os.path.splitext(os.path.basename(fileName))
			appLogger.info('From input file "{}" reading channels ({}, {}) ...'.format(
						fileName, S.amrPressureChannel, S.amrTemperatureChannel))
			# Read the AMR file
			reader = AMRFileReader()
			reader.openFile(fileName)
			pChannel = reader.findChannel(*S.amrPressureChannel)
			TChannel = reader.findChannel(*S.amrTemperatureChannel)
			# Get channel names
			pName = S.amrPressureChannel[0]
			TName = S.amrTemperatureChannel[0]
			# Read channels data
			pData = reader.getChannelData(pChannel)[['time', 'value']].copy()
			TData = reader.getChannelData(TChannel)[['time', 'value']].copy()			
			appLogger.info('... {} values read from {} channel'.format(len(pData), pName))
			appLogger.info('... {} values read from {} channel'.format(len(TData), TName))
			# Remove duplicate time rows
			pData = reader.removeDuplicateTimes(pData)
			TData = reader.removeDuplicateTimes(TData)
			# Convert units if necessary
			Q.convertUnit(pData, quantity = 'Pressure', 
				fromUnit = S.amrPressureChannel[1], toUnit = 'bar')
			Q.convertUnit(TData, quantity = 'Temperature', 
				fromUnit = S.amrTemperatureChannel[1], toUnit = 'K')
			# Merge and clean the channel data (use common time column)			
			channelData = reader.mergeChannels(
					channelList = [pData, TData], channelNames = [pName, TName], 
					resamplingInterval = S.resamplingInterval, maxIntervalNoValue = S.maxSamplingInterval)
			if (S.saveInputPlots):
				self.plotAMRPTData(pData, TData, channelData, [pName, TName], dataName = dataName)
			# Compute damage
			self.compute(dataName, 
					pData = channelData[pName], TData = channelData[TName])