convert_flux | R Documentation |
Conversion routines that by default transform back and forth between spectral flux specified in erg/s / cm^2 / Angstrom units and erg/s / cm^2 / Hz units. The former is the more typical way to plot spectral flux (e.g. galaxy spectra etc), whilst the latter is what is actually needed in order to compute AB magnitudes, CGS flux and Janskys.
convert_wave2freq(flux_wave, wave, wavefac = 1e-10, freqfac = 1)
convert_freq2wave(flux_freq, wave, wavefac = 1e-10, freqfac = 1)
flux_wave |
Numeric vector; flux in erg/s / cm^2 / Wavelength spectral flux density units. |
flux_freq |
Numeric vector; flux in erg/s / cm^2 / Frequency spectral flux density units. |
wave |
Numeric vector; wavelength in units of wavefac. |
wavefac |
Numeric scalar; specified unit type converting 1m to chosen unit. Default of 1e-10 means Angstrom, whilst 1e-9 would be nm etc. |
freqfac |
Numeric scalar; specified unit type converting 1Hz to chosen unit. Default of 1 means Hz. |
Numeric vector; the converted spectral flux.
Aaron Robotham
photom
, magABcalc
, getfilt
, SFHfunc
fluxBC03=Lum2Flux(BC03lr$Wave, BC03lr$Zspec[[5]][161,]*1e10)
#The below should give the same answers (6.515128e-28):
CGScalc(fluxBC03)
bandpass(fluxBC03[,1], (1e-10*fluxBC03[,2]*fluxBC03[,1]^2)/299792458,
filter=getfilt('r_VST'))
bandpass(fluxBC03[,1], convert_wave2freq(fluxBC03[,2], fluxBC03[,1]),
filter=getfilt('r_VST'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.