IntegratedDataSpace1D¶
-
class
sherpa.data.
IntegratedDataSpace1D
(filter, xlo, xhi)[source] [edit on github]¶ Bases:
sherpa.models.regrid.EvaluationSpace1D
Same as DataSpace1D, but for supporting integrated data sets.
Attributes Summary
The end of the dataset.
Return the grid representation of this dataset.
Is the dataset ascending?
Is the dataset empty?
Is the grid integrated?
Return a single array representing the dataset.
The start of the dataset.
Methods Summary
for_model
(model)Models can be defined over arbitrary evaluation spaces.
get
([filter])Get a filtered representation of this data set.
overlaps
(other)Check if this evaluation space overlaps with another :param other: :type other: EvaluationSpace1D
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
-
for_model
(model)[source] [edit on github]¶ Models can be defined over arbitrary evaluation spaces. However, at evaluation time during a fit, the model’s evaluation space and the data space will be joined together and the model will be evaluated over the joined domain. This makes sure that when the models are rebinned back to the data space the evaluation does not have to be extrapolated from the model’s evaluation space alone.
- Parameters
model (The model whose evaluation space needs to be joined with the dataset's data space.) –
- Returns
A data space that joins this data space with the model’s evaluation space. if the model does not have an evaluation space assigned to itself then self is returned.
- Return type
-
get
(filter=False)[source] [edit on github]¶ Get a filtered representation of this data set. If filter is False this object is returned.
- Parameters
filter (bool) – whether the data set should be filtered before being returned
- Returns
- Return type
-
overlaps
(other) [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
() [edit on github]¶ Utility function that returns an array of zeros that has the same shape as the dataset.
- Returns
- Return type
array
-