%Psych 221
function [sensitivity_linear] = CameraWFilter
%Infrared Photography-Final Project
%Bill Peter
%Charles Chang-I Wang
close all
clear all
%This file plots spectral transfer function of modeled red filter
figure
wavelength = [400e-9:1e-9:900e-9]
c = 3e8;
filter = FilterTransferFxn
film = hiefilm

%Now multiply one wavelength at a time, already converted units
sensitivity_linear = film.*filter
sensitivity = log10(sensitivity_linear)
plot(wavelength,sensitivity_linear,'linewidth',3)
title('Spectral Sensitivity of Camera with Filter','fontsize',14)
xlabel('Wavelength','fontsize',14)
ylabel('Spectral Senstivity (m^2/J)','fontsize',14)
grid on