radial_profiles.RadialProfile#
- class radial_profiles.RadialProfile(profile, name=None)[source]#
The
radial_profiles.RadialProfileclass acts as a wrapper on standard functions to represent radial profiles for different physical variables.- Parameters:
profile (
radial_profiles.RadialProfileorcallable) – The radial profile to attribute to the object. The radial profile must be callable (i.e.lambdafunction) or another instance ofradial_profiles.RadialProfile.
Methods
__init__(profile[, name])add_core(r_core, alpha)Add a core to the pre-existing profile.
built_in(name, *args)Initialize a
RadialProfilefrom the specified name and given args.cutoff(r_cut[, k])Generate a truncated form of the profile.
from_array(r, f_r)Generate a callable radial profile using an array of radii and an array of values.
from_binary(f)Load a specific instance of a
RadialProfileobject from the serialized version of the instance saved to disk.plot(rmin, rmax[, num_points, fig, ax])Make a quick plot of a profile using Matplotlib.
to_binary(f)Send the
RadialProfileinstance to a serialized binary file.Attributes
The built-in options for
RadialProfileobjects.The profile name.