Documentation
¶
Overview ¶
Package radiation speaks of radiation by its wavelength in nanometres, from gamma rays to radio. It moves between wavelength, energy, frequency and length in metres.
It names the ranges of radiation under iso 21348's names, and the fermi mission's. The iso ranges were never read against the standard, which is not open; they are as libtheme-css typed them, and some overlap, as each range's doc says.
A Profile maps one range of wavelengths onto another, which is what a false color profile is made of.
What the radiation looks like is not here. That is a colour, and colour is libtheme's.
Index ¶
- Constants
- func Energy(nm float64) float64
- func ErrRange() error
- func FromEnergy(ev float64) float64
- func HertzToNm(hz float64) float64
- func JanskyToSI(jy float64) float64
- func MetresToNm(metres float64) float64
- func NmToHertz(nm float64) float64
- func NmToMetres(nm float64) float64
- type Profile
- type Range
Constants ¶
const ( // Electronvolt is one electronvolt, the unit energies here are in. // Defined: the unit itself. Electronvolt = 1.0 // Hertz is one hertz, the unit frequencies here are in. Defined: the // unit itself. Hertz = 1.0 )
the units radiation is spoken in. each has one name, and its multiples come from the si's prefixes: a keV is si.Kilo(Electronvolt), the hydrogen line is 1420.405751 * si.Mega(Hertz).
an eV is an energy, not a wavelength, but most papers on gamma radiation speak in eV, so FromEnergy and Energy move between the two. wavelengths are in nanometres, and lengths in metres go through MetresToNm.
Variables ¶
This section is empty.
Functions ¶
func Energy ¶
Energy is the energy, in electronvolts, of a photon of a wavelength in nanometres: FromEnergy, undone.
func ErrRange ¶
func ErrRange() error
ErrRange is two wavelengths that make no range: a short end not above nothing, a long end not above the short, or either not a number.
func FromEnergy ¶
FromEnergy is the wavelength, in nanometres, of a photon carrying an energy in electronvolts.
func JanskyToSI ¶
JanskyToSI is a spectral flux density in janskys as watts a square metre a hertz, the unit every exported flux density here is in. The jansky is outside the si: radio and infrared catalogues, WISE's among them, still state flux densities in it.
It lives in radiation, not si, because si holds the defining constants and the prefixes, and a jansky is a unit of radiation: a power per area per frequency.
func MetresToNm ¶
MetresToNm is a length in metres as nanometres, the unit every range here is in: MetresToNm(3.4 * si.Micro(length.Metre)) is WISE's first band, 3400 nm.
func NmToHertz ¶
NmToHertz is the frequency, in hertz, of light of a wavelength in nanometres: HertzToNm, undone.
func NmToMetres ¶
NmToMetres is nanometres as metres: MetresToNm, undone.
Types ¶
type Profile ¶
type Profile struct {
// contains filtered or unexported fields
}
Profile maps one range of wavelengths onto another, evenly in the logarithm of wavelength. A false colour profile is made of one: it takes radiation the eye cannot see onto light it can.
What colour that is belongs to libtheme; here the profile only says where a wavelength lands.
func NewProfile ¶
NewProfile is the profile of a name that maps a source range onto a render range. It refuses either range when it is no range, and then gives no profile.
func (Profile) Back ¶
Back is the reciprocal of Onto: where a wavelength in the render came from in the source. ok is false, and the wavelength is not mapped, when it is outside the render (its long end is outside, as the source's is) or the profile's ranges are none.
func (Profile) Holds ¶
Holds is whether a wavelength is inside the profile's source, from its short end up to but not including its long end. The zero Profile, whose ranges are none, holds nothing.
func (Profile) Onto ¶
Onto is where a wavelength in the source lands in the render, evenly in the logarithm of wavelength. ok is false, and the wavelength is not mapped, when the profile does not hold it: the answer would be a number, but not one the profile means.
Onto's answer is always inside the render, short end in and long end out, so Back takes back whatever Onto gives. A wavelength a rounding below the source's long end can work out to the render's long end exactly; Onto gives the float just below it instead.
type Range ¶
type Range struct {
// contains filtered or unexported fields
}
Range is a band of radiation, by wavelength in nanometres: from its short end up to but not including its long end.
func ExtremeUltraviolet ¶
func ExtremeUltraviolet() Range
ExtremeUltraviolet is the extreme ultraviolet, under iso 21348's name, as its draft gives it: see iso. It overlaps Ultraviolet.
func Fermi ¶
func Fermi() Range
Fermi is the fermi mission's range, a little different from iso's: work on gamma ray emitting objects sometimes needs it, depending on where an observation was collected.
nasa's heasarc gives it in energies, 10 keV to 300 GeV (read on 2026-10-31); as a range of wavelengths the higher energy is the short end.
func Infrared ¶
func Infrared() Range
Infrared is the infrared, under iso 21348's name: see iso. Radio begins inside it.
func Microwave ¶
func Microwave() Range
Microwave is microwaves, under iso 21348's name: see iso. Radio begins inside it.
func NewRange ¶
NewRange is the range from a short wavelength to a long one, in nanometres. It refuses a short end not above nothing and a long end not above the short or endless, and then gives no range.
func Radio ¶
func Radio() Range
Radio is radio waves, under iso 21348's name: see iso. It begins inside Infrared and Microwave.
func Ultraviolet ¶
func Ultraviolet() Range
Ultraviolet is the ultraviolet, under iso 21348's name: see iso. It overlaps ExtremeUltraviolet.
func XRay ¶
func XRay() Range
XRay is x-rays, hard and soft together, under iso 21348's name: see iso.
func (Range) Edges ¶
Edges is the range's short and long ends, in nanometres, for a caller that draws the band or lays one range beside another.