input: 
  from typing import List, Dict
  
  def generate_plots(logfile: str, calib_folder: str, instrfile: str) -> None:
      """
      Perform a series of calculations and generate plots based on input data. 
      The script prepares the data by running eval_spectrum.py and calibration.py 
      with appropriate measurements. It loads necessary modules and functions from 
      external sources, reads the input data, performs calibration, calculates 
      various values, and generates plots based on instructions provided in a 
      separate text file. The generated plots include:
      - Absorbed Power vs Emitted Power
      - Absorbed Power vs Reflectivity
      - Dissipated Power vs Wavelength
      The script also calculates thermal resistance and displays it on the plot.
  
      Args:
          logfile (str): Path to the log file containing the measurement data.
          calib_folder (str): Folder containing calibration data.
          instrfile (str): Path to the instructions file for generating plots.
  
      Returns:
          None: The function generates plots and prints the thermal impedance.
  
      Example:
      For generate_plots('../24_LL_ev/20150211_sample21-1-d6/spot333um.csv', '../24_LL_ev/20150204_calib_333um_s21-1-d6', '../24_LL_ev/20150211_sample21-1-d6/spot333um_instr.csv'), the function will:
      1. Calibrate the data using calibration files.
      2. Extract and process the measurement data.
      3. Generate plots according to the instructions in the instrfile.
      4. Output the thermal impedance in the plots and print it in the console.
      
      Expected Output:
      The function will display the generated plots and print:
      "Thermal impedance: $(value)$ K/W"
      """
  
output:     
      import os
      import numpy as np
      import matplotlib.pyplot as plt
      from eval_spectrum import process_spectrum
      from calibration import calibrate_data
  
      # Load the measurement data from the logfile
      with open(logfile, 'r') as f:
          data = np.loadtxt(f, delimiter=',')
  
      # Load the calibration data from the calib_folder
      calib_files = [os.path.join(calib_folder, f) for f in os.listdir(calib_folder) if f.endswith('.csv')]
      calib_data = []
      for calib_file in calib_files:
          with open(calib_file, 'r') as f:
              calib_data.append(np.loadtxt(f, delimiter=','))
  
      # Calibrate the measurement data
      calibrated_data = calibrate_data(data, calib_data)
  
      # Process the spectrum data
      spectrum_data = process_spectrum(calibrated_data)
  
      # Load the instructions from the instrfile
      with open(instrfile, 'r') as f:
          instructions = f.readlines()
  
      # Extract the necessary values for plotting
      absorbed_power = spectrum_data['absorbed_power']
      emitted_power = spectrum_data['emitted_power']
      reflectivity = spectrum_data['reflectivity']
      dissipated_power = spectrum_data['dissipated_power']
      wavelength = spectrum_data['wavelength']
  
      # Calculate thermal resistance
      thermal_resistance = np.mean(dissipated_power) / np.mean(absorbed_power)
  
      # Generate plots
      plt.figure(figsize=(12, 8))
  
      # Plot Absorbed Power vs Emitted Power
      plt.subplot(2, 2, 1)
      plt.plot(absorbed_power, emitted_power, 'bo-')
      plt.title('Absorbed Power vs Emitted Power')
      plt.xlabel('Absorbed Power (W)')
      plt.ylabel('Emitted Power (W)')
  
      # Plot Absorbed Power vs Reflectivity
      plt.subplot(2, 2, 2)
      plt.plot(absorbed_power, reflectivity, 'ro-')
      plt.title('Absorbed Power vs Reflectivity')
      plt.xlabel('Absorbed Power (W)')
      plt.ylabel('Reflectivity')
  
      # Plot Dissipated Power vs Wavelength
      plt.subplot(2, 2, 3)
      plt.plot(wavelength, dissipated_power, 'go-')
      plt.title('Dissipated Power vs Wavelength')
      plt.xlabel('Wavelength (nm)')
      plt.ylabel('Dissipated Power (W)')
  
      # Display thermal resistance on the plot
      plt.subplot(2, 2, 4)
      plt.text(0.5, 0.5, f'Thermal Impedance: {thermal_resistance:.2f} K/W', 
               horizontalalignment='center', verticalalignment='center', fontsize=12)
      plt.axis('off')
  
      # Show the plots
      plt.tight_layout()
      plt.show()
  
      # Print the thermal impedance
      print(f"Thermal impedance: {thermal_resistance:.2f} K/W")
  