EvaluationSpace2D
- class sherpa.models.regrid.EvaluationSpace2D(x=None, y=None, xhi=None, yhi=None)[source] [edit on github]
Bases:
objectClass 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, yarray_like or
None,optional The data array, or the low end of the x and y data bins if the dataset is “integrated”. These are not required to be the same length.
- xhi, yhiarray_like or
None,optional The high end of the x and y data bins for integrated datasets.
- x, yarray_like or
- Attributes:
endThe end (highest value) of the space.
gridThe grid representation of the space.
is_ascendingIs the space ascending?
is_emptyIs the space empty (the x axis has no elements)?
is_integratedIs the space integrated?
shapeThe sizes of the x and y axes.
startThe start (lowest value) of the space.
Methods
overlaps(other)Check if this evaluation space overlaps with another.
Returns zeroes for each element of the space.
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)(
number,number) The end of the x and y axis arrays, respectively.
- (xend, yend)(
- 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:
tupleA two element (x, y) or 4 element (x, y, xhi, yhi) tuple.
- 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)(
number,number) The start of the x and y axis arrays, respectively.
- (xstart, ystart)(
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.
- other
- Returns:
- bool
True if they overlap, False if not
- zeros_like()[source] [edit on github]
Returns zeroes for each element of the space.
- Returns:
arrayA one dimensional array.