debrispy.sigma_a

Classes

SigmaA(a_min, a_max[, sigma0, profile_type])

Represents a surface density profile, Sigma(a), as a function of semi-major axis.

class debrispy.sigma_a.SigmaA(a_min: float, a_max: float, sigma0: float = 1.0, profile_type: str = 'power_law', **kwargs)[source]

Bases: object

Represents a surface density profile, Sigma(a), as a function of semi-major axis.

a_min(float)
Type:

Minimum value of the semi-major axis range.

a_max(float)
Type:

Maximum value of the semi-major axis range.

sigma0(float)
Type:

Base amplitude (normalization) of the profile. Defaults to 1.0.

profile_type(str)
Type:

Type of profile (‘power_law’, ‘gaussian’, ‘step_up’, ‘step_down’, ‘custom’).

VALID_PROFILES = ['power_law', 'gaussian', 'step_up', 'step_down', 'custom']
compute_area() float[source]

Compute the integral Sigma(a) over [a_min, a_max].

Returns:

float

Return type:

Total area under the surface density curve.

get_values(a_vals: float | ndarray[tuple[int, ...], dtype[float64]]) ndarray[tuple[int, ...], dtype[float64]][source]

Calculate surface density at the given semi-major axis values.

Parameters:

array-like) (a_vals (float or)

Returns:

ndarray

Return type:

Surface density values at the specified semi-major axis values.

plot(a_vals: ndarray[tuple[int, ...], dtype[float64]] | None = None, num_points: int = 500, save: bool = False, filename: str | None = None, figsize: Tuple[int, int] = (8, 6), show: bool = True, ax: Axes | None = None, **plot_kwargs) Tuple[Figure, Axes][source]

Plot the surface density profile with flexible matplotlib customization.

Parameters:
  • (array-like (a_vals) – If None, use cached values or generate new ones. Defaults to None.

  • optional) (Existing axes to plot on. If None,) – If None, use cached values or generate new ones. Defaults to None.

  • (int (num_points) – Defaults to 500.

  • optional) – Defaults to 500.

  • (bool (show)

  • optional)

  • (str (filename) – will be generated. Defaults to None.

  • optional) – will be generated. Defaults to None.

  • (tuple (figsize) – Defaults to (8, 6).

  • optional) – Defaults to (8, 6).

  • (bool – Defaults to True.

  • optional) – Defaults to True.

  • (matplotlib.axes.Axes (ax) – a new figure and axes will be created. Defaults to None.

  • optional) – a new figure and axes will be created. Defaults to None.

  • **plot_kwargs (Additional keyword arguments passed to plt.plot().) –

    Examples include:
    • color: Color of the line

    • linestyle: Style of the line (‘-’, ‘–’, ‘-.’, ‘:’)

    • linewidth or lw: Width of the line

    • marker: Point marker style (‘o’, ‘s’, ‘^’, etc.)

    • alpha: Transparency of the line

    • label: Label for the legend.

Returns:

tuple

Return type:

Figure and axes objects for further customization if needed.