# Jonathan Thomson's web journal ### Radiometric CalibrationSeptember 7, 2012

A mathematical model of the TSL230 family of irradiance sensors and an explanation of how they work can be found in the Irradiance Meter article in my series about the TSL230R. However you don’t really need to understand all the details because the function TSL230_fO_to_irradiance() will perform the calibration for you if you provide it with a spectrogram and an fO measurement. Here’s a code snippet that demonstrates how the function is used.

```   sensor_type = 'TSL230RD';
fO = 1.8416; % [kHz]
sensitivity = 1;
distance = 0.076200; % [m]

% so.Hr is the radiometrically calibrated system function
Z = image2spectrum(Cyan_LED_Spectrograph);
Z = filtfilt(Ftri, 1, Z); % distorted spectrogram, [count]
Ee = Z./so.Hr; % corrected spectrogram, spectral irradiance, [W/m^2/nm]
Ee_green = Ee(:,2); % the green channel only

% Ee_green is the indirectly calibrated spectral irradiance of the cyan LED, [W/m^2/nm]
% Ee2 is the directly calibrated spectral irradiance of the cyan LED, [W/m^2/nm]
Ee2 = TSL230_fO_to_irradiance(lambda, Ee_green, fO, sensitivity, sensor_type, 'power');
```

Code
The primary script system_function_calibrated will compute the radiometrically calibrated system function `so.Hr`, which can then be used to remove distortion from a spectrogram and indirectly radiometrically calibrate it. The example script example05_Hr_cyan_LED demonstrates the removal of the system function from a spectrogram and compares indirect calibration to direct calibration. 