forked from I-STAR/SPEKTR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spektrFluencePerExposure.m
59 lines (52 loc) · 2.09 KB
/
spektrFluencePerExposure.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
function FE = spektrFluencePerExposure(q, varargin)
%%**************************************************************************
%% System name: SPEKTR
%% Module name: spektrFluencePerExposure.m
%% Version number: 3
%% Revision number: 00
%% Revision date: 10-Apr-2006
%%
%% 2016 (C) Copyright by Jeffrey H. Siewerdsen.
%% I-STAR Lab
%% Johns Hopkins University
%%
%% Usage: e = spektrFluencePerExposure(spektrSpectrum(90));
%%
%% (photon fluence)/exposure = (5.43x10^5)/((u[E]/p)en*E)*normalized(q) [photons/mm^2mR]
%%
%%
%% Input Parameters: 'q' is an energy spectrum comprising a 150x1 matrix. This
%% spectrum can be generated from the matlab function
%% spektrSpectrum(kVp, [Al_thickness kV_ripple]). Each matrix
%% element represents the # of photons per energy bin (using 1
%% keV bins, from 1-150 keV)
%%
%% Output Parameters: Fluence per Exposure [photons/mm^2mR]
%%
%% Description:
%% This function will generate the Fluence per Exposure [x-rays/mm^2/mR]
%% given a spectrum q.
%%
%% Notes:
%%
%%*************************************************************************
%% References:
%%
%%*************************************************************************
%% Revision History
%% 0.000 2003 05 01 AW Initial code
%% 1.000 2004 03 15 DJM Initial released version1
%% 2.000 2006 04 19 DJM Removed XLSread and replaced with .MAT
%% 3.000 2015 06 15 JGP Removed all xls dependencies
%%*************************************************************************
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% PARAMETERS
Column_FluencePerExposure = 3;
% Read in the appropriate spreadsheet for the fuence per unit of exposure (of air compound)
load('spektrFluencePerExposure.mat'); % 150x10 matrix
exposure_per_fluence = fluence_per_exposure(:,Column_FluencePerExposure); % 150x1 matrix
% Normalize q
qnorm = spektrNormalize(q);
% Integral
FE = sum( exposure_per_fluence.*qnorm );