Axis

class sherpa.models.regrid.Axis(lo, hi)[source] [edit on github]

Bases: object

Class for representing N-D axes objects, for both “integrated” and “non-integrated” datasets

Attributes Summary

end

Ending point of the data axis

is_ascending

Is the axis ascending?

is_empty

returns

Whether the axis is empty, i.e. if lo is None or an empty array.

is_integrated

Is the axis integrated?

size

The size of the axis.

start

Starting point of the data axis

Methods Summary

overlaps(other)

Check if this axis overlaps with another :param other: :type other: Axis

Attributes Documentation

end

Ending point of the data axis

Returns

If the data axis is ascending the end boundary is the last element of the hi array when the axis is integrated, otherwise it’s the last element of lo.

Conversely, for descending axes, the last element is either the first element of the hi array or of the lo array, depending on whether the axis is integrated or not, respectively.

Return type

number

is_ascending

Is the axis ascending?

Returns

The axis is ascending if the elements in lo are sorted in ascending order. Only the first and last elements are checked, and it is assumed that the elements are sorted.

Return type

bool

is_empty
Returns

Whether the axis is empty, i.e. if lo is None or an empty array.

Return type

bool

is_integrated

Is the axis integrated?

Returns

The axis is integrated is hi is not None and not empty.

Return type

bool

size

The size of the axis.

Returns

The size of the axis.

Return type

number

start

Starting point of the data axis

Returns

The first element in lo if the axis is ascending, or the last element otherwise.

Return type

number

Methods Documentation

overlaps(other)[source] [edit on github]

Check if this axis overlaps with another :param other: :type other: Axis

Returns

True if they overlap, False if not

Return type

bool