LinearPhaseFunc¶
- class sbpy.photometry.LinearPhaseFunc(H=<Quantity 5. mag>, S=<Quantity 0.04 mag / deg>, **kwargs)[source] [edit on github]¶
Bases:
DiskIntegratedPhaseFuncLinear 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:
- radius
astropy.units.Quantity, optional Radius of object. Required if conversion between magnitude and reflectance is involved.
- wfb
Quantity,SpectralElement,str Wavelengths, frequencies, or bandpasses. Bandpasses may be a filter name (string). Required if conversion between magnitude and reflectance is involved.
- **kwargsoptional
parametersacceptedby astropy.modeling.Model.__init__()
- radius
Attributes Summary
Names of the parameters that describe models of this type.
Methods Summary
evaluate(a, H, S)fit_deriv(a, H, S)Attributes Documentation
- H = Parameter('H', value=5.0, unit=mag)¶
- S = Parameter('S', value=0.04, unit=mag / deg)¶
- 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
Parameterattributes defined in the class body.
Methods Documentation
- static evaluate(a, H, S)[source] [edit on github]¶
- static fit_deriv(a, H, S)[source] [edit on github]¶