all functions - i
i86_primitives
i86_primitives, file sets FILE primitive data types to be native to Linux i86 machines. Interpreted function, defined at i0/std.i line 2929
idl_open
f = idl_open(filename) or f = idl_open(filename, commons) openb for an IDL save file optional COMMONS is returned as an array of pointers to arrays of strings; the first string in each array is the name of an IDL common block; the others are the names of the variables in that common block all variable names have been converted to lower case loud=1 keyword reports on timestamp and other information about the user, host, etc., stored in the save file floating complex data becomes an array of float with leading dimension of 2, use f2z to recover complex 64 bit integers become an array of long with leading dimension of 2, use l2ll to recover single long (if sizeof(long)=8) Interpreted function, defined at i/idlsave.i line 64SEE ALSO: openb, f2z, l2ll
ieee_set
ieee_set, x, what set X to ieee754 special value WHAT X must be an array of float or double values (note that X cannot be a scalar double value) WHAT = 0 means leave unchanged WHAT = 1 means set to Inf WHAT = 2 means set to qNaN WHAT = 3 means set to sNaN WHAT = 4 means set to 0.0 negate WHAT to set the sign bit of X as well WHAT may be an array conformable with X, in order to set only some values of X this routine is a no-op if this machine is not known to support these ieee754 special values Warning-- apparently there is no universal standard for what constitutes signalling versus quiet NaN on MIPS and HPPA architectures, qNaN and sNaN are reversed Interpreted function, defined at i/ieee.i line 408SEE ALSO: ieee_test, as_chars
ifd12
ifd12(y) return x = inverse of Fermi-Dirac integral of order 1/2, y = integral[0 to inf]{ dt * t^0.5 / (exp(t-x)+1) } accurate to about 1e-8 Interpreted function, defined at i/fermi.i line 208SEE ALSO: ifdm12, ifd32, ifd52, fdm12, fd12, fd32, fd52
ifd32
ifd32(y) return x = inverse of Fermi-Dirac integral of order 3/2, y = integral[0 to inf]{ dt * t^1.5 / (exp(t-x)+1) } accurate to about 1e-8 Interpreted function, defined at i/fermi.i line 239SEE ALSO: ifdm12, ifd12, ifd52, fdm12, fd12, fd32, fd52
ifd52
ifd52(y) return x = inverse of Fermi-Dirac integral of order 5/2, y = integral[0 to inf]{ dt * t^2.5 / (exp(t-x)+1) } accurate to about 1e-8 Interpreted function, defined at i/fermi.i line 271SEE ALSO: ifdm12, ifd12, ifd32, fdm12, fd12, fd32, fd52
ifdm12
ifdm12(y) return x = inverse of Fermi-Dirac integral of order -1/2, y = integral[0 to inf]{ dt * t^-0.5 / (exp(t-x)+1) } accurate to about 1e-8 Interpreted function, defined at i/fermi.i line 173SEE ALSO: ifd12, ifd32, ifd52, fdm12, fd12, fd32, fd52
ijakowski
ijakowski Interpreted function, defined at i/demo4.i line 85
im_part
im_part(z) returns the imaginary part of its argument. Unlike z.im, works if z is not complex (returns zero). Interpreted function, defined at i0/std.i line 749
include
#include "yorick_source.i" require, filename include, filename or include, filename, now #include is a parser directive, not a Yorick statement. Use it to read Yorick source code which you have saved in a file; the file yorick_source.i will be read one line at a time, exactly as if you had typed those lines at the keyboard. The following directories are searched (in this order) to find yorick_source.i: . (current working directory) ~/yorick (your personal directory of Yorick functions) ~/Yorick (your personal directory of Yorick functions) Y_SITE/i (Yorick distribution library) Y_SITE/contrib (contributed source at your site) Y_SITE/i0 (Yorick startup and package include files) Y_HOME/lib (Yorick architecture dependent include files) To find out what is available in the Y_SITE/i directory, type: library You can also type Y_SITE to find the name of the site directory at your site, go to the include or contrib subdirectory, and browse through the *.i files. This is a good way to learn how to write a Yorick program. Be alert for files like README as well. The require function checks to see whether FILENAME has already been included (actually whether any file with the same final path component has been included). If so, require is a no-op, otherwise, the action is the same as the include function with NOW == 1. The include function causes Yorick to parse and execute FILENAME immediately. The effect is similar to the #include parser directive, except the finding, parsing, and execution of FILENAME occurs at runtime. The NOW argument has the following meanings: NOW == -1 filename pushed onto stack, popped and parsed when all pending input is exhausted NOW == 0 (or nil, default) parsed just before next input line would be parsed NOW == 1 parsed immediately, resuming current interpreted program when finished (like require) NOW == 2 like 0, except no error if filename does not exist NOW == 3 like 1, except no error if filename does not exist Unless you are writing a startup file, or have some truly bizarre technical reason for using the include function, use #include instead. The functional form of include may involve recursive parsing, which you will not be able to understand without deep study. Stick with #include. Builtin function, documented at i0/std.i line 2254SEE ALSO: set_path, Y_SITE, plug_in, autoload, include_all
include_all
include_all, dir1, dir2, ... include all files in directories DIR1, DIR2, ..., with names ending in the ".i" extension. (This is mostly for use to load the i-start directories when yorick starts; see i0/stdx.i.) If any of the DIRi do not exist, or are empty, they are silently skipped. Filenames beginning with "." are also skipped, even if they end in ".i". The files are included in alphabetical order, DIR1 first, then DIR2, and so on. Interpreted function, defined at i0/std.i line 2313SEE ALSO: include, autoload
indgen
indgen(n) or indgen(start:stop) or indgen(start:stop:step) returns "index generator" list -- an array of longs running from 1 to N, inclusive. In the second and third forms, the index values specified by the index range are returned. Builtin function, documented at i0/std.i line 1084SEE ALSO: span, spanl, array
info
info, expr prints the data type and array dimensions of EXPR. Interpreted function, defined at i0/std.i line 157SEE ALSO: help, print
install_struct
install_struct, file, struct_name or install_struct, file, struct_name, size, align, order or install_struct, file, struct_name, size, align, order, layout installs the data type named STRUCT_NAME in the binary FILE. In the two argument form, STRUCT_NAME must have been built by one or more calls to the add_member function. In the 5 and 6 argument calls, STRUCT_NAME is a primitive data type -- an integer type for the 5 argument call, and a floating point type for the 6 argument call. The 5 argument form may also be used to declare opaque data types. SIZE is the size of an instance in bytes, ALIGN is its alignment boundary (also in bytes), and ORDER is the byte order. ORDER is 1 for most significant byte first, -1 for least significant byte first, and 0 for opaque (unconverted) data. Other ORDER values represent more complex byte permutations (2 is the byte order for VAX floating point numbers). If ORDER equals SIZE, then the data type is not only opaque, but also must be read sequentially. LAYOUT is an array of 7 long values parameterizing the floating point format, [sign_address, exponent_address, exponent_size, mantissa_address, mantissa_size, mantissa_normalized, exponent_bias] (the addresses and sizes are in bits, reduced to MSB first order). Use, e.g., nameof(float) for STRUCT_NAME to redefine the meaning of the float data type for FILE. Builtin function, documented at i0/std.i line 3376SEE ALSO: add_variable, add_member
integ
integ(y, x, xp) or integ(y, x, xp, which) See the interp function for an explanation of the meanings of the arguments. The integ function returns ypi which is the integral of the piecewise linear curve (X(i), Y(i)) (i=1, ..., numberof(X)) from X(1) to XP. The curve (X, Y) is regarded as constant outside the bounds of X. Note that X must be monotonically increasing or Builtin function, documented at i0/std.i line 1197SEE ALSO: interp, digitize, span
integ_flat
integ_flat(opac, source, rays, mesh, slimits) or integ_flat(opac, source, ray_paths) returns ngroup-by-2-by-nrays result, where result(,1,..) is the transparency factors, and result(,2,..) is the self-emission for each group on each ray. The input OPAC and SOURCE are the opacity (an inverse length) and the source function (a specific intensity). They are mesh-by-ngroups zone centered arrays. The result has the same units as SOURCE. In the second form, RAY_PATHS was returned by the track_rays function. Interpreted function, defined at i0/drat.i line 1111SEE ALSO: integ_linear, track_rays, form_mesh, streak, snap
integ_linear
integ_linear(opac, source, rays, mesh, slimits) or integ_linear(opac, source, ray_paths) returns ngroup-by-2-by-nrays result, where result(,1,..) is the transparency factors, and result(,2,..) is the self-emission for each group on each ray. The input OPAC and SOURCE are the opacity (an inverse length) and the source function (a specific intensity). They are mesh-by-ngroups arrays; OPAC is zone centered, while SOURCE is point centered (using pcen_source). The result has the same units as SOURCE. In the second form, RAY_PATHS was returned by the track_rays function. The integ_linear routine assumes that the SOURCE function varies linearly between the entry and exit points from each zone. This assumption is poor near the turning point, and causes the result to be a discontinuous function of the ray coordinates, unlike the integ_flat result. Interpreted function, defined at i0/drat.i line 1154SEE ALSO: pcen_source, integ_flat, track_rays, form_mesh, streak, snap
internal_rays
internal_rays(rays) returns 6-element (cos,sin,y,z,x,r) representation of RAYS. 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 first dimension of the result always has length 6. The internal coordinates are what Drat uses internally to describe the ray. The coordinate system is rotated about the z-axis until the ray lies in a plane of constant y (there are at least two ways to do this). The point (x,y,z) can be any point on the ray, and r=sqrt(x^2+y^2) is the corresponding cylindrical radius. The clockwise angle theta from the +z-axis to the ray direction (which always lies in the zx-plane) determines cos=cos(theta) and sin=sin(theta). As a specification of a ray, this system is triply redundant because the point (x,y,z) could be any point on the ray, both the sine and cosine of theta appear, and r=sqrt(x^2+y^2). However, the slimits parameter -- used to specify the points along a ray where the transport integration starts and stops -- is measured from the point (x,y,z) specified as a part of the (cos,sin,y,z,x,r) ray coordinate. Thus, any change in the point (x,y,z) on a ray must be accompanied by a corresponding change in the slimits for that ray. Interpreted function, defined at i/rays.i line 155SEE ALSO: form_rays, best_rays, dirt_rays, get_s0, picture_rays
interp
interp(y, x, xp) or interp(y, x, xp, which) returns yp such that (XP, yp) lies on the piecewise linear curve (X(i), Y(i)) (i=1, ..., numberof(X)). Points beyond X(1) are set to Y(1); points beyond X(0) are set to Y(0). The array X must be one dimensional, have numberof(X)>=2, and be either monotonically increasing or monotonically decreasing. The array Y may have more than one dimension, but dimension WHICH must be the same length as X. WHICH defaults to 1, the first dimension of Y. WHICH may be non-positive to count dimensions from the end of Y; a WHICH of 0 means the final dimension of Y. The result yp has dimsof(XP) in place of the WHICH dimension of Y (if XP is scalar, the WHICH dimension is not present). (The dimensions of the result are the same as if an index list with dimsof(XP) were placed in slot WHICH of Y.) Builtin function, documented at i0/std.i line 1178SEE ALSO: integ, digitize, span
interp2
z0= interp2(y0,x0, z,y,x) -or- z0= interp2(y0,x0, z,y,x,reg) return the bilinear interpolate of the function Z(X,Y) at the points (X0,Y0). The X, Y, and optional REG arrays specify a quadrilateral mesh as for the plm function. The Z values are specified at the vertices of this mesh, so Z must have the same dimensions as X and Y. Points outside the mesh get the value 0.0, unless the outside keyword is non-nil, in which case they get that value. Interpreted function, defined at i/digit2.i line 36SEE ALSO: interp, digit2, mesh_loc, plm
ipq_compute
ipq_compute Interpreted function, defined at i/random.i line 362
ipq_function
ipq_function Interpreted function, defined at i/random.i line 450
ipq_setup
model= ipq_setup(x, u) or model= ipq_setup(x, u, power=[pleft,prght]) or model= ipq_setup(x, u, power=[pleft,prght], slope=[sleft,srght]) compute a model for the ipq_compute function, which computes the inverse of a piecewise quadratic function. This function occurs when computing random numbers distributed according to a piecewise linear function. The piecewise linear function is u(x), determined by the discrete points X and U input to ipq_setup. None of the values of U may be negative, and X must be strictly increasing, X(i)SEE ALSO: random_ipq, random_rej0 while SRGHT<0. If either power is greater than or equal to 100, an exponential tail will be used. As a convenience, you may also specify PLEFT or PRGHT of 0 to get an exponential tail. Note: ipq_function(model, xp) returns the function values u(xp) at the points xp, including the tails (if any). ipq_compute(model, yp) returns the xp for which (integral from -infinity to xp) of u(x) equals yp; i.e.- the inverse of the piecewise quadratic. Interpreted function, defined at i/random.i line 277
is_array
is_array(object) returns 1 if OBJECT is an array data type (as opposed to a function, structure definition, index range, I/O stream, etc.), else 0. An array OBJECT can be written to or read from a binary file; non-array Yorick data types cannot. Builtin function, documented at i0/std.i line 506SEE ALSO: is_func, is_void, is_range, is_struct, is_stream
is_func
is_func(object) returns 1 if OBJECT is a Yorick interpreted function, 2 if OBJECT is a built-in (that is, compiled) function, 3 if OBJECT is an autoload (will become either 1 or 2 on reference), else 0. Builtin function, documented at i0/std.i line 515SEE ALSO: is_array, is_void, is_range, is_struct, is_stream, autoload
is_present
is_present(get_vars(f), name) returns 1 if variable NAME is present in file F, 0 if not. Interpreted function, defined at i0/drat.i line 891
is_prime
is_prime(x) return non-zero if and only if X (which must be a scalar integer) is prime. May return a false positive if X is greater than about 3e9, since at most 20000 candidate factors are checked. The absolute value of X is taken first; zero is not prime, but 1 is. Interpreted function, defined at i/gcd.i line 64SEE ALSO: gcd, lcm, factorize
is_range
is_range(object) returns 1 if OBJECT is an index range (e.g.- 3:5 or 11:31:2), else 0. Builtin function, documented at i0/std.i line 530SEE ALSO: is_array, is_func, is_void, is_struct, is_stream
is_scalar
is_scalar(object) returns 1 if OBJECT is a scalar, else 0. Interpreted function, defined at i/string.i line 137SEE ALSO: is_array, is_func, is_void, is_range, is_struct, is_stream
is_stream
is_stream(object) returns 1 if OBJECT is a binary I/O stream (usually a file), else 0. The _read and _write functions work on object if and only if is_stream returns non-zero. Note that is_stream returns 0 for a text stream -- you need the typeof function to test for those. Builtin function, documented at i0/std.i line 544SEE ALSO: is_array, is_func, is_void, is_range, is_struct
is_struct
is_struct(object) returns 1 if OBJECT is the definition of a Yorick struct, else 0. Thus, is_struct(double) returns 1, but is_struct(1.0) returns 0. Builtin function, documented at i0/std.i line 537SEE ALSO: is_array, is_func, is_void, is_range, is_stream
is_vector
is_vector(object) returns 1 if OBJECT is a vector (i.e., OBJECT has a single dimension), else 0. Interpreted function, defined at i/string.i line 144SEE ALSO: is_array, is_func, is_void, is_range, is_struct, is_stream
is_void
is_void(object) returns 1 if OBJECT is nil (the one instance of the void data type), else 0. Builtin function, documented at i0/std.i line 523SEE ALSO: is_array, is_func, is_range, is_struct, is_stream
iterator3
iterator3 Interpreted function, defined at i/slice3.i line 520
iterator3_rect
iterator3_rect Interpreted function, defined at i/slice3.i line 529