home
manual
quick ref.
packages
index
keywords
examples




save

 
             save, file, var1, var2, ...  
             restore, file, var1, var2, ...  
  
     saves the variables VAR1, VAR2, etc. in the binary file FILE,  
     or restores them from that file.  
     The VARi may be either non-record or record data in the case that  
     FILE contains records.  
  
     If one of the VARi does not already exist in FILE, it is created  
     by the save command; after add_record, save adds or stores VARi to  
     the current record.  See add_record for more.  The VARi may be  
     structure definitions (for the save command) to declare data  
     structures for the file.  This is necessary only in the case that  
     a record variable is a pointer -- all of the potential data types  
     of pointees must be known.  No data structures may be declared  
     using the save command after the first record has been added.  
  
     If no VARi are present, save saves all array variables, and  
     restore restores every non-record variable in the file if there  
     is no current record, and every variable in the current record if  
     there is one.  

unknown type function, documented at startup/std.i   line 2075  
 
SEE ALSO: openb, createb, updateb, get_vars,
add_record, get_addrs, jt, jc, _read, _write,
data_align




save3

 
             view= save3()  
  
     Save the current 3D viewing transformation and lighting.  

unknown type function, documented at include/pl3d.i   line 244  
 
SEE ALSO: restore3, rot3, mov3, aim3, light3




scalar

 
             scalar -- get optional scalar parameter  
  
 *  
 * PROTOTYPE  
 *   x = scalar(xarg, xdef, lt=, le=, gt=, ge=, type=, arg=, fn=);  
 *  
 * ARGUMENTS  
 *   XARG    argument passed to the function.  
 *   XDEF    default value for the scalar argument (optional, if not  
 *           specified, then it is guessed that the caller must supply the  
 *           argument).  
 * KEYWORDS  
 *   GE=     to be valid, XARG must be >= GE (optional, only one of GT or GE  
 *           can be used).  
 *   GT=     to be valid, XARG must be >  GT (optional, only one of GT or GE  
 *           can be used).  
 *   LE=     to be valid, XARG must be <= LE (optional, only one of LT or LE  
 *           can be used).  
 *   LT=     to be valid, XARG must be <  LT (optional, only one of LT or LE  
 *           can be used).  
 *   TYPE=   data type of the scalar (optional).  
 *   FN=     function name for error messages (optional string).  
 *   ARG=    argument name for error messages (optional string).  
 *  
 * DESCRIPTION  

 *   Check XARG and return a scalar value (i.e., either XARG converted to TYPE  

 *   if it is not void or XDEF otherwise).  If XARG is not within any specified  

 *   bound or if it is not a scalar or if it is void (e.g., not specified) and  
 *   there is no default value XDEF, an error message is written out.  
 *  
 * EXAMPLE  
 *   The following function has 2 scalar arguments X and Y, the 1st one is an  
 *   integer (of type long) which must be specified and be strictly greater  
 *   than 22 while the 2nd default to .5 and must be in [0., 1.]:  
 *     func foo(x,y) {  
 *         x= scalar(x,     gt=22,        type=long,   fn="foo", arg="X");  
 *         y= scalar(y, .5, ge=0., le=1., type=double, fn="foo", arg="Y");  
 *         ...  
 *     }  
 *  
 * WARNING  
 *   There is no checking of consistency of options.  
 *  
 * HISTORY: 29 Sept. 1995 by Eric THIEBAUT.  (Modified slightly by DHM)  

unknown type function, documented at include/string.i   line 296  
 




sech

 
             sech(x)  
             csch(x)  
  
     returns the hyperbolic secant (1/cosh) or cosecant (1/sinh) of  
     its argument, without overflowing for large x.  

unknown type function, documented at startup/std.i   line 571  
 
SEE ALSO: sinh, cosh, tanh, asinh, acosh, atanh




series_n

 
             series_n(r, s)  
  
     returns the minimum number n of terms required for the geometric  
     series  
        1 + r + r^2 + r^3 + ... + r^n = s  
     to reach at least the given value s.  An alternate viewpoint is  
     that n is the minimum number of terms required to achieve the  
     sum s, with a ratio no larger than r.  
     Returns 0 if r<1 and s>1/(1-r), or if s<1.  
     The routine makes the most sense for r>1 and s substantially  
     greater than 1.  The intended use is to determine the minimum  
     number of zones required to span a given thickness t with a given  
     minimum zone size z, and maximum taper ratio r (assumed >1 here):  
        n= series_n(r, t/z);  
     With this n, you have the option of adjusting r or z downwards  
     (using series_r or series_s, respectively) to achieve the final  
     desired zoning.  
     R or S or both may be arrays, as long as they are conformable.  

unknown type function, documented at include/series.i   line 156  
 
SEE ALSO: series_s, series_r




series_r

 
             series_r(s, n)  
  
     returns the ratio r of the finite geometric series, given the sum s:  
        1 + r + r^2 + r^3 + ... + r^n = s  
     Using n<0 will return the the reciprocal of n>0 result, that is,  
        series_r(s, -n) == 1.0/series_r(s, n)  
     If n==0, returns s-1 (the n==1 result).  
     S or N or both may be arrays, as long as they are conformable.  

