Expand environment variable in a file name.

If the input file name begins with either a Unix-style or IRAF-style environment variable (e.g. $lref/name_dqi.fits or lref$name_dqi.fits respectively), this routine expands the variable and returns a complete path name for the file.

filename : str

A file name, possibly including an environment variable.

fullname : str

The file name with environment variable expanded.

stistools.r_util.interpolate(x, values, xp)


Linear interpolation is used. If the specified indpendent variable value xp is outside the range of the array x, the first (or last) value in values will be returned.

x : a sequence object, e.g. an array, int or float

Array of independent variable values.

values : a sequence object, e.g. an array (not character)

Array of dependent variable values.

xp : int or float

Independent variable value at which to interpolate.

interp_vals : the same type as one element of values

Linearly interpolated value.