input: Write a function to load input data, perform calibration, calculate various values, and generate plots based on instructions provided in a separate text file. The generated plots should show absorbed power vs emitted power, absorbed power vs reflectivity, and dissipated power vs wavelength. The function should also calculate thermal resistance and display it on the plots. If the function runs successfully, return True; otherwise, return False. Note that before running the script, eval_spectrum.py and calibration.py should be executed with appropriate measurements. If the script encounters any issues or the input data is missing, return False.
  assert main() == True
output: def main():
      try:
          # Load input data
          with open('instructions.txt', 'r') as file:
              instructions = file.read()
          
          # Perform calibration
          calibration_data = calibration.perform_calibration()
          
          # Calculate various values
          absorbed_power, emitted_power, reflectivity, dissipated_power, wavelength = eval_spectrum.calculate_values(calibration_data)
          
          # Generate plots
          plt.figure(1)
          plt.plot(emitted_power, absorbed_power)
          plt.xlabel('Emitted Power')
          plt.ylabel('Absorbed Power')
          plt.title('Absorbed Power vs Emitted Power')
          
          plt.figure(2)
          plt.plot(reflectivity, absorbed_power)
          plt.xlabel('Reflectivity')
          plt.ylabel('Absorbed Power')
          plt.title('Absorbed Power vs Reflectivity')
          
          plt.figure(3)
          plt.plot(wavelength, dissipated_power)
          plt.xlabel('Wavelength')
          plt.ylabel('Dissipated Power')
          plt.title('Dissipated Power vs Wavelength')
          
          # Calculate thermal resistance
          thermal_resistance = eval_spectrum.calculate_thermal_resistance(absorbed_power, emitted_power)
          
          # Display thermal resistance on the plots
          for fig in plt.get_fignums():
              plt.figure(fig)
              plt.text(0.5, 0.9, f'Thermal Resistance: {thermal_resistance}', transform=plt.gca().transAxes, fontsize=12, ha='center')
          
          plt.show()
          
          return True
      except Exception as e:
          return False