EvaluationSpace1D

class sherpa.models.regrid.EvaluationSpace1D(x=None, xhi=None)[source] [edit on github]

Bases: object

Class for 1D Evaluation Spaces.

An Evaluation Space is a set of data axes representing the data space over which a model can be evaluated. A 1D Evaluation Space has only one axis.

Parameters:
xarray_like or None, optional

The data array, or the low end of the data bins if the dataset is “integrated”

xhiarray_like or None, optional

The high end of the data bins for integrated datasets.

Attributes:
end

The end (highest value) of the space.

grid

The grid representation of the space.

is_ascending

Is the space ascending?

is_empty

Is the space empty (the x axis has no elements)?

is_integrated

Is the space integrated?

midpoint_grid

The mid-points of the space.

start

The start (lowest value) of the space.

Methods

overlaps(other)

Check if this evaluation space overlaps with another.

zeros_like()

Returns zeroes for each element of the space.

Attributes Summary

end

The end (highest value) of the space.

grid

The grid representation of the space.

is_ascending

Is the space ascending?

is_empty

Is the space empty (the x axis has no elements)?

is_integrated

Is the space integrated?

midpoint_grid

The mid-points of the space.

start

The start (lowest value) of the space.

Methods Summary

overlaps(other)

Check if this evaluation space overlaps with another.

zeros_like()

Returns zeroes for each element of the space.

Attributes Documentation

end

The end (highest value) of the space.

grid

The grid representation of the space.

Returns:
tuple

A tuple representing the x axis. The tuple will contain two arrays if the dataset is integrated, one otherwise.

is_ascending

Is the space ascending?

is_empty

Is the space empty (the x axis has no elements)?

is_integrated

Is the space integrated?

midpoint_grid

The mid-points of the space.

For non-integrated spaces this returns the X axis.

Returns:
array

Return the average point of the bins of integrated axes, for each bin, or the non-integrated x axis array.

start

The start (lowest value) of the space.

Methods Documentation

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

Check if this evaluation space overlaps with another.

Parameters:
otherEvaluationSpace1D

The space to compare to.

Returns:
bool

True if they overlap, False if not

zeros_like()[source] [edit on github]

Returns zeroes for each element of the space.

Returns:
array

A one-dimensional array.