get_signals.m
SYNTAX: [d,t,ier]=get_signals(shotnum,signal_names,tmin,tmax,get_data_fn,options)
PURPOSE: Generic function for fetching signals of the type stored in the
"output_signals" field of the generic system model data structure.
INPUT:
shotnum = shot number
signal_names = signal names, either string array or cell array (1 column).
Can be a numerical expression involving valid pointnames.
tmin, tmax = min and max time for data interval
get_data_fn = string defining function to call to get data; must have
argument list of the form: (shotnum,signal_name,tmin,tmax)
options = structure defining optional processing to do, allowed fields =
drift_correct = vector [tmin1,tmax1] or [tmin1,tmax1,tmin2,tmax2] defining
times to compute offset(s) needed to correct for integrator drift;
2 times=>offset only, 4 times=>correct linear drift
(tmin, tmax must be chosen where the data "should" be zero)
resample_time = time vector at which to resample data OR integer 1 indicating
resample time is defined by signal in first entry of signal_names
verbose = set>=1 to display various messages (larger # => more msgs)
(If an option is not specified, the operation is not performed.)
OUTPUT:
d = data array; one column per signal name
t = corresponding time vector
ier = number of signal ptnames that could not be successfully fetched
RESTRICTIONS: Doesn't currently handle multiple signals with different
timebases - logic needs to be added.
Dependencies