diff options
Diffstat (limited to 'optics.c')
-rw-r--r-- | optics.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,6 +1,7 @@ #include <math.h> #include "optics.h" +/* From Table 4 in the paper. */ static double A0 = 0.243905091; static double A1 = 9.53518094e-3; static double A2 = -3.64358110e-3; @@ -14,11 +15,13 @@ static double IR = 5.432937; double get_index(double p, double wavelength, double T) { - /* Returns the index of pure water for a given density, wavelength, and - * temperature. The density should be in units of kg/m^3, the wavelength in - * nm, and the temperature in Celsius. */ - /* normalize the density, temperature, and pressure */ - p = p/1000.0; + /* Returns the index of refraction of pure water for a given density, + * wavelength, and temperature. The density should be in units of g/cm^3, + * the wavelength in nm, and the temperature in Celsius. + * + * See "Refractive Index of Water and Steam as a function of Wavelength, + * Temperature, and Density" by Schiebener et al. 1990. */ + /* normalize the temperature and pressure */ wavelength = wavelength/589.0; T = (T+273.15)/273.15; |