def get_albedo(self, x):
    '\n        Return the albedo in function of wavelength for the corresponding\n        dust type (SMC or MW). The albedo gives the probability a photon\n        is scattered from a dust grain.\n\n        Parameters\n        ----------\n        x: float\n           expects either x in units of wavelengths or frequency\n           or assumes wavelengths in [micron]\n\n           internally microns are used\n\n        Returns\n        -------\n        albedo: np array (float)\n            alb(x) albedo\n\n        Raises\n        ------\n        ValueError\n           Input x values outside of defined range\n        '
    with u.add_enabled_equivalencies(u.spectral()):
        x_quant = u.Quantity(x, u.micron, dtype=np.float64)
    x = x_quant.value
    _test_valid_x_range(x, self.x_range, 'WG00')
    x = np.atleast_1d(x)
    alb_MW = np.array([0.32, 0.409, 0.481, 0.526, 0.542, 0.536, 0.503, 0.432, 0.371, 0.389, 0.437, 0.47, 0.486, 0.499, 0.506, 0.498, 0.502, 0.491, 0.481, 0.5, 0.473, 0.457, 0.448, 0.424, 0.4])
    alb_SMC = np.array([0.4, 0.449, 0.473, 0.494, 0.508, 0.524, 0.529, 0.528, 0.523, 0.52, 0.516, 0.511, 0.505, 0.513, 0.515, 0.498, 0.494, 0.489, 0.484, 0.493, 0.475, 0.465, 0.439, 0.417, 0.4])
    if (self.dust_type == 'smc'):
        albedo = alb_SMC
    elif (self.dust_type == 'mw'):
        albedo = alb_MW
    tab = tabular_model(1, name='Tabular1D')
    alb_fit = tab(self.wvl_grid, lookup_table=albedo, name='albedo', bounds_error=False, fill_value=None, method='linear')
    xinterp = (10000.0 * x)
    return alb_fit(xinterp)
Return the albedo in function of wavelength for the corresponding
dust type (SMC or MW). The albedo gives the probability a photon
is scattered from a dust grain.

Parameters
----------
x: float
   expects either x in units of wavelengths or frequency
   or assumes wavelengths in [micron]

   internally microns are used

Returns
-------
albedo: np array (float)
    alb(x) albedo

Raises
------
ValueError
   Input x values outside of defined range
def get_albedo(self, x):
    '\n        Return the albedo in function of wavelength for the corresponding\n        dust type (SMC or MW). The albedo gives the probability a photon\n        is scattered from a dust grain.\n\n        Parameters\n        ----------\n        x: float\n           expects either x in units of wavelengths or frequency\n           or assumes wavelengths in [micron]\n\n           internally microns are used\n\n        Returns\n        -------\n        albedo: np array (float)\n            alb(x) albedo\n\n        Raises\n        ------\n        ValueError\n           Input x values outside of defined range\n        '
    with u.add_enabled_equivalencies(u.spectral()):
        x_quant = u.Quantity(x, u.micron, dtype=np.float64)
    x = x_quant.value
    _test_valid_x_range(x, self.x_range, 'WG00')
    x = np.atleast_1d(x)
    alb_MW = np.array([0.32, 0.409, 0.481, 0.526, 0.542, 0.536, 0.503, 0.432, 0.371, 0.389, 0.437, 0.47, 0.486, 0.499, 0.506, 0.498, 0.502, 0.491, 0.481, 0.5, 0.473, 0.457, 0.448, 0.424, 0.4])
    alb_SMC = np.array([0.4, 0.449, 0.473, 0.494, 0.508, 0.524, 0.529, 0.528, 0.523, 0.52, 0.516, 0.511, 0.505, 0.513, 0.515, 0.498, 0.494, 0.489, 0.484, 0.493, 0.475, 0.465, 0.439, 0.417, 0.4])
    if (self.dust_type == 'smc'):
        albedo = alb_SMC
    elif (self.dust_type == 'mw'):
        albedo = alb_MW
    tab = tabular_model(1, name='Tabular1D')
    alb_fit = tab(self.wvl_grid, lookup_table=albedo, name='albedo', bounds_error=False, fill_value=None, method='linear')
    xinterp = (10000.0 * x)
    return alb_fit(xinterp)