unknown type function, documented at include/series.i   line 66  
 
SEE ALSO: series_s, series_n




series_s

 
             series_s(r, n)  
  
     returns the sum s of the finite geometric series  
        1 + r + r^2 + r^3 + ... + r^n  
     Using n<0 is equivalent to using the reciprocal of r, that is,  
        series_s(r, -n) == series_s(1./r, n)  
     R or N or both may be arrays, as long as they are conformable.  

unknown type function, documented at include/series.i   line 24  
 
SEE ALSO: series_r, series_n




set3_object

 
             set3_object, drawing_function, _lst(arg1,arg2,...)  
  
  
     set up to trigger a call to draw3, adding a call to the  
     3D display list of the form:  
  
        DRAWING_FUNCTION, _lst(ARG1, ARG2, ...)  
  
     When draw3 calls DRAWING_FUNCTION, the external variable _draw3  
     will be non-zero, so DRAWING_FUNCTION can be written like this:  
  
     func drawing_function(arg1,arg2,...)  
     {  
       require, "pl3d.i";  
       if (_draw3) {  
         list= arg1;  
	 arg1= _nxt(list);  
	 arg2= _nxt(list);  
	 ...  
	 ......  
	 ......  
	 return;  
       }  
       ......  
       ......  
       set3_object, drawing_function, _lst(arg1,arg2,...);  
     }  
  

unknown type function, documented at include/pl3d.i   line 670  
 
SEE ALSO: get3_xy, get3_light, sort3d




set_blocksize

 
             set_blocksize, file, blocksize  
  
     sets smallest cache block size for FILE to BLOCKSIZE.  BLOCKSIZE  
     is rounded to the next larger number of the form 4096*2^n if  
     necessary; cache blocks for this file will be multiples of  
     BLOCKSIZE bytes long.  The default BLOCKSIZE is 0x4000 (16 KB).  

unknown type function, documented at startup/std.i   line 2208  
 
SEE ALSO: openb, updateb, createb, save, restore,
_read, _write




set_filesize

 
             set_filesize, file, filesize  
  
     sets the new family member threshhold for FILE to FILESIZE.  
     Whenever a new record is added (see add_record), if the current file  
     in the FILE family has at least one record and the new record would  
     cause the current file to exceed FILESIZE bytes, a new family  
     member will be created to hold the new record.  
     The default FILESIZE is 0x400000 (4 MB).  

unknown type function, documented at startup/std.i   line 2219  
 
SEE ALSO: openb, updateb, createb, add_record




set_idler

 
             set_idler, idler_function  
  
     sets the idler function to IDLER_FUNCTION.  Instead of waiting  
     for keyboard input when all its tasks are finished, the interpreter  
     will invoke IDLER_FUNCTION with no arguments.  The idler function  
     is normally invoked only once, so input from the keyboard resumes  
     after one call to the idler.  Of course, an idler is free to call  
     set_idler again before it returns, which will have the effect of  
     calling that function in a loop.  

unknown type function, documented at startup/std.i   line 2488  
 
SEE ALSO: batch




set_path

 
             set_path, "dir1:dir2:dir3:..."  
          or set_path  
  
     sets the include file search path to the specified list of  
     directories.  The specified directories are searched left to  
     right for include files specified as relative file names in  
     #include directives, or to the include or require functions.  
     If the argument is omitted, restores the default search path,  
     ".:~/Yorick:Y_LAUNCH/include:Y_SITE/include:Y_SITE/contrib",  
     where y_site is the main Yorick directory for this site.  
     The Y_LAUNCH directory is the directory which contains the  
     executable; this directory is omitted if it is the same as  
     Y_SITE.  
  
     Only the "end user" should ever call set_path, and then only in  
     his or her custom.i file, for the purpose of placing a more  
     elaborate set of personal directories containing Yorick procedures.  
     For example, if someone else maintains Yorick code you use, you  
     might put their ~/Yorick on your include path.  
  

unknown type function, documented at startup/std.i   line 237  
 
SEE ALSO: Y_LAUNCH, Y_SITE, include, require




set_style

 
             set_style, landscape, systems, legends, clegends  
  
  
     set the detailed style of the current drawing.  The arguments  
     are all inputs, having the same meanings as for get_style (which  
     see).  All arguments are required, so you may need to call  
     get_style as a starting point, if you only want to make a few  
     changes.  See the Gist/work.gs and the other .gs files for  
     examples of reasonable values to choose.  
  
     Calling set_style destroys anything that was plotted in the  
     window, like the style= keyword of the window command.  
  

unknown type function, documented at include/style.i   line 94  
 
SEE ALSO: get_style, read_style, write_style




