SpectralShapeOne

class glotaran.builtin.megacomplexes.spectral.shape.SpectralShapeOne(*, label: str, type: str = 'one')[source]

Bases: SpectralShape

A constant spectral shape with value 1

Method generated by attrs for class SpectralShapeOne.

Attributes Summary

type

label

Methods Summary

calculate

calculate calculates the shape.

get_item_type

Get the type string.

get_item_type_class

Get the type for a type string.

get_item_types

Get all type strings.

Methods Documentation

calculate(axis: ndarray) ndarray[source]

calculate calculates the shape.

Parameters:

axis (np.ndarray) – The axis to calculate the shape on.

Returns:

shape

Return type:

numpy.ndarray

classmethod get_item_type() str

Get the type string.

Return type:

str

classmethod get_item_type_class(item_type: str) Type

Get the type for a type string.

Parameters:

item_type (str) – The type string.

Return type:

Type

classmethod get_item_types() list[str]

Get all type strings.

Return type:

list[str]

label: str
type: str