IntegratedDataSpace1D
- class sherpa.data.IntegratedDataSpace1D(filter, xlo, xhi)[source] [edit on github]
Bases:
EvaluationSpace1DSame as DataSpace1D, but for supporting integrated data sets.
- 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?
midpoint_gridThe mid-points of the space.
startThe start (lowest value) of the space.
Methods
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.
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 mid-points of the space.
The start (lowest value) of the space.
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.
Returns zeroes for each element of the space.
Attributes Documentation
- end
The end (highest value) of the space.
- grid
The grid representation of the space.
- Returns:
tupleA tuple representing the x axis. The tuple will contain two arrays if the dataset is integrated, one otherwise.
- is_ascending
Is the space ascending?
- is_empty
Is the space empty (the x axis has no elements)?
- is_integrated
Is the space integrated?
- midpoint_grid
The mid-points of the space.
For non-integrated spaces this returns the X axis.
- Returns:
arrayReturn the average point of the bins of integrated axes, for each bin, or the non-integrated x axis array.
- start
The start (lowest value) of the space.
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
Themodelwhoseevaluationspaceneedstobejoinedwiththedataset’sdataspace.
- model
- Returns:
IntegratedDataSpace1DA 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
selfis returned.
- get(filter=False)[source] [edit on github]
Get a filtered representation of this data set. If
filterisFalsethis object is returned.- Parameters:
- filterbool
whether the data set should be filtered before being returned
- Returns:
- overlaps(other) [edit on github]
Check if this evaluation space overlaps with another.
- Parameters:
- other
EvaluationSpace1D The space to compare to.
- other
- Returns:
- bool
True if they overlap, False if not
- zeros_like() [edit on github]
Returns zeroes for each element of the space.
- Returns:
arrayA one-dimensional array.