solar_fluxd

class sbpy.calib.solar_fluxd[source] [edit on github]

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/or bandpass(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)

Methods Documentation

classmethod get() [edit on github]

Get the current science state value.

classmethod set(value) [edit on github]

Set the current science state value.

classmethod validate(value) [edit on github]