input: def perform_calculations_and_plots(logfile: str, calib_folder: str) -> None:
      """
      Perform a series of calculations and generate plots based on input data.
      The script first runs eval_spectrum.py and calibration.py with appropriate measurements.
      It imports necessary modules and functions from external sources. The main function
      loads the input data, performs calibration, calculates various values, and generates
      plots showing absorbed power vs emitted power, absorbed power vs reflectivity, and
      dissipated power vs wavelength. The script also calculates thermal resistance and
      displays it on the plot.
  
      >>> perform_calculations_and_plots('../24_LL_ev/20150211_sample21-1-d6/spot333um.csv', '../24_LL_ev/20150204_calib_333um_s21-1-d6')
      """
output:     import os
      import subprocess
      import numpy as np
      import matplotlib.pyplot as plt
  
      # Run eval_spectrum.py and calibration.py
      subprocess.run(['python', 'eval_spectrum.py', logfile])
      subprocess.run(['python', 'calibration.py', calib_folder])
  
      # Load input data
      data = np.loadtxt(logfile, delimiter=',')
      wavelengths = data[:, 0]
      absorbed_power = data[:, 1]
      emitted_power = data[:, 2]
      reflectivity = data[:, 3]
  
      # Perform calibration
      calib_data = np.loadtxt(os.path.join(calib_folder, 'calibration_data.csv'), delimiter=',')
      calib_wavelengths = calib_data[:, 0]
      calib_factors = calib_data[:, 1]
  
      # Calculate calibrated values
      calibrated_absorbed_power = absorbed_power * np.interp(wavelengths, calib_wavelengths, calib_factors)
      calibrated_emitted_power = emitted_power * np.interp(wavelengths, calib_wavelengths, calib_factors)
  
      # Calculate dissipated power
      dissipated_power = calibrated_absorbed_power - calibrated_emitted_power
  
      # Calculate thermal resistance
      thermal_resistance = np.mean(dissipated_power) / np.mean(calibrated_emitted_power)
  
      # Generate plots
      plt.figure(figsize=(12, 8))
  
      # Plot absorbed power vs emitted power
      plt.subplot(2, 2, 1)
      plt.plot(calibrated_absorbed_power, calibrated_emitted_power, 'bo')
      plt.xlabel('Absorbed Power (W)')
      plt.ylabel('Emitted Power (W)')
      plt.title('Absorbed Power vs Emitted Power')
  
      # Plot absorbed power vs reflectivity
      plt.subplot(2, 2, 2)
      plt.plot(calibrated_absorbed_power, reflectivity, 'ro')
      plt.xlabel('Absorbed Power (W)')
      plt.ylabel('Reflectivity')
      plt.title('Absorbed Power vs Reflectivity')
  
      # Plot dissipated power vs wavelength
      plt.subplot(2, 2, 3)
      plt.plot(wavelengths, dissipated_power, 'go')
      plt.xlabel('Wavelength (nm)')
      plt.ylabel('Dissipated Power (W)')
      plt.title('Dissipated Power vs Wavelength')
  
      # Display thermal resistance on the plot
      plt.figtext(0.5, 0.01, f'Thermal Resistance: {thermal_resistance:.4f} K/W', ha='center', fontsize=12)
  
      plt.tight_layout()
      plt.show()