set_tolerances

 
             set_tolerances()  
          or old_tols= set_tolerances([tol1, tol2, lost_tol])  
  
     returns the current tolerances for the ray tracking.  Initially,  
     these are [1.e-3, 1.e-6, 0.0].  In the second form, sets new  
     tolerances.  If any of TOL1, TOL2, or LOST_TOL is zero, that  
     tolerance is restored to its default value.  If TOL1 is less  
     than zero, the root polishing operation which requires TOL1  
     and TOL2 is not done at all.  

unknown type function, documented at startup/drat.i   line 1287  
 
SEE ALSO: track_rays, integ_flat, integ_linear, streak,
snap




setz3

 
             setz3, zc  
  
     Set the camera position to z=ZC (x=y=0) in the viewer's coordinate  
     system.  If ZC is nil, set the camera to infinity (default).  

unknown type function, documented at include/pl3d.i   line 126  
 
SEE ALSO: rot3, orient3, undo3, save3, restore3,
light3




shock

 
             sound  
  
     Set up the initial conditions for evolve to launch a strong wave, which  
     steepens into a shock as it propagates.  
  

unknown type function, documented at include/demo1.i   line 90  
 
SEE ALSO: sound, evolve




show

 
             show, f  
          or show, f, pat  
          or show, f, 1  
  
     prints a summary of the variables contained in binary file F.  
     If there are too many variables, use the second form to select  
     only those variables whose first few characters match PAT.  
     In the third form, continues the previous show command where it  
     left off -- this may be necessary for files with large numbers of  
     variables.  
     The variables are printed in alphabetical order down the columns.  
     The print function can be used to obtain other information about F.  

unknown type function, documented at startup/std.i   line 1686  
 
SEE ALSO: openb, jt, jc




sign

 
             sign(x)  
  
     returns algebraic sign of it argument, or closest point on the  
     unit circle for complex x.  Guaranteed that x==sign(x)*abs(x).  
     sign(0)==+1.  

unknown type function, documented at startup/std.i   line 641  
 
SEE ALSO: abs




simpson

 
             integral= simpson(function, a, b)  
          or integral= simpson(function, a, b, epsilon)  
  
     returns the integral of FUNCTION(x) from A to B.  If EPSILON is  
     given, Simpson's rule is refined until that fractional accuracy  
     is obtained.  EPSILON defaults to 1.e-6.  
  
     If the notvector= keyword is supplied and non-zero, then FUNCTION  
     may not be called with a list of x values to return a list of  
     results.  By default, FUNCTION is assumed to be a vector function.  
  
     If the function is very smooth, romberg may work better.  
  

unknown type function, documented at include/romberg.i   line 82  
 
SEE ALSO: romberg, max_doublings




sin

 
             sin(x)  
             cos(x)  
             tan(x)  
  
     returns the sine, cosine, or tangent of its argument,  
     which is in radians.  

unknown type function, documented at startup/std.i   line 524  
 
SEE ALSO: asin, acos, atan




sinh

 
             sinh(x)  
             cosh(x)  
             tanh(x)  
  
     returns the hyperbolic sine, cosine, or tangent of its argument.  

unknown type function, documented at startup/std.i   line 562  
 
SEE ALSO: sech, csch, asinh, acosh, atanh




sizeof

 
             sizeof(object)  
  
     returns the size of the object in bytes, or 0 for non-array objects.  
     sizeof(structure_definition) returns the number of bytes per instance.  
     sizeof(binary_file) returns the file size in bytes.  

unknown type function, documented at startup/std.i   line 388  
 
SEE ALSO: dimsof, typeof, structof, numberof




slice2

 
             slice2, plane, nverts, xyzverts  
          or slice2, plane, nverts, xyzverts, values  
  
  
     Slice a polygon list, retaining only those polygons or  
     parts of polygons on the positive side of PLANE, that is,  
     the side where xyz(+)*PLANE(+:1:3)-PLANE(4) > 0.0.  
     The NVERTS, XYZVERTS, and VALUES arrays serve as both  
     input and output, and have the meanings of the return  
     values from the slice3 function.  It is legal to omit the  
     VALUES argument (e.g.- if there is no fcolor function).  
  
     In order to plot two intersecting slices, one could  
     slice (for example) the horizontal plane twice (slice2x) -  
     first with the plane of the vertical slice, then with minus  
     that same plane.  Then, plot first the back part of the  
     slice, then the vertical slice, then the front part of the  
     horizontal slice.  Of course, the vertical plane could  
     be the one to be sliced, and "back" and "front" vary  
     depending on the view point, but the general idea always  
     works.  
  

unknown type function, documented at include/slice3.i   line 906  
 
SEE ALSO: slice3, plane3, slice2x, slice2_precision




slice2x

 
             slice2, plane, nverts, values, xyzverts  
  
  
     Slice a polygon list, retaining only those polygons or  
     parts of polygons on the positive side of PLANE, that is,  
     the side where xyz(+)*PLANE(+:1:3)-PLANE(4) > 0.0.  
     The NVERTS, VALUES, and XYZVERTS arrays serve as both  
     input and output, and have the meanings of the return  
     values from the slice3 function.  
  

