You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
469 B
R
17 lines
469 B
R
##################################################
|
|
#################### eV2nm #######################
|
|
##################################################
|
|
source(HomeByHost("/home/taha/chepec/chetex/common/R/sunlight/solarconstants.R"))
|
|
|
|
eV2nm <- function(eV) {
|
|
# Converts energy in eV to wavelength in nm
|
|
#
|
|
sun.constants <- solar.constants()
|
|
|
|
nm <-
|
|
sun.constants["h.eV", "value"] *
|
|
1E9 * sun.constants["c", "value"] / eV
|
|
|
|
return(nm)
|
|
}
|