LinearPhaseFunc

class sbpy.photometry.LinearPhaseFunc(H, S, **kwargs)[source]

Bases: DiskIntegratedPhaseFunc

Linear phase function model

Examples

>>> # Define a linear phase function model with absolute magnitude
>>> # H = 5 and slope = 0.04 mag/deg = 2.29 mag/rad
>>> import astropy.units as u
>>> from sbpy.calib import solar_fluxd
>>> from sbpy.photometry import LinearPhaseFunc
>>>
>>> linear_phasefunc = LinearPhaseFunc(5 * u.mag, 0.04 * u.mag/u.deg,
...     radius = 300 * u.km, wfb = 'V')
>>> with solar_fluxd.set({'V': -26.77 * u.mag}):
...     pha = np.linspace(0, 180, 200) * u.deg
...     mag = linear_phasefunc.to_mag(pha)
...     ref = linear_phasefunc.to_ref(pha)
...     geomalb = linear_phasefunc.geomalb
...     phaseint = linear_phasefunc.phaseint
...     bondalb = linear_phasefunc.bondalb
>>> print('Geometric albedo is {0:.3}'.format(geomalb))
Geometric albedo is 0.0487
>>> print('Bond albedo is {0:.3}'.format(bondalb))
Bond albedo is 0.0179
>>> print('Phase integral is {0:.3}'.format(phaseint))
Phase integral is 0.367

Initialize DiskIntegratedPhaseFunc

Parameters:
radiusastropy.units.Quantity, optional

Radius of object. Required if conversion between magnitude and reflectance is involved.

wfbQuantity, SpectralElement, string

Wavelengths, frequencies, or bandpasses. Bandpasses may be a filter name (string). Required if conversion between magnitude and reflectance is involved.

**kwargsoptional parameters accepted by

astropy.modeling.Model.__init__()

Attributes Summary

H

S

input_units

param_names

Names of the parameters that describe models of this type.

Methods Summary

evaluate(a, H, S)

Evaluate the model on some input variables.

fit_deriv(a, H, S)

Attributes Documentation

H
S
input_units = {'x': Unit("deg")}
param_names = ('H', 'S')

Names of the parameters that describe models of this type.

The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.

When defining a custom model class the value of this attribute is automatically set by the Parameter attributes defined in the class body.

Methods Documentation

static evaluate(a, H, S)[source]

Evaluate the model on some input variables.

static fit_deriv(a, H, S)[source]