unknown type function, documented at include/slice3.i   line 879  
 
SEE ALSO: slice2, slice2_precision




slice3

 
             slice3, m3, fslice, nverts, xyzverts  

          or color_values= slice3(m3, fslice, nverts, xyzverts, fcolor)  

          or color_values= slice3(m3, fslice, nverts, xyzverts, fcolor, 1)  
  
  
     slice the 3D mesh M3 using the slicing function FSLICE, returning  
     the lists NVERTS and XYZVERTS.  NVERTS is the number of vertices  
     in each polygon of the slice, and XYZVERTS is the 3-by-sum(NVERTS)  
     list of polygon vertices.  If the FCOLOR argument is present, the  
     values of that coloring function on the polygons are returned as  
     the value of the slice3 function (numberof(color_values) ==  
     numberof(NVERTS) == number of polygons).  
  
     If the slice function FSLICE is a function, it should be of the  
     form:  
        func fslice(m3, chunk)  
     returning a list of function values on the specified chunk of the  
     mesh m3.  The format of chunk depends on the type of m3 mesh, so  
     you should use only the other mesh functions xyz3 and getv3 which  
     take m3 and chunk as arguments.  The return value of fslice should  
     have the same dimensions as the return value of getv3; the return  
     value of xyz3 has an additional first dimension of length 3.  
  
     If FSLICE is a list of 4 numbers, it is taken as a slicing plane  
     with the equation FSLICE(+:1:3)*xyz(+)-FSLICE(4), as returned by  
     plane3.  
  
     If FSLICE is a single integer, the slice will be an isosurface for  
     the FSLICEth variable associated with the mesh M3.  In this case,  
     the keyword value= must also be present, representing the value  
     of that variable on the isosurface.  
  
     If FCOLOR is nil, slice3 returns nil.  If you want to color the  
     polygons in a manner that depends only on their vertex coordinates  
     (e.g.- by a 3D shading calculation), use this mode.  
  
     If FCOLOR is a function, it should be of the form:  
        func fcolor(m3, cells, l, u, fsl, fsu, ihist)  
     returning a list of function values on the specified cells of the  
     mesh m3.  The cells argument will be the list of cell indices in  
     m3 at which values are to be returned.  l, u, fsl, fsu, and ihist  
     are interpolation coefficients which can be used to interpolate  
     from vertex centered values to the required cell centered values,  
     ignoring the cells argument.  See getc3 source code.  
     The return values should always have dimsof(cells).  
  
     If FCOLOR is a single integer, the slice will be an isosurface for  
     the FCOLORth variable associated with the mesh M3.  
  
     If the optional argument after FCOLOR is non-nil and non-zero,  
     then the FCOLOR function is called with only two arguments:  
        func fcolor(m3, cells)  
  

unknown type function, documented at include/slice3.i   line 260  
 
SEE ALSO: mesh3, plane3, xyz3, getv3, getc3, slice2,
plfp




snap

 
             snap(f, rays)  
          or snap(f, rays, slimits)  
  
     returns the time-integrated specific intensity for the rad-hydro  
     problem dumped in file F, on the specified RAYS, with the  
     specified limits SLIMITS on the transport integrals.  
  
     The first dimension of RAYS may be length 3, 5, or 6 to represent  
     the ray(s) in TDG/DIRT coordinates (x,y,theta), "best" coordinates  
     (x,y,z,theta,phi), or internal coordinates (cos,sin,y,z,x,r),  
     respectively.  The remaining dimensions of RAYS, if any, will be  
     called "nrays" below.  
  
     The SLIMITS parameter, if present, is the value of the s-coordinate  
     -- position along the ray -- at which to start and stop the  
     integration of the transport equation.  SLIMITS may be nil, a 1-D  
     array of length 2, or a 2-by-nrays array.  Each component of SLIMITS  
     is [s_start, s_stop]; if s_stop line 256  
 
SEE ALSO: reset_options, streak, streak_save,
integ_flat, integ_linear, streak_times,
form_rays, best_rays, dirt_rays, internal_rays




snap_worker

 
             snap_worker(transp, selfem, time)  
  
     The snap function actually works by replacing the drat_compress  
     with snap_worker.  See the source for snap in drat.i for details.  

unknown type function, documented at startup/drat.i   line 279  
 




sort

 
             sort(x)  
          or sort(x, which)  
  
     returns an array of longs with dimsof(X) containing index values  
     such that X(sort(X)) is a monotonically increasing array.  X can  
     contain integer, real, or string values.  If X has more than one  
     dimension, WHICH determines the dimension to be sorted.  The  
     default WHICH is 1, corresponding to the first dimension of X.  
     WHICH can be non-positive to count dimensions from the end of X;  
     in particular a WHICH of 0 will sort the final dimension of X.  
  
     WARNING: The sort function is non-deterministic if some of the  
              values of X are equal, because the Quick Sort algorithm  
	      involves a random selection of a partition element.  
  
     For information on sorting with multiple keys (and on making  
     sort deterministic), type the following:  
        #include "msort.i"  
        help, msort  
  

