    Create a sherpa data object from a file.

unpack_data(filename, *args, **kwargs)

The object returned by `unpack_data` can be used in a

`set_data` call. The data types supported are those supported by `unpack_pha` , `unpack_image` , `unpack_table` , and `unpack_ascii` .

Create a data object from the contents of the file "src.dat" and use it to create a Sherpa data set called "src":

>>> dat = unpack_data('src.dat') >>> set_data('src', dat)

PARAMETERS

The parameters for this function are:

Parameter
Definition
filename
A file name or a data structure representing the data to use, as used by the I/O backend in use by Sherpa: e.g. a

phacratedataset , tablecrate , or imagecrate for crates, as used by CIAO, or a list of AstroPy HDU objects.
args
The arguments supported by `unpack_pha` , `unpack_image` ,

`unpack_table` , and `unpack_ascii` .
kwargs
The keyword arguments supported by `unpack_pha` , `unpack_image` ,

`unpack_table` , and `unpack_ascii` .

The return value from this function is:

The data set object.

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023