all functions - t
tan
tan Builtin function, documented at i0/std.i line 565SEE sin
tanh
tanh Builtin function, documented at i0/std.i line 604SEE sinh
timer
timer, elapsed or timer, elapsed, split updates the ELAPSED and optionally SPLIT timing arrays. These arrays must each be of type array(double,3); the layout is [cpu, system, wall], with all three times measured in seconds. ELAPSED is updated to the total times elapsed since this copy of Yorick started. SPLIT is incremented by the difference between the new values of ELAPSED and the values of ELAPSED on entry. This feature allows for primitive code profiling by keeping separate accounting of time usage in several categories, e.g.-- elapsed= total= cat1= cat2= cat3= array(double, 3); timer, elapsed0; elasped= elapsed0; ... category 1 code ... timer, elapsed, cat1; ... category 2 code ... timer, elapsed, cat2; ... category 3 code ... timer, elapsed, cat3; ... more category 2 code ... timer, elapsed, cat2; timer, elapsed0, total; The wall time is not absolutely reliable, owning to possible rollover at midnight. Builtin function, documented at i0/std.i line 3555SEE ALSO: timestamp, timer_print
timer_print
timer_print, label1, split1, label2, split2, ... or timer_print or timer_print, label_total prints out a timing summary for splits accumulated by timer. timer_print, "category 1", cat1, "category 2", cat2, "category 3", cat3, "total", total; Interpreted function, defined at i0/std.i line 3583SEE ALSO: timer
timestamp
timestamp() returns string of the form "Sun Jan 3 15:14:13 1988" -- always has 24 characters. Builtin function, documented at i0/std.i line 3548SEE ALSO: timer
to_corners3
to_corners(list, ni, nj) convert a LIST of cell indices in an (NI-1)-by-(NJ-1)-by-(nk-1) logically rectangular grid of cells into the list of 2-by-2-by-2-by-numberof(LIST) cell corner indices in the corresponding NI-by-NJ-by-nk list of vertices. Interpreted function, defined at i/slice3.i line 488
to_db
to_db(signal, ref) or to_db(signal) return 20.*log10(abs(SIGNAL)/REF), the number of decibels corresponding to the input SIGNAL. REF defaults to 1.0. Interpreted function, defined at i/filter.i line 510SEE ALSO: fil_response, to_phase
to_ecliptic
to_ecliptic Interpreted function, defined at i/kepler.i line 157
to_hsv
hsv= to_hsv(rgb) or hsv= to_hsv([r,g,b]) return the HSV representation of the n-by-3 array of RGB colors rgb: red, green, blue from 0 to 255 hsv: h= hue in degrees, red=0, green=120, blue=240 s= saturation from 0 (gray) to 1 (full hue) v= value from 0 (black) to 1 (full intensity) s= 1 - min(r,g,b)/max(r,g,b) v= max(r,g,b) Interpreted function, defined at i/color.i line 111SEE ALSO: to_rgb
to_phase
to_phase(signal) or to_phase(signal, 1) return atan(SIGNAL.im,SIGNAL.re), the phase of the input SIGNAL. If the second argument is present and non-0, the phase will be in degrees; by default the phase is in radians. To_phase attempts to unroll any jumps from -180 to +180 degrees or vice-versa; zero phase will be taken somewhere near the middle of the signal. The external variable to_phase_eps controls the details of this unrolling; you can turn off unrolling by setting to_phase_eps=0.0 (initially it is 0.3). Interpreted function, defined at i/filter.i line 524SEE ALSO: fil_response, to_phase
to_rgb
rgb= to_rgb(hsv) or rgb= to_rgb([h,s,v]) return the RGB representation of the n-by-3 array of HSV colors rgb: red, green, blue from 0 to 255 hsv: h= hue in degrees, red=0, green=120, blue=240 s= saturation from 0 (gray) to 1 (full hue) v= value from 0 (black) to 1 (full intensity) s= 1 - min(r,g,b)/max(r,g,b) v= max(r,g,b)/255 Interpreted function, defined at i/color.i line 68SEE ALSO: to_hsv
toy_mesh
toy_mesh, filename generates a toy mesh in the file FILENAME in order to be able to play with the rezone function. (FILENAME must be a string enclosed in double quotes, of course.) Interpreted function, defined at i/rezone.i line 13SEE ALSO: rezone
track_combine
nlist = track_combine(nm,cm,sm, np,cp,sp, c, s) combine two track_reduce results NM,CM,SM, and NP,CP,SP, which represent the first and second halves of a set of rays. See bi_dir for a typical application. The returned NLIST is NM+NP, or NM+NP-1 for those rays where the final CM is identical to the initial CP. C, S, together with NLIST are the output arrays, as for track_reduce. Interpreted function, defined at i0/hex.i line 270SEE ALSO: track_reduce, bi_dir
track_integ
result= track_integ(nlist, transp, selfem, last) integrates a transport equation by doing the sums: transparency(i) = transparency(i-1) * TRANSP(i) emissivity(i) = emissivity(i-1) * TRANSP(i) + SELFEM(i) returning only the final values transparency(n) and emissivity(n). The NLIST is a list of n values, so that many transport integrals can be performed simultaneously; sum(NLIST) = numberof(TRANSP) = numberof(SELFEM). The result is 2-by-dimsof(NLIST). If TRANSP is nil, result is dimsof(NLIST) sums of SELFEM. If SELFEM is nil, result is dimsof(NLIST) products of TRANSP. TRANSP and SELFEM may by 2D to do multigroup integrations simultaneously. By default, the group dimension is first, but if LAST is non-nil and non-zero, the group dimension is second. In either case, the result will be ngroup-by-2-by-dimsof(NLIST). track_solve is the higher-level interface. Interpreted function, defined at i0/hex.i line 397SEE ALSO: track_reduce, track_solve, track_solve
track_rays
ray_paths= track_rays(rays, mesh, slimits) returns array of Ray_Path structs representing the progress of RAYS through the MESH between the given SLIMITS. Interpreted function, defined at i0/drat.i line 1244SEE ALSO: Ray_Path, integ_flat, get_ray-path
track_reduce
nlist= track_reduce(c, s) or nlist= track_reduce(c, s, rays, slimits) compresses the C and S returns from the tracking routines (see hex5_track) to the following form: [cell1,cell2,cell3,..., cell1,cell2,cell3,..., ...] [s1-s0,s2-s1,s3-s2,..., s1-s0,s2-s1,s3-s2,..., ...] returning nlist as [#hits, #hits, ...] In this form, any negative #hits are combined with the preceding positive values, and #hits=1 (indicating a miss) appear as #hits=0 in nlist. Hence, nlist always has exactly Nrays elements. If RAYS is supplied, it is used to force the dimensions of the returned nlist to match the dimensions of RAYS (the value of RAYS is never used). The RAYS argument need not have the trailing 2 dimension, so if you specified RAYS as [P,Q] if the call to hex5_track, you can use just P or Q as the RAYS argument to track_reduce. If SLIMITS is supplied, it should be [smin,smax] or [smin,smax]- by-dimsof(nlist) in order to reject input S values outside the specified limits. The C list will be culled appropriately, and the first and last returned ds values adjusted. With a non-zero flip= keyword, the order of the elements of C and S within each group of #hits is reversed, so that a subsequent track_solve will track the ray backwards. If you use this, both the ray direction input to the tracking routine and any SLIMITS argument here should refer to the reverse of the ray you intend to track. Interpreted function, defined at i0/hex.i line 158SEE ALSO: hex5_track, c_adjust, track_solve, track_integ, bi_dir,
track_combine
track_solve
result= track_solve(nlist, c, s, akap, ekap, last) integrates a transport equation for NLIST, C, and S returned by track_reduce (and optionally c_adjust). The RAYS argument is used only to set the dimensions of the result. AKAP and EKAP are mesh-sized arrays of opacity and emissivity, respectively. They may have an additional group dimension, as well. The units of AKAP are 1/length (where length is the unit of S), while EKAP is (spectral) power per unit area (length^2), where the power is what ever units you want the result in. The emission per unit volume of material is EKAP*AKAP; an optically thick block of material emits EKAP per unit surface. The NLIST is a list of n values, so that many transport integrals can be performed simultaneously; sum(NLIST) = numberof(AKAP) = numberof(EKAP). The result is 2-by-dimsof(NLIST), where the first element of the first index is the transmission fraction through the entire ray path, and the second element of the result is the self-emission along the ray, which has the same units as EKAP. If EKAP is nil, result is dimsof(NLIST) -- exactly the same as the transparency (1st element of result) when both EKAP and AKAP are specified. If AKAP is nil, result is dimsof(NLIST). In this case, EKAP must have units of emission per unit volume instead of per unit area; the result will be the sum of EKAP*S along each ray. AKAP and EKAP may by 2D to do multigroup integrations simultaneously. By default, the group dimension is first, but if LAST is non-nil and non-zero, the group dimension is last. In either case, the result will be ngroup-by-2-by-dimsof(NLIST). To use in conjuction with hex5_track, one might do this: c= hex5_track(mesh, rays, s); nlist= track_reduce(c, s, rays); c_adjust, c, mesh; // if necessary result= track_solve(nlist, c, s, akap, ekap); Interpreted function, defined at i0/hex.i line 456SEE ALSO: track_reduce, hex5_track
transpose
transpose(x) or transpose(x, permutation1, permutation2, ...) transpose the first and last dimensions of array X. In the second form, each PERMUTATION specifies a simple permutation of the dimensions of X. These permutations are compounded left to right to determine the final permutation to be applied to the dimensions of X. Each PERMUTATION is either an integer or a 1D array of integers. A 1D array specifies a cyclic permutation of the dimensions as follows: [3, 5, 2] moves the 3rd dimension to the 5th dimension, the 5th dimension to the 2nd dimension, and the 2nd dimension to the 3rd dimension. Non-positive numbers count from the end of the dimension list of X, so that 0 is the final dimension, -1 in the next to last, etc. A scalar PERMUTATION is a shorthand for a cyclic permutation of all of the dimensions of X. The value of the scalar is the dimension to which the 1st dimension will move. Examples: Let x have dimsof(x) equal [6, 1,2,3,4,5,6] in order to be able to easily identify a dimension by its length. Then: dimsof(x) == [6, 1,2,3,4,5,6] dimsof(transpose(x)) == [6, 6,2,3,4,5,1] dimsof(transpose(x,[1,2])) == [6, 2,1,3,4,5,6] dimsof(transpose(x,[1,0])) == [6, 6,2,3,4,5,1] dimsof(transpose(x,2)) == [6, 6,1,2,3,4,5] dimsof(transpose(x,0)) == [6, 2,3,4,5,6,1] dimsof(transpose(x,3)) == [6, 5,6,1,2,3,4] dimsof(transpose(x,[4,6,3],[2,5])) == [6, 1,5,6,3,2,4] Builtin function, documented at i0/std.i line 1274
trapezoid
trapezoid Interpreted function, defined at i/romberg.i line 95
tspline
d2ydx2= tspline(tension, y, x) -or- yp= tspline(tension, d2ydx2, y, x, xp) -or- yp= tspline(tension, y, x, xp) computes a tensioned spline curve passing through the points (X, Y). The first argument, TENSION, is a positive number which determines the "tension" in the spline. In a cubic spline, the second derivative of the spline function varies linearly between the points X. In the tensioned spline, the curvature is concentrated near the points X, falling off at a rate proportional to the tension. Between the points of X, the function varies as: y= C1*exp(k*x) + C2*exp(-k*x) + C3*x + C4 The parameter k is proportional to the TENSION; for k->0, the function reduces to the cubic spline (a piecewise cubic function), while for k->infinity, the function reduces to the piecewise linear function connecting the points. The TENSION argument may either be a scalar value, in which case, k will be TENSION*(numberof(X)-1)/(max(X)-min(X)) in every interval of X, or TENSION may be an array of length one less than the length of X, in which case the parameter k will be abs(TENSION/X(dif)), possibly varying from one interval to the next. You can use a variable tension to flatten "bumps" in one interval without affecting nearby intervals. Internally, tspline forces k*X(dif) to lie between 0.01 and 100.0 in every interval, independent of the value of TENSION. Typically, the most dramatic variation occurs between TENSION of 1.0 and 10.0. With three arguments, Y and X, spline returns the derivatives D2YDX2 at the points, an array of the same length as X and Y. The D2YDX2 values are chosen so that the tensioned spline function returned by the five argument call will have a continuous first derivative. The X array must be strictly monotonic; it may either increase or decrease. The values Y and the derivatives D2YDX2 uniquely determine a tensioned spline function, whose value is returned in the five argument form. In this form, tspline is analogous to the piecewise linear interpolator interp; usually you will regard it as a continuous function of its fifth (or fourth) argument, XP. The XP array may have any dimensionality; the result YP will have the same dimensions as XP. The D2YDX2 argument will normally have been computed by a previous call to the three argument tspline function. If you will be computing the values of the spline function for many sets of XP, use this five argument form. If you only want the tspline evaluated at a single set of XP, use the four argument form. This is equivalent to: yp= tspline(tension, tspline(tension,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). Interpreted function, defined at i/spline.i line 122SEE ALSO: interp, tspline
typeof
typeof(object) returns a string describing the type of object. For the basic data types, these are "char", "short", "int", "long", "float", "double", "complex", "string", "pointer", "struct_instance", "void", "range", "struct_definition", "function", "builtin", "stream" (for a binary stream), and "text_stream". Builtin function, documented at i0/std.i line 445SEE ALSO: structof, dimsof, sizeof, numberof, nameof