EvaluationSpace2D¶
- class sherpa.models.regrid.EvaluationSpace2D(x=None, y=None, xhi=None, yhi=None)[source] [edit on github]¶
Bases:
object
Class for 2D Evaluation Spaces.
An Evaluation Space is a set of data axes representing the data space over which a model can be evaluated. A 2D Evaluation Space has two axes, x and y.
- Parameters
x (array_like or None, optional) – The data array, or the low end of the x and y data bins if the dataset is “integrated”.
y (array_like or None, optional) – The data array, or the low end of the x and y data bins if the dataset is “integrated”.
xhi (array_like or None, optional) – The high end of the x and y data bins for integrated datasets.
yhi (array_like or None, optional) – The high end of the x and y data bins for integrated datasets.
Attributes Summary
The end (highest value) of the space.
The grid representation of the space.
Is the space ascending?
Is the space empty (the x axis has no elements)?
Is the space integrated?
The sizes of the x and y axes.
The start (lowest value) of the space.
Methods Summary
overlaps
(other)Check if this evaluation space overlaps with another.
Returns zeroes for each element of the space.
Attributes Documentation
- end¶
The end (highest value) of the space.
- Returns
(xend, yend) – The end of the x and y axis arrays, respectively.
- Return type
(number, number)
- grid¶
The grid representation of the space.
The x and y arrays in the grid are one-dimensional representations of the meshgrid obtained from the x and y axis arrays, as in
numpy.meshgrid(x, y)[0].ravel()
- Returns
A two element (x, y) or 4 element (x, y, xhi, yhi) tuple.
- Return type
- is_ascending¶
Is the space ascending?
- is_empty¶
Is the space empty (the x axis has no elements)?
- is_integrated¶
Is the space integrated?
- shape¶
The sizes of the x and y axes.
- start¶
The start (lowest value) of the space.
- Returns
(xstart, ystart) – The start of the x and y axis arrays, respectively.
- Return type
(number, number)
Methods Documentation
- overlaps(other)[source] [edit on github]¶
Check if this evaluation space overlaps with another.
Note that this is more stringent for 2D, as the boundaries need to coincide in this case.
- Parameters
other (EvaluationSpace2D) – The space to compare to.
- Returns
True if they overlap, False if not
- Return type
- zeros_like()[source] [edit on github]¶
Returns zeroes for each element of the space.
- Returns
A one dimensional array.
- Return type
array