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.
Attributes Summary
The enf of the dataset.
Return the grid representation of this dataset.
Is the dataset ascending?
Is the dataset empty?
Is the grid integrated?
The start of the dataset.
Methods Summary
overlaps
(other)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.
Utility function that returns an array of zeros that has the same shape as the dataset.
Attributes Documentation
-
end
¶ The enf of the dataset.
- Returns
The end of the x and y axis arrays, respectively
- Return type
tuple
-
grid
¶ Return the grid representation of this dataset. The grid is always a tuple, even if the dataset is 1-D and not integrated. This is due to the existing architecture of Sherpa’s model classes and the fact that there is no signature difference among 1-D and 2-D models, as 1-D models can receive 1 or 2 arrays and 2-D models can receive 2 or 4 arrays.
The x and y arrays in the grid are one-dimentional representations of the meshgrid obtained from the x and y axis arrays, as in numpy.meshgrid(x, y)[0].ravel()
- Returns
A tuple representing the x and y axes. The tuple will contain four arrays if the dataset is integrated, two otherwise.
- Return type
tuple
-
is_ascending
¶ Is the dataset ascending?
- Returns
True if the axis is ascending, False otherwise, for the x and y axes respectively
- Return type
tuple(bool)
-
is_empty
¶ Is the dataset empty?
- Returns
True if the x axis or y axis are empty, False otherwise
- Return type
bool
-
is_integrated
¶ Is the grid integrated?
- Returns
True if the axes are integrated, False otherwise.
- Return type
bool
-
shape
¶
-
start
¶ The start of the dataset.
- Returns
The start of the x and y axis arrays, respectively
- Return type
tuple
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) –
- Returns
True if they overlap, False if not
- Return type
bool
-
zeros_like
()[source] [edit on github]¶ Utility function that returns an array of zeros that has the same shape as the dataset.
- Returns
- Return type
array
-