The sherpa.data module¶
Tools for creating, storing, inspecting, and manipulating data sets.
The main classes for representing data sets are Data1D
,
Data1DInt
, and Data2D
, to handle (x, y), (xlo,
xhi, y), and (x1, x2, y) data, although there are also
more-specialized cases, such as Data1DAsymmetricErrs
. These
classes build on the Data
class, which supports dynamic
filtering of data - to select a subset of the data range - as well as
data access and model evaluation to match the data range.
The Filter
class is used to handle data filtering - that
is, to combine filters such as selecting the range a to b (notice
)
and hiding the range c to d (ignore
). This is used with the
DataSpace1D
and DataSpace2D
classes to handle
evaluating models on different grids to the data, and then converting
back to the data space, whether by rebinnig or interpolation.
Notebook support¶
The Data objects support the rich display protocol of IPython, with HTML display of a table of information highlighting the relevant data. Examples can be found at [NoteBook].
References
Examples
Create a data set representing the independent axis (x
) and
dependent axis (y
) then filter to select only those values between
500-520 and 530-700:
>>> d1 = Data1D('example', x, y)
>>> d1.notice(500, 700)
>>> d1.ignore(520, 530)
Classes
|
Data class for generic, N-Dimensional data sets, where N depends on the number of independent axes passed during initialization. |
|
|
|
1-D data set with asymmetric errors |
|
1-D integrated data set |
|
|
|
2-D integrated data set |
|
Store multiple data sets. |
|
Base class for all data classes. |
|
Class for representing 1-D Data Space. |
|
Class for representing 2-D Data Spaces. |
|
Class for representing arbitray N-Dimensional data domains |
|
A class for representing filters of N-Dimentional datasets. |
|
Same as DataSpace1D, but for supporting integrated data sets. |
|
Same as DataSpace2D, but for supporting integrated data sets. |