Module function to load data into Sherpa
Integer_Type load_dataset([Integer_Type], {String_Type | Struct_Type |
Array_Type}, [,Array_Type, ...])
Success/Error Return Values: 1/0
Arguments:
(1) Data set number (default 1)
(2) File name, or
(2) S-Lang variable of Struct_Type (e.g., type of variable returned by
VARMM readfile()), or
(2) S-Lang variable of Array_Type
(3) More S-Lang variables of Array_Type
This function acts as a wrapper around the filetype-specific
load functions (e.g., load_ascii,
load_pha, etc.). If a file name is
provided, then the data are read in via the VARMM library
readfile() function. If a S-Lang variable of
Struct_Type is provided, then the data are loaded from the
fields of that variable. If one or more S-Lang variables
of Array_Type are provided, then the data are passed to
the functions set_axes() and set_data().
A maximum of 8 arrays, for for data of up to 7 dimensions, can
be passed as arguments of Array_Type.
See the related Sherpa command
READ
for more information.
sherpa> () = load_dataset(,"example.dat")
sherpa> () = load_dataset(1,"example.pha")
These two commands are equivalent; both load data from file
into data set 1. In the first case, data are loaded from
an ASCII file, and in the second, data are loaded from a
PHA file; load_dataset() calls the appropriate
function to read from ASCII and FITS files respectively.
sherpa> foo = readfile("example.pha")
sherpa> () = load_dataset(1,foo)
sherpa> () = load_dataset(1,foo.channels, foo.counts)
Here the data are loaded into a S-Lang variable of Struct_Type.
In the first call to load_dataset(), this S-Lang
variable is passed to the function. In the second call, two
arrays are passed to load_dataset(). The data
in ``foo.channels'' and ``foo.counts'' are used as the
x and y arrays respectively; but
the other fields of the variable ``foo'' are not used. This
means the second call to load_dataset() is not
quite the equivalent of the first.
- chandra
-
guide
- sherpa
-
autoest,
back,
berrors,
bsyserrors,
coord,
data,
dataspace,
fakeit,
feffile,
group,
guess,
is_subtracted,
load,
load_arf,
load_ascii,
load_back_from,
load_backset,
load_fitsbin,
load_image,
load_inst,
load_inst_from,
load_pha,
load_pha2,
load_rmf,
read,
set_analysis,
set_axes,
set_backscale,
set_coord,
set_data,
set_exptime,
set_subtract,
set_weights,
setback,
setdata,
subtract,
ungroup,
unsubtract,
use
|