input: Write a function to perform a series of calculations and generate plots based on input data. Before running the function, ensure that eval_spectrum.py and calibration.py have been executed with appropriate measurements. The function will load input data, perform calibration, calculate various values, and generate plots based on instructions provided in a separate text file. The generated plots will show absorbed power vs emitted power, absorbed power vs reflectivity, and dissipated power vs wavelength. The function will also calculate thermal resistance and display it on the plot. If the input data is valid and all calculations are performed correctly, the function will return True; otherwise, it will return False.
  assert run_calculations_and_plot(["input_data_1.csv", "input_data_2.csv"]) == True
  assert run_calculations_and_plot(["invalid_data.csv"]) == False
  assert run_calculations_and_plot([]) == False
output: def run_calculations_and_plot(file_list):
      if not file_list:
          return False
      
      try:
          import pandas as pd
          import matplotlib.pyplot as plt
          from eval_spectrum import load_spectrum
          from calibration import calibrate_data
          
          data_list = [pd.read_csv(file) for file in file_list]
          calibrated_data = [calibrate_data(data) for data in data_list]
          
          for data in calibrated_data:
              absorbed_power = data['absorbed_power']
              emitted_power = data['emitted_power']
              reflectivity = data['reflectivity']
              dissipated_power = data['dissipated_power']
              wavelength = data['wavelength']
              
              plt.figure(figsize=(15, 5))
              
              plt.subplot(1, 3, 1)
              plt.plot(absorbed_power, emitted_power)
              plt.title('Absorbed Power vs Emitted Power')
              plt.xlabel('Absorbed Power')
              plt.ylabel('Emitted Power')
              
              plt.subplot(1, 3, 2)
              plt.plot(absorbed_power, reflectivity)
              plt.title('Absorbed Power vs Reflectivity')
              plt.xlabel('Absorbed Power')
              plt.ylabel('Reflectivity')
              
              plt.subplot(1, 3, 3)
              plt.plot(dissipated_power, wavelength)
              plt.title('Dissipated Power vs Wavelength')
              plt.xlabel('Dissipated Power')
              plt.ylabel('Wavelength')
              
              thermal_resistance = (max(emitted_power) - min(emitted_power)) / (max(absorbed_power) - min(absorbed_power))
              plt.suptitle(f'Thermal Resistance: {thermal_resistance:.2f}')
              
              plt.show()
          
          return True
      except Exception as e:
          return False