![]() |
libSUFR
a LIBrary of Some Useful Fortran Routines
|
Procedures to do computations in optics. More...
Functions/Subroutines | |
elemental subroutine | reflectance_transmittance (angi, nref1, nref2, runp, tunp, rprp, rpar, tprp, tpar, angt) |
Compute the reflectance for the transition from a medium with refractive index Nref1 to one with Nref2, under an incident angle ang. Optionally, compute the transmittance, and the polarised components. The media are assumed to be non-magnetic. | |
pure real(double) function | refractive_index_air (wavelength, temperature, pressure, humidity) |
Computes real index of refraction of air given wavelength, temperature, pressure and relative humidity. | |
pure real(double) function | refractive_index_pmma (wavelength) |
Refractive index of PMMA as a function of wavelength. | |
real(double) function, dimension(3) | wavelength2rgb (wl, df) |
Return an RGB-value representing the colour corresponding to a light ray with a given wavelength. | |
Procedures to do computations in optics.
elemental subroutine sufr_optics::reflectance_transmittance | ( | real(double), intent(in) | angi, |
real(double), intent(in) | nref1, | ||
real(double), intent(in) | nref2, | ||
real(double), intent(out) | runp, | ||
real(double), intent(out), optional | tunp, | ||
real(double), intent(out), optional | rprp, | ||
real(double), intent(out), optional | rpar, | ||
real(double), intent(out), optional | tprp, | ||
real(double), intent(out), optional | tpar, | ||
real(double), intent(out), optional | angt ) |
Compute the reflectance for the transition from a medium with refractive index Nref1 to one with Nref2, under an incident angle ang. Optionally, compute the transmittance, and the polarised components. The media are assumed to be non-magnetic.
angI | Angle of incidence (rad) |
Nref1 | Refractive index of first medium, incoming ray |
Nref2 | Refractive index of second medium, transmitted ray |
Runp | Unpolarised reflectance (output) |
Tunp | Unpolarised transmittance (output, optional) |
Rprp | Perpendicular polarised reflectance (output, optional) |
Rpar | Parallel polarised reflectance (output, optional) |
Tprp | Perpendicular polarised transmittance (output, optional) |
Tpar | Parallel polarised transmittance (output, optional) |
angT | Angle of transmittance (rad; optional) (output, optional) |
Definition at line 54 of file optics.f90.
References sufr_kinds::double, and sufr_constants::pio2.
pure real(double) function sufr_optics::refractive_index_air | ( | real(double), intent(in) | wavelength, |
real(double), intent(in) | temperature, | ||
real(double), intent(in) | pressure, | ||
real(double), intent(in) | humidity ) |
Computes real index of refraction of air given wavelength, temperature, pressure and relative humidity.
wavelength | Wavelength (nanometers) |
temperature | Temperature (degrees Celsius) |
pressure | Pressure (millibar) |
humidity | Relative humidity (%) |
refractive_index_air | Refractive index of air |
Definition at line 111 of file optics.f90.
References sufr_kinds::double, and refractive_index_air().
Referenced by refractive_index_air().
pure real(double) function sufr_optics::refractive_index_pmma | ( | real(double), intent(in) | wavelength | ) |
Refractive index of PMMA as a function of wavelength.
wavelength | Wavelength in nanometres |
refractive_index_pmma | Refractive index of PMMA |
Definition at line 175 of file optics.f90.
References sufr_kinds::double, and refractive_index_pmma().
Referenced by refractive_index_pmma().
real(double) function, dimension(3) sufr_optics::wavelength2rgb | ( | real(double), intent(in) | wl, |
real(double), intent(in) | df ) |
Return an RGB-value representing the colour corresponding to a light ray with a given wavelength.
wl | Wavelength in nm (390-770 nm) |
df | Dimming factor 0-1 to scale RGB values with (0-1; 0: black, 1: full colour) |
wavelength2rgb | RGB values: (0-1, 0-1, 0-1) |
Definition at line 205 of file optics.f90.
References sufr_kinds::double, sufr_system::warn(), and wavelength2rgb().
Referenced by wavelength2rgb().