def get_scattering_phase_function(self, x):
    '\n        Return the scattering phase function in function of wavelength for the\n        corresponding dust type (SMC or MW). The scattering phase\n        function gives the angle at which the photon scatters.\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        g: np array (float)\n            g(x) scattering phase function\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)
    g_MW = np.array([0.8, 0.783, 0.767, 0.756, 0.745, 0.736, 0.727, 0.72, 0.712, 0.707, 0.702, 0.697, 0.691, 0.685, 0.678, 0.646, 0.624, 0.597, 0.563, 0.545, 0.533, 0.511, 0.48, 0.445, 0.42])
    g_SMC = np.array([0.8, 0.783, 0.767, 0.756, 0.745, 0.736, 0.727, 0.72, 0.712, 0.707, 0.702, 0.697, 0.691, 0.685, 0.678, 0.646, 0.624, 0.597, 0.563, 0.545, 0.533, 0.511, 0.48, 0.445, 0.42])
    if (self.dust_type == 'smc'):
        g = g_SMC
    elif (self.dust_type == 'mw'):
        g = g_MW
    tab = tabular_model(1, name='Tabular1D')
    g_fit = tab(self.wvl_grid, lookup_table=g, name='albedo', bounds_error=False, fill_value=None, method='linear')
    xinterp = (10000.0 * x)
    return g_fit(xinterp)
Return the scattering phase function in function of wavelength for the
corresponding dust type (SMC or MW). The scattering phase
function gives the angle at which the photon scatters.

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

   internally microns are used

Returns
-------
g: np array (float)
    g(x) scattering phase function

Raises
------
ValueError
   Input x values outside of defined range
def get_scattering_phase_function(self, x):
    '\n        Return the scattering phase function in function of wavelength for the\n        corresponding dust type (SMC or MW). The scattering phase\n        function gives the angle at which the photon scatters.\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        g: np array (float)\n            g(x) scattering phase function\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)
    g_MW = np.array([0.8, 0.783, 0.767, 0.756, 0.745, 0.736, 0.727, 0.72, 0.712, 0.707, 0.702, 0.697, 0.691, 0.685, 0.678, 0.646, 0.624, 0.597, 0.563, 0.545, 0.533, 0.511, 0.48, 0.445, 0.42])
    g_SMC = np.array([0.8, 0.783, 0.767, 0.756, 0.745, 0.736, 0.727, 0.72, 0.712, 0.707, 0.702, 0.697, 0.691, 0.685, 0.678, 0.646, 0.624, 0.597, 0.563, 0.545, 0.533, 0.511, 0.48, 0.445, 0.42])
    if (self.dust_type == 'smc'):
        g = g_SMC
    elif (self.dust_type == 'mw'):
        g = g_MW
    tab = tabular_model(1, name='Tabular1D')
    g_fit = tab(self.wvl_grid, lookup_table=g, name='albedo', bounds_error=False, fill_value=None, method='linear')
    xinterp = (10000.0 * x)
    return g_fit(xinterp)