unknown type function, documented at startup/std.i   line 1016  
 
SEE ALSO: median, digitize, interp, integ, histogram




sort3d

 
             sort3d(z, npolys, &list, &vlist)  
  
  
     given Z and NPOLYS, with numberof(Z)==sum(npolys), return  
     LIST and VLIST such that Z(VLIST) and NPOLYS(LIST) are  
     sorted from smallest average Z to largest average Z, where  
     the averages are taken over the clusters of length NPOLYS.  
     Within each cluster (polygon), the cyclic order of Z(VLIST)  
     remains unchanged, but the absolute order may change.  
  
     This sorting order produces correct or nearly correct order  
     for a plfp command to make a plot involving hidden or partially  
     hidden surfaces in three dimensions.  It works best when the  
     polys form a set of disjoint closed, convex surfaces, and when  
     the surface normal changes only very little between neighboring  
     polys.  (If the latter condition holds, then even if sort3d  
     mis-orders two neighboring polys, their colors will be very  
     nearly the same, and the mistake won't be noticeable.)  A truly  
     correct 3D sorting routine is impossible, since there may be no  
     rendering order which produces correct surface hiding (some polys  
     may need to be split into pieces in order to do that).  There  
     are more nearly correct algorithms than this, but they are much  
     slower.  
  

unknown type function, documented at include/pl3d.i   line 926  
 
SEE ALSO: get3_xy




sound

 
             sound  
  
     Set up the initial conditions for evolve to launch a weak sound wave.  
  

unknown type function, documented at include/demo1.i   line 75  
 
SEE ALSO: shock, evolve




span

 
             span(start, stop, n)  
          or span(start, stop, n, which)  
  
     returns array of N doubles equally spaced from START to STOP.  
     The START and STOP arguments may themselves be arrays, as long as  
     they are conformable.  In this case, the result will have one  
     dimension of length N in addition to dimsof(START, STOP).  
     By default, the result will be N-by-dimsof(START, STOP), but  
     if WHICH is specified, the new one of length N will be the  
     WHICHth.  WHICH may be non-positive to position the new  
     dimension relative to the end of dimsof(START, STOP); in  
     particular WHICH of 0 produces a result with dimensions  
     dimsof(START, STOP)-by-N.  

unknown type function, documented at startup/std.i   line 913  
 
SEE ALSO: spanl, indgen, array




spanl

 
             spanl(start, stop, n)  
          or spanl(start, stop, n, which)  
  
     similar to the span function, but the result array have N points  
     spaced at equal ratios from START to STOP (that is, equally  
     spaced logarithmically).  See span for discussion of WHICH argument.  
     START and STOP must have the same algebraic sign for this to make  
     any sense.  

unknown type function, documented at startup/std.i   line 928  
 
SEE ALSO: span, indgen, array




spann

 
             spann(zmin, zmax, n)  
  
     return no more than N equally spaced "nice" numbers between  
     ZMIN and ZMAX.  

unknown type function, documented at startup/graph.i   line 1555  
 
SEE ALSO: span, spanl, plc, plfc




spin3

 
             spin3  
          or spin3, nframes  
          or spin3, nframes, axis  
  
     Spin the current 3D display list about AXIS over NFRAMES.  Keywords  
     tlimit= the total time allowed for the movie in seconds (default 60),  
     dtmin= the minimum allowed interframe time in seconds (default 0.0),  
     bracket_time= (as for movie function in movie.i)  
  
     The default AXIS is [-1,1,0] and the default NFRAMES is 30.  
  

unknown type function, documented at include/pl3d.i   line 978  
 
SEE ALSO: rot3




spline

 
             dydx= spline(y, x)  
  
       -or-   yp= spline(dydx, y, x, xp)  
       -or-   yp= spline(y, x, xp)  
     computes the cubic spline curve passing through the points (X, Y).  
  
     With two arguments, Y and X, spline returns the derivatives DYDX at  
     the points, an array of the same length as X and Y.  The DYDX values  
     are chosen so that the piecewise cubic function returned by the four  
     argument call will have a continuous second derivative.  
  
     The X array must be strictly monotonic; it may either increase or  
     decrease.  
  
     The values Y and the derivatives DYDX uniquely determine a piecewise  
     cubic function, whose value is returned in the four argument form.  
     In this form, spline is analogous to the piecewise linear interpolator  
     interp; usually you will regard it as a continuous function of its  
     fourth argument, XP.  The first argument, DYDX, will normally have  
     been computed by a previous call to the two argument spline function.  
     However, this need not be the case; another DYDX will generate a  
     piecewise cubic function with continuous first derivative, but a  
     discontinuous second derivative.  For XP outside the extreme values  
     of X, spline is linear (if DYDX1 or DYDX0 keywords were specified,  
     the function will NOT have continuous second derivative at the  
     endpoint).  
  
     The XP array may have any dimensionality; the result YP will have  
     the same dimensions as XP.  
  
     If you only want the spline evaluated at a single set of XP, use the  
     three argument form.  This is equivalent to:  
          yp= spline(spline(y,x), y, x, xp)  
  
     The keywords DYDX1 and DYDX0 can be used to set the values of the  
     returned DYDX(1) and DYDX(0) -- the first and last values of the  
     slope, respectively.  If either is not specified or nil, the slope at  
     that end will be chosen so that the second derivative is zero there.  
  
     The function tspline (tensioned spline) gives an interpolation  
     function which lies between spline and interp, at the cost of  
     requiring you to specify another parameter (the tension).  
  

unknown type function, documented at include/spline.i   line 64  
 
SEE ALSO: interp, tspline




split_bytscl

 
             split_bytscl(x, 0)  
          or split_bytscl(x, 1)  
  
     as bytscl function, but scale to the lower half of a split  
     palette (0-99, normally the color scale) if the second parameter  
     is zero or nil, or the upper half (100-199, normally the gray  
     scale) if the second parameter is non-zero.  

unknown type function, documented at include/slice3.i   line 1267  
 
SEE ALSO: split_palette




split_palette

 
             split_palette  
          or split_palette, "palette_name.gp"  
  
     split the current palette or the specified palette into two  
     parts; colors 0 to 99 will be a compressed version of the  
     original, while colors 100 to 199 will be a gray scale.  

unknown type function, documented at include/slice3.i   line 1243  
 
SEE ALSO: pl3tree, split_bytscl




sqrt

 
             sqrt(x)  
  
     returns the square root of its argument.  

unknown type function, documented at startup/std.i   line 606  
 
SEE ALSO: abs, also, note, the, rms, range, function




sread

 
unknown type function, documented at startup/std.i   line 1343  
 
SEE read




strchr

 
             strchr -- get first/last index of a character in a string   
  
 *  
 * SYNOPSIS: i = strchr(s, c)  
 *           i = strchr(s, c, last=1)  
 *  
 * DIAGNOSTIC: returns 0 if character C is not found in string S.  
 *  
 * HISTORY: October 27, 1995 by Eric THIEBAUT.  
 *  

unknown type function, documented at include/string.i   line 172  
 
SEE ALSO: strmatch




streak

 
             streak(f, rays)  
          or streak(f, rays, slimits)  
  
     returns the transparency and self-emission as functions of time for  
     the rad-hydro problem dumped in file F, on the specified RAYS, with  
     the specified limits SLIMITS on the transport integrals.  
  
     The first dimension of RAYS may be length 3, 5, or 6 to represent  
     the ray(s) in TDG/DIRT coordinates (x,y,theta), "best" coordinates  
     (x,y,z,theta,phi), or internal coordinates (cos,sin,y,z,x,r),  
     respectively.  The remaining dimensions of RAYS, if any, will be  
     called "nrays" below.  
  
     The SLIMITS parameter, if present, is the value of the s-coordinate  
     -- position along the ray -- at which to start and stop the  
     integration of the transport equation.  SLIMITS may be nil, a 1-D  
     array of length 2, or a 2-by-nrays array.  Each component of SLIMITS  
     is [s_start, s_stop]; if s_stop line 109  
 
SEE ALSO: reset_options, snap, streak_save, integ_flat,
integ_linear, streak_times, form_rays,
best_rays, dirt_rays, internal_rays,
apply_funcs




streak_save

 
             streak_save, outname, f, rays  
          or streak_save, outname, f, rays, slimits  
          or streak_save, outfile, f, rays, slimits  
  
     is the same as the streak function, except that the results of  
     the transport calculation are placed into a PDB file called  
     OUTNAME, instead of being accumulated in memory.  All of the  
     options for the streak function are available, except for  
     drat_compress (which is set to streak_saver).  
  
     If the first argument is OUTFILE, a file variable instead of a  
     file name, then that file is used for output.  You can create  
     OUTFILE and add static variables to it with save (but do NOT call  
     add_record) which streak_save otherwise wouldn't know about.  
  
     The output file has history records at the same times as the  
     input file.  Each record contains "time" (a double scalar),  
     and the two arrays "transp", the transparency (between 0 and 1),  
     and "selfem", the self emission (which has the same units as  
     ekap in the file F).  The dimensions of transp and selfem  
     are ngroup-by-2-by-nrays (where nrays represents zero or more  
     dimensions, copied from the RAYS input array).  The RAYS and  
     SLIMITS inputs are placed into the output file as non-record  
     variables, and any variables in the drat_static option are  
     copied form F to the output file.  The gb and gav variables  
     are copied from F into the output file as well.  If the drat_glist  
     option is present, that is stored in the output file also.  
  
   OPTIONS: all options available for streak except drat_compress,  
            drat_gb, drat_gav, drat_static  

unknown type function, documented at startup/drat.i   line 329  
 
SEE ALSO: streak, snap




streak_saver

 
             streak_saver(transp, selfem, time)  
  
     The streak_save function actually works by replacing the drat_compress  
     with streak_saver.  See the source for streak_saver in drat.i for  
     details.  

unknown type function, documented at startup/drat.i   line 378  
 




streak_times

 
             streak_times(f)  
  
     returns the times from file F whic lie between the optional  
     drat_start and drat_stop.  

unknown type function, documented at startup/drat.i   line 912  
 
SEE ALSO: drat_start, drat_stop




strlen

 
             strlen(string_array)  
  
     returns an long array with dimsof(STRING_ARRAY) containing the  
     lengths of the strings.  The null string (0) is considered to  
     have length 0, just like "".  

unknown type function, documented at startup/std.i   line 1098  
 
SEE ALSO: strmatch, strpart, strtok




strmatch

 
             strmatch(string_array, pattern)  
          or strmatch(string_array, pattern, case_fold)  
  
     returns an int array with dimsof(STRING_ARRAY) with 0 where  
     PATTERN was not found in STRING_ARRAY and 1 where it was found.  
     If CASE_FOLD is specified and non-0, the pattern match is  
     insensitive to case, that is, an upper case letter will match  
     the same lower case letter and vice-versa.  

unknown type function, documented at startup/std.i   line 1127  
 
SEE ALSO: strtok, strpart, strlen




strpart

 
             strpart(string_array, m:n)  
  
      returns another string array with the same dimensions as  
      STRING_ARRAY which consists of characters M through N of  
      the original strings.  M and N are 1-origin indices; if  
      M is omitted, the default is 1; if N is omitted, the default  
      is the end of the string.  If M or N is non-positive, it is  
      interpreted as an index relative to the end of the string,  
      with 0 being the last character, -1 next to last, etc.  
      Finally, the returned string will be shorter than N-M+1  
      characters if the original doesn't have an Mth or Nth  
      character, with "" (note that this is otherwise impossible)  
      if neither an Mth nor an Nth character exists.  A 0  
      is returned for any string which was 0 on input.  

unknown type function, documented at startup/std.i   line 1144  
 
SEE ALSO: strmatch, strtok, strlen




strtok

 
             strtok(string_array, delimiters)  
          or strtok(string_array)  
  
     strips the first token off of each string in STRING_ARRAY.  
     A token is delimited by any of the characters in the string  
     DELIMITERS.  If DELIMITERS is blank, nil, or not given, the  
     default DELIMITERS is " \t\n" (blanks, tabs, or newlines).  
     The result is a string array ts with dimensions  
     2-by-dimsof(STRING_ARRAY); ts(1,) is the first token, and  
     ts(2,) is the remainder of the string (the character which  
     terminated the first token will be in neither of these parts).  
     The ts(2,) part will be 0 (i.e.- the null string) if no more  
     characters remain after ts(1,); the ts(1,) part will be 0 if  
     no token was present.  A STRING_ARRAY element may be 0, in  
     which case (0, 0) is returned for that element.  

unknown type function, documented at startup/std.i   line 1116  
 
SEE ALSO: strmatch, strpart, strlen




strtolower

 
             strtolower -- convert a string to lower case letters  
  
 *  
 * SYNOPSIS: s2 = strtolower(s)  
 *  
 * HISTORY: October 10, 1995 by Eric THIEBAUT.  
 *  

unknown type function, documented at include/string.i   line 103  
 
SEE ALSO: strtoupper




strtoupper

 
             strtoupper -- convert a string to upper case letters  
  
 *  
 * SYNOPSIS: s2 = strtoupper(s)  
 *  
 * HISTORY: October 10, 1995 by Eric THIEBAUT.  
 *  

unknown type function, documented at include/string.i   line 89  
 
SEE ALSO: strtolower




strtrim

 
             strtrim(string)  
          or strtrim(string, which)  
          or strtrim(string, which, blank=blank)  
  
  
   returns STRING without leading and/or trailing blanks.  If STRING is  
   only made of blanks, return "".  If STRING is 0x0, return 0x0.  
   If WHICH is 1, trim leading blanks (least expensive).  If WHICH is 2,  
   trim trailing blanks (a more costly operation).  If WHICH is 3, (the  
   default) trim both leading and trailing blanks.  
  
   If STRING is an array of strings, result has same dimensions.  
  
   The BLANK keyword is a string constituted by characters considered  
   as blanks; by default, BLANK is " \t\n" meaning that spaces,  
   tabs, and newlines are discarded.  
   In the BLANK string, "^", "]", and "-" are treated specially:  
   "]" and "-", if present, should come first in the list to avoid  
   special treatment, while "^" should not come first.  
  

unknown type function, documented at include/string.i   line 142  
 
SEE ALSO: strtrimleft, strtrimright




struct_align

 
             struct_align, file, alignment  
  
     in binary file FILE, align new struct members which are themselves  
     struct instances to begin at a byte address which is a multiple of  
     ALIGNMENT.  (This affects members declared explicitly by add_member,  
     as well as implicitly by save or add_variable.)  If ALIGNMENT is <=0,  
     returns to the default for this machine.  The struct alignment is in  
     addition to the alignment implied by the most restrictively aligned  
     member of the struct.  Most machines want ALIGNMENT of 1.  

unknown type function, documented at startup/std.i   line 2379  
 
SEE ALSO: add_member




structof

 
             structof(object)  
  
     returns the data type of OBJECT, or nil for non-array OBJECTs.  
     Use typeof(object) to get the ASCII name of a the data type.  

unknown type function, documented at startup/std.i   line 331  
 
SEE ALSO: typeof, dimsof, numberof, sizeof, nameof




sum

 
             sum(x)  
  
     returns the scalar sum of all elements of its array argument.  

unknown type function, documented at startup/std.i   line 731  
 
SEE ALSO: avg, min, max




sun3_primitives

 
             sun3_primitives, file  
  
     sets FILE primitive data types to be native to Sun-2 or Sun-3.  

unknown type function, documented at startup/std.i   line 1951  
 




sun_primitives

 
             sun_primitives, file  
  
     sets FILE primitive data types to be native to Sun, HP, IBM, etc.  

unknown type function, documented at startup/std.i   line 1942  
 




swrite

 
unknown type function, documented at startup/std.i   line 1461  
 
SEE write




symbol_def

 
             symbol_def(func_name)(arglist)  
          or symbol_def(var_name)  
  
     invokes the function FUNC_NAME with the specified ARGLIST,  
     returning the return value.  ARGLIST may be zero or more arguments.  
     In fact, symbol_def("fname")(arg1, arg2, arg3) is equivalent to  
     fname(arg1, arg2, arg3), so that "fname" can be the name of any  
     variable for which the latter syntax is meaningful -- interpreted  
     function, built-in function, or array.  
  
     Without an argument list, symbol_def("varname") is equivalent to  
     varname, which allows you to get the value of a variable whose name  
     you must compute.  
  
     DO NOT OVERUSE THIS FUNCTION.  It works around a specific deficiency  
     of the Yorick language -- the lack of pointers to functions -- and  
     should be used for such purposes as hook lists (see openb).  
  

unknown type function, documented at startup/std.i   line 2687  
 
SEE ALSO: symbol_set




symbol_set

 
             symbol_set, var_name, value  
  
     is equivalent to the redefinition  
          varname= value  
     except that var_name="varname" is a string which must be computed.  
  
     DO NOT OVERUSE THIS FUNCTION.  It works around a specific deficiency  
     of the Yorick language -- the lack of pointers to functions, streams,  
     bookmarks, and other special non-array data types.  
  

unknown type function, documented at startup/std.i   line 2700  
 
SEE ALSO: symbol_def




sysafe

 
             sysafe, "command line"  
          or system, "command line"  
  
     pass the command line to a UNIX sh (Bourne) shell for execution.  
     This requires a fork() system call, which in turn makes a copy of  
     the yorick executable in virtual memory before replacing that copy  
     with the sh shell.  If yorick has grown to enormous size, the copy  
     can bring your machine to its knees or kill it.  If you include  
     sysafe.i before yorick grows (before you start the calculation that  
     requires the large data arrays), a pipe is opened to an sh which  
     remains running, and the original system command is replaced by  
     sysafe.  Future system commands will be piped to the already  
     running sh, so no dangerous copy operation is required.  
  
     There are four problems with this approach:  
       (1) You can't run interactive programs with sysafe, because the  
           stdin is from the pipe (sysafe_pipe) instead of the keyboard.  
	   Attempting to do so may lock up yorick.  
       (2) Since the command runs asynchronously now, yorick can't wait  
           until it completes, and yorick's prompt will often precede  
	   the output from the command, unlike using the default system  
	   function.  
       (3) Some typographical errors in commands may kill the sh; since  
           you don't start a new one each time, the system command will  
	   stop working.  
       (4) The shorthand $ syntax still uses the dangerous system call;  
           you need to call system as an ordinary function for sysafe  
	   to protect you.  
  

unknown type function, documented at include/sysafe.i   line 45  
 
SEE ALSO: system_orig




system

 
             system, "shell command line"  
  
     Passes the command line string to a shell for execution.  
     If the string is constant, you may use the special syntax:  
         $shell command line  
     (A long command line may be continued by ending the line with \  
     as usual.)  The system function syntax allows Yorick to compute  
     parts of the command line string, while the simple $ escape  
     syntax does not.  In either case, the only way to get output  
     back from such a command is to redirect it to a file, then  
     read the file.  Note that Yorick does not regain control  
     until the subordinate shell finishes.  (Yorick will get control  
     back if the command line backgrounds the job.)  
     WARNING: If Yorick has grown to a large size, this may crash  
     your operating system, since the underlying POSIX fork function  
     first copies all of the running Yorick process before the exec  
     function can start the shell.  See Y_SITE/sysafe.i for a fix.  

unknown type function, documented at startup/std.i   line 206  
 
SEE ALSO: popen






home
manual
quick ref.
packages
index
keywords
examples
LLNL Disclaimers