DataARF¶
-
class
sherpa.astro.data.
DataARF
(name, energ_lo, energ_hi, specresp, bin_lo=None, bin_hi=None, exposure=None, header=None, ethresh=None)[source] [edit on github]¶ Bases:
sherpa.astro.data.DataOgipResponse
ARF data set.
The ARF format is described in OGIP documents [1] and [2].
Parameters: - name (str) – The name of the data set; often set to the name of the file containing the data.
- energ_hi, specresp (energ_lo,) – The values of the ENERG_LO, ENERG_HI, and SPECRESP columns for the ARF. The ENERG_HI values must be greater than the ENERG_LO values for each bin, and the energy arrays must be in increasing or decreasing order.
- bin_hi (bin_lo,) –
- exposure (number or None, optional) – The exposure time for the ARF, in seconds.
- header (dict or None, optional) –
- ethresh (number or None, optional) – If set it must be greater than 0 and is the replacement value to use if the lowest-energy value is 0.0.
Raises: sherpa.utils.err.DataErr
– This is raised if the energy arrays do not follow some of the OGIP standards.Notes
There is limited checking that the ARF matches the OGIP standard, but as there are cases of released data products that do not follow the standard, these checks can not cover all cases.
References
[1] “The Calibration Requirements for Spectral Analysis (Definition of RMF and ARF file formats)”, https://heasarc.gsfc.nasa.gov/docs/heasarc/caldb/docs/memos/cal_gen_92_002/cal_gen_92_002.html [2] “The Calibration Requirements for Spectral Analysis Addendum: Changes log”, https://heasarc.gsfc.nasa.gov/docs/heasarc/caldb/docs/memos/cal_gen_92_002a/cal_gen_92_002a.html Attributes Summary
filter
Filter for dependent variable mask
Mask array for dependent variable specresp
Methods Summary
apply_arf
(src, *args, **kwargs)Fold the source array src through the ARF and return the result apply_filter
(data)eval_model
(modelfunc)eval_model_to_fit
(modelfunc)get_bounding_mask
()get_dep
([filter])Return the dependent axis of a data set. get_dims
([filter])get_error
([filter, staterrfunc])Return the total error on the dependent variable. get_filter
([format, delim])get_filter_expr
()get_img
([yfunc])Return 1D dependent variable as a 1 x N image get_imgerr
()Return total error in dependent variable as an image get_indep
([filter])Return the independent axes of a data set. get_staterror
([filter, staterrfunc])Return the statistical error on the dependent axis of a data set. get_syserror
([filter])Return the statistical error on the dependent axis of a data set. get_x
([filter, model, use_evaluation_space])Return linear view of independent axis/axes get_x0
([filter])Return first dimension in 2-D view of independent axis/axes get_x0label
()Return label for first dimension in 2-D view of independent axis/axes get_x1
([filter])Return second dimension in 2-D view of independent axis/axes get_x1label
()Return label for second dimension in 2-D view of independent axis/axes get_xerr
([filter, model])Return linear view of bin size in independent axis/axes get_xlabel
()Return label for linear view of independent axis/axes get_y
([filter, yfunc, use_evaluation_space])Return dependent axis in N-D view of dependent variable get_yerr
([filter, staterrfunc])Return errors in dependent axis in N-D view of dependent variable get_ylabel
()Return label for dependent axis in N-D view of dependent variable ignore
(*args, **kwargs)notice
([bin_mask])set_dep
(val)Set the dependent variable values to_component_plot
([yfunc, staterrfunc])to_contour
([yfunc])to_fit
([staterrfunc])to_guess
()to_plot
([yfunc, staterrfunc])Attributes Documentation
-
filter
¶ Filter for dependent variable
-
mask
¶ Mask array for dependent variable
-
specresp
¶
Methods Documentation
-
apply_arf
(src, *args, **kwargs)[source] [edit on github]¶ Fold the source array src through the ARF and return the result
-
apply_filter
(data) [edit on github]¶
-
eval_model
(modelfunc) [edit on github]¶
-
eval_model_to_fit
(modelfunc) [edit on github]¶
-
get_bounding_mask
() [edit on github]¶
-
get_dep
(filter=False)[source] [edit on github]¶ Return the dependent axis of a data set.
Parameters: filter (bool, optional) – Should the filter attached to the data set be applied to the return value or not. The default is False. Returns: axis – The dependent axis values for the data set. This gives the value of each point in the data set. Return type: array See also
get_indep()
- Return the independent axis of a data set.
get_error()
- Return the errors on the dependent axis of a data set.
get_staterror()
- Return the statistical errors on the dependent axis of a data set.
get_syserror()
- Return the systematic errors on the dependent axis of a data set.
-
get_dims
(filter=False) [edit on github]¶
-
get_error
(filter=False, staterrfunc=None) [edit on github]¶ Return the total error on the dependent variable.
Parameters: - filter (bool, optional) – Should the filter attached to the data set be applied to the return value or not. The default is False.
- staterrfunc (function) – If no statistical error has been set, the errors will be calculated by applying this function to the dependent axis of the data set.
Returns: axis – The error for each data point, formed by adding the statistical and systematic errors in quadrature.
Return type: array or None
See also
get_dep()
- Return the independent axis of a data set.
get_staterror()
- Return the statistical errors on the dependent axis of a data set.
get_syserror()
- Return the systematic errors on the dependent axis of a data set.
-
get_filter
(format='%.4f', delim=':') [edit on github]¶
-
get_filter_expr
() [edit on github]¶
-
get_img
(yfunc=None) [edit on github]¶ Return 1D dependent variable as a 1 x N image
-
get_imgerr
() [edit on github]¶ Return total error in dependent variable as an image
-
get_indep
(filter=False)[source] [edit on github]¶ Return the independent axes of a data set.
Parameters: filter (bool, optional) – Should the filter attached to the data set be applied to the return value or not. The default is False. Returns: axis – The independent axis values for the data set. This gives the coordinates of each point in the data set. Return type: tuple of arrays See also
get_dep()
- Return the dependent axis of a data set.
-
get_staterror
(filter=False, staterrfunc=None) [edit on github]¶ Return the statistical error on the dependent axis of a data set.
Parameters: - filter (bool, optional) – Should the filter attached to the data set be applied to the return value or not. The default is False.
- staterrfunc (function) – If no statistical error has been set, the errors will be calculated by applying this function to the dependent axis of the data set.
Returns: axis – The statistical error for each data point. A value of None is returned if the data set has no statistical error array and staterrfunc is None.
Return type: array or None
See also
get_error()
- Return the errors on the dependent axis of a data set.
get_indep()
- Return the independent axis of a data set.
get_syserror()
- Return the systematic errors on the dependent axis of a data set.
-
get_syserror
(filter=False) [edit on github]¶ Return the statistical error on the dependent axis of a data set.
Parameters: filter (bool, optional) – Should the filter attached to the data set be applied to the return value or not. The default is False. Returns: axis – The systematic error for each data point. A value of None is returned if the data set has no systematic errors. Return type: array or None See also
get_error()
- Return the errors on the dependent axis of a data set.
get_indep()
- Return the independent axis of a data set.
get_staterror()
- Return the statistical errors on the dependent axis of a data set.
-
get_x
(filter=False, model=None, use_evaluation_space=False) [edit on github]¶ Return linear view of independent axis/axes
-
get_x0
(filter=False) [edit on github]¶ Return first dimension in 2-D view of independent axis/axes
-
get_x0label
() [edit on github]¶ Return label for first dimension in 2-D view of independent axis/axes
-
get_x1
(filter=False) [edit on github]¶ Return second dimension in 2-D view of independent axis/axes
-
get_x1label
() [edit on github]¶ Return label for second dimension in 2-D view of independent axis/axes
-
get_xerr
(filter=False, model=None) [edit on github]¶ Return linear view of bin size in independent axis/axes
-
get_xlabel
()[source] [edit on github]¶ Return label for linear view of independent axis/axes
-
get_y
(filter=False, yfunc=None, use_evaluation_space=False) [edit on github]¶ Return dependent axis in N-D view of dependent variable
-
get_yerr
(filter=False, staterrfunc=None) [edit on github]¶ Return errors in dependent axis in N-D view of dependent variable
-
get_ylabel
()[source] [edit on github]¶ Return label for dependent axis in N-D view of dependent variable
-
ignore
(*args, **kwargs) [edit on github]¶
-
notice
(bin_mask=None)[source] [edit on github]¶
-
set_dep
(val) [edit on github]¶ Set the dependent variable values
-
to_component_plot
(yfunc=None, staterrfunc=None) [edit on github]¶
-
to_contour
(yfunc=None) [edit on github]¶
-
to_fit
(staterrfunc=None) [edit on github]¶
-
to_guess
() [edit on github]¶
-
to_plot
(yfunc=None, staterrfunc=None) [edit on github]¶