-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathspektrExposure.m
66 lines (61 loc) · 2.27 KB
/
spektrExposure.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
60
61
62
63
64
65
66
function e = spektrExposure(q)
%%**************************************************************************
%% System name: SPEKTR
%% Module name: spektrExposure.m
%% Version number: 3
%% Revision number: 00
%% Revision date: 19-Apr-2006
%%
%% 2016 (C) Copyright by Jeffrey H. Siewerdsen.
%% I-STAR Lab
%% Johns Hopkins University
%%
%% Usage: e = spektrExposure(q)
%%
%% Inputs:
%% q - X-Ray Energy Spectrum (is a [150 x 1] matrix), generated from the
%% function spektrSpectrum(..,..). Each matrix element represents
%% the # of photons / mAs / mm^2 in an one keV energy bin (from 1-150 keV)
%%
%% Outputs:
%% e = Exposure [mR/mAs]
%%
%% Description:
%% This function will generate the exposure [mR/mAs].
%%
%% Let:
%% u[E] = attenuation coefficient
%% p = density
%%
%% where (u[E]/p)en is the energy dependent mass energy absorption
%% coefficient of air -> UNITS are [cm^2/g]
%% where q[E] or q is the energy spectrum (x-ray)
%%
%% Therefore;
%%
%% (photon fluence)/exposure = (5.43x10^5)/((u[E]/p)en*E) [photons/mm^2mR]
%%
%% Total Exposure = Sum(from 0 -> Emax) (u[E]/p)en*E)*q[E]/(5.43*10^5) [mR/mAs]
%%
%% Notes:
%%
%%*************************************************************************
%% References:
%%
%%*************************************************************************
%% Revision History
%% 0.000 2003 05 01 AW Initial code
%% 1.000 2004 03 15 DJM Initial released version
%% 2.000 2006 04 19 DJM Removed XLSread and replaced with .MAT
%% 3.000 2015 06 15 JGP Removed all xls dependencies
%%*************************************************************************
%%
load('spektrFluencePerExposure.mat'); % 150x10 matrix
exposure_per_fluence = fluence_per_exposure(:,4); % 150x1 matrix - column 4
% Therefore;
% (photon fluence)/exposure = (5.43x10^5)/((u[E]/p)en*E) [photons/mm^2mR]
% Total Exposure = Sum(from 0 -> Emax) (u[E]/p)en*E)*q[E]/(5.43*10^5) [mR/mAs]
% (1) Calculate the exposure in air
exposure_air = exposure_per_fluence.*q;
% (2) Integrate/Sum: Perform a summation of the entire matrix -> which will give the exposure
e = sum(exposure_air);