forked from phayne/europa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CraterAlbedoCalculationCode
67 lines (50 loc) · 2.01 KB
/
CraterAlbedoCalculationCode
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
67
function [qmix, wmix, gmix] = miemix( q, w, g, n, a )
% function [qmix, wmix, gmix] = miemix( q, w, g, n, a )
% -------------------------------------------------------------------------
% Calculate Mie parameters for a mixture of 2+ components (e.g. Hapke,
% 1980)
% q[] = extinction efficiencies (from table)
% w[] = single scattering albedos (from table)
% g[] = asymmetry parameters (from table)
% n[] = number densities (try different ones, must be two column array)
% a[] = radii (look up)
nel = size(q,1);
qmix = zeros(nel,1);
wmix = qmix;
gmix = qmix;
for i=1:nel
qmix(i) = sum( n.*a.^2.*q(i,:) ) / sum( n.*a.^2 );
wmix(i) = sum( n.*a.^2.*q(i,:).*w(i,:) ) / sum( n.*a.^2.*q(i,:) );
gmix(i) = sum( n.*a.^2.*q(i,:).*w(i,:).*g(i,:) ) / sum( n.*a.^2.*q(i,:).*w(i,:) );
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function A = albedoHapke(wmix, inc, emi, theta, gmix)
% function A = albedoHapke(w, B0, h, b, c, inc, emi, theta)
% -------------------------------------------------------------------------
% Hapke's bidirectional reflectance function. q, w, g, n, and a are the
% extinction efficiency, single-scattering albedo, asymmetry parameter,
% number density, and radius of the particles. inc and emi�
% are the incidence and emergence angles (radians). theta is the phase�
% angle, in radians (zero for backscatter).
%variables to change based on parameters:
%size of particle
%a = 10^-5;
%n = number density
%------------------------------------------------------------------%
% Free parameter describing the opposition effect (Hapke, 1981)
B0 = 0.9;
mu0 = cos(inc);
mu = cos(emi);
%h = (3/8) * q.^(3/2);
%h = (1/2)*(n*pi*(10^-5)*q.^(3/2));
h = .003;
B = B0 .* (1 + tan(abs(theta/2))./h).^-1;
% phase function
%p = phaseHapke(theta);
c = .4;
p = henyey_greenstein_two(gmix, c, theta);
% Chandra H-functions
Hmu0 = H_twostream(mu0, wmix);
Hmu = H_twostream(mu, wmix);
A = (wmix/(4*pi)).*(mu0./(mu0+mu)).*( (1+B).*p + Hmu0.*Hmu - 1 );
end