input: Write a function to generate plots and perform calculations based on input data. The function should load the input data, perform calibration, calculate absorbed power, emitted power, reflectivity, and dissipated power, and generate plots showing 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 plot. If the script is executed, it should run the main function.
  
  
  assert main('sample21-1-d6') == ... # the exact output depends on the data
  assert main('sample21-1-d7') == ... # the exact output depends on the data
  assert main('sample21-1-d8') == ... # the exact output depends on the data
  assert main('sample21-1-d9') == ... # the exact output depends on the data
  assert main('sample21-1-d10') == ... # the exact output depends on the data
  
output: 
  import numpy as np
  import matplotlib.pyplot as plt
  
  def main(filename):
      data = np.loadtxt(filename, delimiter=',')
      wavelength = data[:, 0]
      absorbed_power = data[:, 1]
      emitted_power = data[:, 2]
      reflectivity = data[:, 3]
      
      dissipated_power = absorbed_power - emitted_power
      thermal_resistance = np.mean(dissipated_power) / np.mean(emitted_power)
      
      plt.figure(figsize=(15, 5))
      
      plt.subplot(1, 3, 1)
      plt.plot(absorbed_power, emitted_power, 'bo-')
      plt.xlabel('Absorbed Power')
      plt.ylabel('Emitted Power')
      plt.title('Absorbed Power vs Emitted Power')
      
      plt.subplot(1, 3, 2)
      plt.plot(absorbed_power, reflectivity, 'ro-')
      plt.xlabel('Absorbed Power')
      plt.ylabel('Reflectivity')
      plt.title('Absorbed Power vs Reflectivity')
      
      plt.subplot(1, 3, 3)
      plt.plot(wavelength, dissipated_power, 'go-')
      plt.xlabel('Wavelength')
      plt.ylabel('Dissipated Power')
      plt.title('Dissipated Power vs Wavelength')
      plt.text(np.min(wavelength), np.max(dissipated_power), f'Thermal Resistance: {thermal_resistance:.2f}')
      
      plt.tight_layout()
      plt.show()
      
      return thermal_resistance
  