solar_fluxd¶
- class sbpy.calib.solar_fluxd[source]¶
Bases:
FluxdScienceState
Get/set the
sbpy
solar flux density.To set the current values:
>>> from sbpy.calib import solar_fluxd >>> import sbpy.units as sbu >>> with solar_fluxd.set({'V': -26.76 * sbu.VEGAmag}): ... pass
The units must be flux density per unit wavelength or per unit frequency.
To retrieve the current values:
>>> import sbpy.units as sbu >>> with solar_fluxd.set({'V': -26.76 * sbu.VEGAmag}): ... S = solar_fluxd.get() ... print(S['V']) -26.76 mag(VEGA)
Multiple values are allowed:
>>> import astropy.units as u >>> solar_fluxd.set({ ... 'PS1_g': -26.54 * u.ABmag, ... 'PS1_r': -26.93 * u.ABmag, ... 'PS1_i': -27.05 * u.ABmag ... })
When wavelength is required, specify
bandpass(lambda eff)
for effective wavelength and/orbandpass(lambda pivot)
for pivot wavelength:>>> import sbpy.units as sbu >>> solar_fluxd.set({ ... 'V': -26.76 * sbu.VEGAmag, ... 'V(lambda eff)': 548 * u.nm, ... 'V(lambda pivot)': 551 * u.nm ... })
Methods Summary
get
()Get the current science state value.
set
(value)Set the current science state value.
validate
(value)Validate the value and convert it to its native type, if necessary.
Methods Documentation
- classmethod get()¶
Get the current science state value.
- classmethod set(value)¶
Set the current science state value.
- classmethod validate(value)¶
Validate the value and convert it to its native type, if necessary.