# energy:energy ratio
with(sun.data,
energy_ratio(w.length, s.e.irrad, new_waveband(400,500), new_waveband(400,700)))
# energy:energy ratio waveband : whole spectrum
with(sun.data, energy_ratio(w.length, s.e.irrad, new_waveband(400,500)))
# energy:energy ratio of whole spectrum should be equal to 1.0
with(sun.data, energy_ratio(w.length, s.e.irrad))
Run the code above in your browser using DataLab