public class Functions
extends java.lang.Object
Based on IDL code by Nick Thomas, University of Bern.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Class identification name with source code version and date.
|
Modifier and Type | Method and Description |
---|---|
static double |
azimuth(double incidence,
double emission,
double phase)
Computes the azimuth angle for a set of incidence, emission, and phase
angles.
|
static double |
cboe_function(double phase,
Hapke_Parameters hapke)
Computes the coherent backscatter opposition effect for a given phase angle
and set of Hapke parameters.
|
static double |
H_function(double x,
double albedo,
boolean use_simple)
Computes the value of the H-function for the given inputs.
|
static double |
illumination_shadow(double azimuth)
Computes the fraction of illumination shadow hidden in the visibility
shadow.
|
static double |
M_function(double mu_0,
double mu,
Hapke_Parameters hapke)
Computes the Hapke M-function for a given μ0,
μ, and set of Hapke parameters.
|
static void |
main(java.lang.String[] args)
Performs simple tests of the HIPHOP functions.
|
static Mu_Parameters |
mu_rough(double incidence,
double emission,
double phase,
double mean_slope)
Computes the μ parameters for a rough surface.
|
static double |
normalized_derivative(double incidence)
Computes the change in reflectance per degree of incidence angle, used in
surface roughness calculations.
|
static double |
p_function(double x,
Hapke_Parameters hapke,
boolean is_emitter)
Computes the Hapke p-function for a given value and set of Hapke
parameters.
|
static double |
P_function(Hapke_Parameters hapke)
Computes the Hapke P-function for a given set of Hapke parameters.
|
static double |
phase(double incidence,
double emission,
double azimuth)
Computes the phase angle for a set of incidence, emission, and azimuth
angles.
|
static double |
reflectance(double mu_0,
double mu,
double phase,
Hapke_Parameters hapke)
Computes the Hapke reflectance for a given μ0,
μ, phase angle, and set of Hapke parameters.
|
static double |
scatter(double phase,
Hapke_Parameters hapke)
Computes the single-particle scattering for the given input phase angle and
Hapke parameters.
|
static double |
shoe_function(double phase,
Hapke_Parameters hapke)
Computes the shadow hiding opposition effect for a given phase angle and set
of Hapke parameters.
|
static double |
standard_deviation_factor(double contrast_ratio)
Computes the standard deviation factor from contrast ratio.
|
public static final java.lang.String ID
public static double phase(double incidence, double emission, double azimuth)
p = acos (cos i * cos e + sin i * sin e * cos a)
The term in parentheses is limited to the range [-1.0, 1.0]; if it
evaluates outside that range, it is set to the nearest boundary. This
method thus never returns Double.NaN
.
incidence
- the incidence angle in radians.emission
- the emission angle in radians.azimuth
- the azimuth angle in radians.public static double azimuth(double incidence, double emission, double phase)
Note that if either incidence or emission is small (less than 0.0001), this function returns an azimuth of 0.0. Furthermore, if the input photometric angles are incompatible (e.g., not representative of a real physical photometric arrangement), this function may not return a meaningful result; it assumes real geometry, so it always returns a value in the range [0, π].
incidence
- the incidence angle in radians.emission
- the emission angle in radians.phase
- the phase angle in radians.public static double illumination_shadow(double azimuth)
azimuth
- the azimuth angle in radians.public static Mu_Parameters mu_rough(double incidence, double emission, double phase, double mean_slope)
incidence
- the incidence angle in radians.emission
- the emission angle in radians.phase
- the phase angle in radians.mean_slope
- the mean slope angle in radians.public static double scatter(double phase, Hapke_Parameters hapke)
phase
- the input phase angle in radians.hapke
- the input set of Hapke parameters.public static double cboe_function(double phase, Hapke_Parameters hapke)
phase
- the phase angle in radians.hapke
- the Hapke parameters.public static double shoe_function(double phase, Hapke_Parameters hapke)
phase
- the phase angle in radians.hapke
- the Hapke parameters.public static double H_function(double x, double albedo, boolean use_simple)
If use_simple is true, this function uses the simple approximation for the H-function; this approximation is equation 2 in Hapke, 2002.
If use_simple is false, the Ambartsumian-Chandrasekhar approximation is used for the H-function; this approximation is equations 12 and 13 in Hapke, 2002.
x
- the input parameter for the H-function, e.g., the
cosine of the incidence angle or of the emission angle.albedo
- the single-scattering albedo.use_simple
- use the simple approximation if true; otherwise
use the Ambartsumian-Chandrasekhar approximation.public static double p_function(double x, Hapke_Parameters hapke, boolean is_emitter)
x
- the value for which to calculate the p-function, usually
cos e or cos i.hapke
- the Hapke parameters.is_emitter
- true if the source is an emission.public static double P_function(Hapke_Parameters hapke)
Warning: This function takes several minutes to complete! It takes roughly 10 minutes on a Mac Pro with dual 2.8 GHz quad-core Intel Xeon CPUs running Java version 1.5.0.13.
hapke
- the Hapke parameters.public static double M_function(double mu_0, double mu, Hapke_Parameters hapke)
Note: This function uses a precalculated value for the value of the
P-function; see the caveats in the Hapke_Parameters
class.
mu_0
- the function's μ0, assumed to be
cos i.mu
- the function's μ, assumed to be cos e.hapke
- the Hapke parameters.public static double reflectance(double mu_0, double mu, double phase, Hapke_Parameters hapke)
This reflectance is the bidirectional reflectance (I/F) and not pil/F.
Note: This function uses a precalculated value for the value of the
P-function; see the caveats in the Hapke_Parameters
class.
mu_0
- the function's μ0, assumed to be
cos i.mu
- the function's μ, assumed to be cos e.phase
- the phase angle (in radians) under consideration.hapke
- the Hapke parameters.public static double normalized_derivative(double incidence)
incidence
- the incidence angle in degrees.public static double standard_deviation_factor(double contrast_ratio)
If A is the mean value of a distribution, and if C, the contrast ratio, is Amax/Amin, then the standard deviation σ is given by
σ = A (C - 1)/[2 (C + 1)]
This function computes σ/A.
contrast_ratio
- the contrast ratio.public static void main(java.lang.String[] args)
These tests are conducted with the following inputs, based on an observation on orbit 9484 at planetographic latitude 4.933, longitude 350.969 E, with a roll of -21.72 degrees.
In some cases, an artificial phase angle is necessary for conditions that HiRISE does not encounter. For example, the test of the coherent backscatter opposition effect is performed using p = 4.424.
Compare the results of these tests with the equivalent calls of the IDL HIPHOP.
Functions
Command-line arguments are ignored. The system parameter TEST_BIG_P
may be set to true to test the big-P
function. Note that doing so takes several minutes.
args
- command-line arguments, ignored.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona