Module function to load ASCII data into Sherpa
Integer_Type load_ascii([Integer_Type], {String_Type | Struct_Type})
Integer_Type load_bascii([Integer_Type], {String_Type | Struct_Type})
Success/Error Return Values: 1/0
Arguments:
(1) Data set number (default 1)
(2) ASCII filename, or
(2) S-Lang variable of Struct_Type (e.g., type of variable returned by
VARMM readascii())
The function load_ascii() loads data from an ASCII file
into a Sherpa data set. The function load_bascii() loads
data from an ASCII file into the background associated with a Sherpa
source data set. (The brackets indicate an optional letter in the function
name, with ``[b]'' representing functions to use with background data.
Note that background functions currently assume that the setting of
multiback in the Sherpa state object is 0,
i.e., that only one background dataset is allowed per
source dataset.)
Currently, users may only input 1D data
(i.e., two columns, with the first assumed to contain
values of the independent variable x and the second to
contain values of the dependent variable
y = f(x)).
Field names in the struct do not matter, although in the current
implementation an _nrows field is needed to establish the
length of the arrays.
See the related Sherpa command
READ
for more information.
sherpa> () = load_ascii(,"example.dat")
sherpa> () = load_ascii(1,"example.dat")
sherpa> () = load_bascii(,"example.dat")
sherpa> () = load_bascii(1,"example.dat")
The first two commands will load data from the ASCII file into
Sherpa source data set 1. The last two commands will load data
from the ASCII file into the background associated with Sherpa
source data set 1.
sherpa> foo = readascii("example.dat")
sherpa> () = load_ascii(1,foo)
Here the data are read into the S-Lang variable ``foo''. The
load_ascii() function then reads the data from
arrays which are part of the variable ``foo''.
- chandra
-
guide
- sherpa
-
autoest,
back,
berrors,
bsyserrors,
coord,
data,
dataspace,
fakeit,
feffile,
group,
guess,
is_subtracted,
load,
load_arf,
load_back_from,
load_backset,
load_dataset,
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
|