photo module¶
Methods required for specifying the irradiance values at the top of the atmosphere as well as the photodissociation cross sections.
-
photo.
blackbody_lambda
(in_x, temperature)¶ Like
blackbody_nu()
but for \(B_{\lambda}(T)\).
-
photo.
blackbody_nu
(in_x, temperature)¶ Calculate blackbody flux per steradian, \(B_{\nu}(T)\).
Note
Use numpy.errstate to suppress Numpy warnings, if desired.
Warning
Output values might contain
nan
andinf
.Parameters
- in_x : number, array-like, or ~astropy.units.Quantity
- Frequency, wavelength, or wave number. If not a Quantity, it is assumed to be in Hz.
- temperature : number, array-like, or ~astropy.units.Quantity
- Blackbody temperature. If not a Quantity, it is assumed to be in Kelvin.
Returns
- flux : ~astropy.units.Quantity
- Blackbody monochromatic flux in \(erg \; cm^{-2} s^{-1} Hz^{-1} sr^{-1}\).
Raises
- ValueError
- Invalid temperature.
- ZeroDivisionError
- Wavelength is zero (when converting to frequency).
-
photo.
getAverageSigmas
(wave, sigmas)¶ Average the cross sections across the bins specified in settings.wavelengthHigh and settings.wavelengthLow
wave: input array specifying the bins to average to
sigmas: input array specifying the cross sections
-
photo.
getBBspectrum
()¶ Get blackbody irradiance based on parameters in input file.
-
photo.
getIrradiance
()¶ Wrapper function to pull irradiance data using method specified in input file
-
photo.
getIrradianceData
()¶ Get irradiance based on data in file specified in input file.
-
photo.
getPhotoCrosssections
()¶ Fill the settings.photocrosssections arrays with appropriate values.
Data taken from input/*crosssections.dat files from phidrates.space.swri.edu
-
photo.
initIrradiance
()¶ Integrate the irradiance to the bins specified in settings
-
photo.
plotCrosssections
(wave, sigma, species=None)¶ Plotting routine for quickly checking crosssections
-
photo.
scaleIrradiance
(irr)¶ Scales the irradiance based on the orbital distance.
-
photo.
updateTemperature
()¶ Update the temperature using the method specified in the input file.