radial_profiles.RadialProfile#

class radial_profiles.RadialProfile(profile, name=None)[source]#

The radial_profiles.RadialProfile class acts as a wrapper on standard functions to represent radial profiles for different physical variables.

Parameters:

profile (radial_profiles.RadialProfile or callable) – The radial profile to attribute to the object. The radial profile must be callable (i.e. lambda function) or another instance of radial_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 RadialProfile from 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 RadialProfile object 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 RadialProfile instance to a serialized binary file.

Attributes

builtin

The built-in options for RadialProfile objects.

name

The profile name.