radial_profiles.RadialProfile.from_array#

classmethod RadialProfile.from_array(r, f_r)[source]#

Generate a callable radial profile using an array of radii and an array of values.

Parameters:
  • r (array-like) – Array of radii in kpc.

  • f_r (array-like) – Array of profile values in the appropriate units.

Returns:

The corresponding radial profile.

Return type:

RadialProfile

Notes

This function uses scipy.interpolate.UnivariateSpline to generate a continuous spectrum. May lead to problematic behavior beyond the intended radii.