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.
Attributes Summary
end
The end of the dataset. grid
Return the grid representation of this dataset. is_ascending
Is the dataset ascending? is_empty
Is the dataset empty? is_integrated
Is the grid integrated? midpoint_grid
Return a single array representing the dataset. start
The start of the dataset. Methods Summary
join
(other)Join this dataset with another one. overlaps
(other)Check if this evaluation space overlaps with another :param other: :type other: EvaluationSpace1D zeros_like
()Utility function that returns an array of zeros that has the same shape as the dataset. Attributes Documentation
-
end
¶ The end of the dataset.
Returns: The end of the x axis array Return type: number
-
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.
Returns: A tuple representing the x axis. The tuple will contain two arrays if the dataset is integrated, one otherwise. Return type: tuple
-
is_ascending
¶ Is the dataset ascending?
Returns: True if the x axis is ascending, False otherwise. Return type: bool
-
is_empty
¶ Is the dataset empty?
Returns: True if the x axis is empty, False otherwise Return type: bool
-
is_integrated
¶ Is the grid integrated?
Returns: True if the x axis is integrated, False otherwise. Return type: bool
-
midpoint_grid
¶ Return a single array representing the dataset.
Returns: Return the average point of the bins of integrated axes, for each bin, or the non-integrated x axis array. Return type: array
-
start
¶ The start of the dataset.
Returns: The start of the x axis array Return type: number
Methods Documentation
-
join
(other)[source] [edit on github]¶ Join this dataset with another one. The axes are sorted, unique elements are selected and then concatenated. The selection of unique elements is required to make sure Sherpa’s interpolators can deal with the resulting dataset’s space.
Parameters: other (EvaluationSpace1D) – The dataset to join with self. Returns: Return type: EvaluationSpace1D
-
overlaps
(other)[source] [edit on github]¶ Check if this evaluation space overlaps with another :param other: :type other: EvaluationSpace1D
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
-