anything n : any class or reference
Satimage Text Additions |
mailto:support@satimage-software.com |
matchrecord n : the record returned by "find text"
properties
matchPos integer : offset of the first character found
matchLen integer : length of the match
matchResult string : the matching string (possibly formatted according to the "using" parameter)}
find text v : find text literally or using regular expression syntax. syn ufind text
find text string : the substring to search for
in string : a string or an alias
[starting at integer] : default: 0
[for integer] : length of text after starting
[case sensitive boolean] : default true
[regexp boolean] : use regular expression, default false
[whole word boolean] : default false
[regexpflag list of string] : a subset of {"IGNORECASE", "EXTEND", "MULTILINE", "SINGLELINE", "FIND LONGEST", "FIND NOT EMPTY", "DONT CAPTURE GROUP", "NOTBOL", "NOTEOL", "NEWLINE IN NEGATIVE CC"}; default {}
[using string] : the pattern to generate the string (regexp). Useful for constructs with backward references in regexp, ex.: using "name: \\1". May be a list of strings, in this case matchResult is a list of strings.
[all occurrences boolean] : returns a list of all occurrences. Default: false
[string result boolean] : return only the matching string instead of the whole record
[syntax string] : the syntax for regular expressions. Relevant if regexp parameter is true. A string among ("POSIX" | "POSIX_EXTENDED" | "EMACS" | "GREP" | "GNU_REGEX" | "JAVA" | "PERL" | "RUBY"). Default: "RUBY"
→ record : {matchLen: length of the match, matchPos: offset of the match, matchResult: the matching string (possibly formatted according to the "using" parameter)}
Definitions of options of regexpflag's parameters:
SINGLELINE | '^' -> '\A', '$' -> '\z', '\Z' -> '\z' |
MULTILINE | '.' match newline |
IGNORECASE | ignore case (case-insensitive) |
EXTEND | extended pattern form: [:spaces:] are ignored if not escaped |
FIND_LONGEST | find longest match when using alternations | |
FIND_NOT_EMPTY | ignore empty match |
NEGATE_SINGLELINE | clear SINGLELINE which is default on in POSIX, POSIX_EXTENDED, PERL and JAVA syntaxes. |
DONT_CAPTURE_GROUP | only named group captured: (?<name>subexp) |
NOTBOL | begin of text isn't considered as begin of line |
NOTEOL | end of text isn't considered as end of line |
NEWLINE IN NEGATIVE CC | negative character classes match newline, for instance [^a-z] |
change v : replace all occurrences of a substring syn uchange
change string or list of string : the substring(s) to search for
into string or list of string : the unicode replacement string(s)
in string, list of string, or alias
[starting at integer] : default: 0
[for integer] : length of text after starting
[case sensitive boolean] : default true
[regexp boolean] : default false
[whole word boolean] : default false
[regexpflag list of string] : see the documentation for find text
[syntax string] : see the documentation for find text
→ anything : the new string if the "in" parameter is a string, otherwise the number of changes performed in the file
re_compile v : check a regular expression
re_compile string : the regular expression
[syntax string] : the syntax for regular expressions. Relevant if regexp parameter is true. A string among ("POSIX" | "POSIX_EXTENDED" | "EMACS" | "GREP" | "GNU_REGEX" | "JAVA" | "PERL" | "RUBY"). Default: "RUBY"
splittext v : split a text according to a given separator pattern. Optional matching parameters work like with the "find text" command
splittext string : the string to split
using string : the separator
[case sensitive boolean] : default true
[regexp boolean] : consider the separator pattern as a regular expression, default false
[whole word boolean] : consider only whole word separators. default false
→ list of string : the splitted text. If no separator found, the returned list contains one element: the original string.
filter text v : parse a string (or a text file) into a plist
filter text string : the pattern
in string : a string or an alias
key string : the pattern to generate the keys in the plist
[using string] : the pattern to generate the strings of the plist. Default: "\\0"
[as type] : list or string. Default: string, the plist contains for each key a concatenation of the matches separated by a linefeed character. Otherwise the plist contains for each key an array of matches.
[duplicates boolean] : relevant if the "as" parameter is list. Without duplicates, only new strings are added. Default: true
[case sensitive boolean] : default: true
[whole word boolean] : default: false
[regexpflag list of string] : like in the find text command
[syntax string] : like in the find text command
[into file or CFRef] : the file destination for the plist or an existing plist (see the XMLLib.osax dictionary)
→ string : the XML data if the into parameter is missing
file offset v : find a string in a file and return the offset in byte.
file offset string : the character(s) to find
in alias
[starting at integer] : the initial offset in byte
[encoding string] : a IANA charset name ("MACINTOSH", "UTF-8", "UTF-16", "ISO-8859-1", "windows-1252"…). Default: "UTF-8"
[inclusive boolean] : default: false. If true, the offset includes the requested string
→ integer
readtext v : read a text file. readtext is aware of the presence of BOM.
readtext alias : or an url
[for integer] : the maximum number of bytes to read
[starting at integer] : the initial offset in byte
[encoding string] : a IANA charset name ("MACINTOSH", "UTF-8", "UTF-16", "ISO-8859-1", "windows-1252"…)
→ string
writetext v : write a string in a file.
writetext string
to file : or an url
[append boolean] : default: false. If true, append the string at the end of the file
[encoding string] : a IANA charset name ("MACINTOSH", "UTF-8", "UTF-16", "ISO-8859-1", "windows-1252"…). Default: "UTF-8"
[missing char string] : characters that cannot be converted to the specified encoding are represented with this character. Default: writetext returns an error if it encounters an untranslatable character
→ string
uppercase v : move to uppercase.
uppercase string : the original string
→ string : the uppercase string
lowercase v : move to lowercase.
lowercase string : the original string
→ string : the lowercase string
format v : format a real number using a specification string. Ex: format pi into "##.##"->"3.14". '0' instead of '#' forces trailing zeros. '^' adds a space. "+f1;-f2;f3" provides formats for numbers >0, <0, =0. Encapsulate custom strings with "'".
format real : the number
into string : the formatting string, using #,^,O,.,%,',(,),+,-
[underflow test boolean] : switch to scientific format if the number is too small with respect to the formatting string (default: false)
→ string : the formatted number
atof v : convert a string into a number. Ex: atof "1.5"
atof string or list of string
→ real
encode entities v : substitutes the 5 reserved XML characters found in the direct parameter with the corresponding XML entities.
encode entities string
→ string
resolve entities v : substitutes the XML character entities found in the direct parameter (not the html entities such as é) with the corresponding Unicode characters.
resolve entities string
→ string
escapeURL v : encode a URI by replacing each instance of certain characters by one, two, or three escape sequences representing the UTF-8 encoding of the character
escapeURL string : a URI or a URI component
[escaping string] : additional characters to escape. Default "". To translate URI component (for a GET request for instance) into legal URI component use ";,/?:@&=+$"
→ string : a legal URI
unescapeURL v : decode a URI previously encoded with "escapeURL".
unescapeURL string
[keeping string] : characters to leave escaped. Default "".
→ string
normalize unicode v : normalize Unicode text (canonical composition or decomposition)
normalize unicode string
[decomposition boolean] : want canonical decomposition. default: false. For example, HFS Plus converts all file names to decomposed Unicode, while Macintosh keyboards generally produce precomposed Unicode.
→ string
hash v : normalize (KD) and hash a string
hash string
→ integer
join v : coerce as Unicode text
join list of string
using string : the text delimiter
→ string
printf v : format a string like the C function printf.
strftime v : format a date using a specification string like in the C function strftime.
strftime date or list of date
into string : the formatting string. To obtain ISO 8601 dates, use "%FT%TZ" or "%GW%V-%uT%TZ" (using the 'with GMT' parameter)
[GMT boolean] : if true, output date as GMT. Default: false, the ouput date is local.
→ string : the formatted date
strptime v : Reverse of strftime.
strptime string or list of string : the date string(s)
encoding string : the format of the date corresponding to the into parameter of strftime.
[GMT boolean] : the intput date string is GMT (if unspecified by the format). Default: false
[as type] : date or real (seconds since January 1 2001). Default: date
→ date or real : the date
Satimage File Additions |
URL information n : Reply record for the ‘URL info for’ command
properties
scheme Unicode text : the access scheme
host Unicode text : the host specified by this URL
path Unicode text : the (escaped) location of the target on the host
unix path Unicode text : the (unescaped) location of the target on the host
name Unicode text : the name of the item
user name Unicode text : the user name by which to access this URL
password Unicode text : the password by which to access this URL
name extension Unicode text : the name extension of the URL
url parameters Unicode text
url query Unicode text
url fragment Unicode text
type identifier Unicode text : the item’s type identifier
alias description for v : provide info needed to refer to a remote item
alias description for alias : the remote item
→ list of string : {the AppleTalk zone name, the server machine name, the server volume name, folder name, […], item name}
URL info for v : Parse an URL and returns an URL information record
URL info for string : an URL or an alias
absoluteURL v : resolve a relative URL using a base URL or coerce an absolute URL.
relativeURL v : translate an URL into the most suitable relative URL with respect to a given base.
list files v : make a list of the files contained in the folder
list files alias : a folder
[recursively boolean] : default: true. If false, list files and folders.
[invisibles boolean] : default: false
[of extension list of string] : the required file extension(s)
[not conforming to list of string] : the forbidden Universal Type Identifier(s) (UTI)
[after date] : list only files whose modification date is after the after date parameter
[before date] : list only files whose modification date is before the before date parameter
[names only boolean] : allowed only with recursively false. Default: false
[as type] : string (URL), alias, unix path, path...
→ list of string or list of alias
glob v : list the files or the folders matching a unix pathname pattern
glob string : the pattern
[invisibles boolean] : default: false
[of extension string] : the required file extension(s)
[not conforming to string] : the forbidden Universal Type Identifier(s) (UTI)
[after date] : list only items whose modification date is after the after date parameter
[before date] : list only items whose modification date is before the before date parameter
[names only boolean] : default: false
[as type] : string (URL), alias, unix path, path...
→ list of string or list of alias
backup v : synchronizes 2 folders. backup will resolve the alias located at the first level in the source or destination folders, and no other alias.
backup file specification : the source folder
onto file specification : the destination folder
[level integer] : 0: report only, 1: synchronize folders, 2 : synchronize and report. Default 0.
[after date] : files older than this date are not considered.
[recursively boolean] : recursively synchronize subfolders. Default true.
[except folders list of string] : names of folders to be omitted
[except extensions list of string] : file extensions to be omitted
[only extensions list of string] : consider only these file extensions
→ string : the (optional) report
Resource Suite |
Utilities to read and write resources from/to a file. |
load resource v : get the resource of the given type and id from the specified file
list resources v : return the list of the ids of the resources of the specified type stored in the specified file
list resources type : type of desired resources
from file specification : file to read from
→ anything : the list of ids
get resource name v : return the name of the resource of the specified type and id from the specified file
get resource name integer : index of the desired resource
type type : type of the desired resource
from file specification : file to read from
→ string : the name of the resource
put resource v : write the given resource to the specified file with specified type and id
put resource anything : the AppleScript data that will be stored in the resource
to file specification : the destination file
type type : the resource type
index integer : the resource id
[with name string] : the resource name
Mathematical Functions |
Some mathematical functions. Most functions support as their direct parameter (and return) a list or an array of real. Notice: you may need more parentheses than is intuitive. Ex: cos(a) - b returns cos(a - b), so you may want to write (cos(a)) - b. |
abs v : absolute value of direct parameter
abs real
→ real
acos v : arc cosine of direct parameter
acos real : -1 <= x <= 1
→ real : in radians
acosh v : hyperbolic arc cosine of direct parameter
acosh real : a positive number
→ real
asin v : arc sine of direct parameter
asin real : -1 <= x <= 1
→ real : in radians
asinh v : hyperbolic arc sine of direct parameter
asinh real
→ real
atan v : arc tangent of direct parameter
atan real
→ real : in radians
atan2 v : the angle of the line whose direction is the vector (x , y)
atan2 list of real : 2 real numbers : y (ordinate) and x (abscissa)
→ real : in radians
atanh v : hyperbolic arc tangent of direct parameter
atanh real : -1 < x < 1
→ real
ceil v : round up
ceil real
→ real
cosh v : hyperbolic cosine of direct parameter
cosh real
→ real
cos v : cosine of direct parameter
cos real : the angle (in radians). If the angle is in degrees, multiply it by pi / 180 before taking the cosine.
→ real
erf v : the error function
erf real
→ real
erfc v : the complementary error function
erfc real
→ real
exp v : exponential of direct parameter
exp real
→ real
floor v : round down
floor real
→ real
gamma v : the gamma function
gamma real : a positive number
→ real
hypot v : the square root of the sum of the squares of its arguments
hypot list of real : 2 real numbers
→ real
lgamma v : base-e logarithm of the absolute value of gamma
lgamma real : a positive number
→ real
ln v : base-e logarithm of direct parameter
ln real : a positive real
→ real
log10 v : decimal logarithm of direct parameter
log10 real : a positive real
→ real
sin v : sine of direct parameter
sin real : the angle (in radians)
→ real
sinh v : hyperbolic sine of direct parameter
sinh real
→ real
sqr v : square of direct parameter
sqr real
→ real
sqrt v : square root of direct parameter
sqrt real : a positive number
→ real
tan v : tangent of direct parameter
tan real : the angle (in radians)
→ real
tanh v : hyperbolic tangent of direct parameter
tanh real
→ real
trunc v : round toward zero
trunc real
→ real
Arrays |
array of real n, pl arrays of real : a packed list of real. Can be coerced to an AppleScript list with "as list of real" or "as list of integer". Conversely, a list of real may be translated using "as array of real" for fast computation.
list of real n, pl list of real : an abstract type provided to coerce arrays of real into list of real
list of integer n, pl list of integer : an abstract type provided to coerce arrays of real into list of integer
polynomial n : list of its coefficients, 0th degree first. Supports "as string" and "as list of real" coercions.
responds to
addlist, sublist, multlist, divlist, evalpolynomial, composepolynomial, fitpolynomial.
matrix n : An AppleScript representation of a 2D array of real numbers as a record:
properties
ncols integer : the number of columns
nrows integer : the number of rows
array of real array of real : the data, as an array of real or as a standard AppleScript list of real numbers. Ordering: the first numbers are the data for the first row.
fitrecord n : result of "fitpolynomial"
properties
fit error real : the mean error
fit result anything : the list of the coefficients (constant term first)
fit string string : the polynomial formula as text
statsrecord n : result of "statlist"
properties
maximum real
minimum real
sum real
mean real
variance real
stdev real
median real
skewness real
kurtosis real
maximum index integer
minimum index integer
createarray v : create an array of real
createarray integer : the requested size of the array
[range list of real] : {min,max}
creatematrix v : create an array of real of size ncols*nrows
creatematrix string : "1": array of 1.0, "x": array of x values, "y": array of y values, "d": diagonal square matrix
ncols integer : or a list of real with the "x" option, will make an array with identical rows
nrows integer : or a list of real with the "y" option, will make an array with identical columns
[range list of real] : a range {min,max} for the "x" and "y" options
[diagonal array of real] : the diagonal values for the "d" option. You can also provide a real, in which case the matrix dimensions are specified by ncols=nrows. Default: 1.0 (identity matrix).
[as type] : array of real or matrix, default: array of real
→ array of real : or matrix
randomarray v : create a random array of real
randomarray integer : the requested size of the array
[range list of real] : {min,max}
[seed integer]
replacemissingvalue v : replace missing values (or NAN's) in a list, or an array of real, or a list of such.
replacemissingvalue array of real : or a list of arrays
with real
→ array of real : or a list of arrays
extractitem v : (obsolete: use extractarray instead)
extractitem integer
[thru integer]
[step integer]
[blocksize integer]
[as type]
extractarray v : extract values from an array of real
extractarray array of real
[at integer] : the first item to read or a list of indexes (in which case, the "for", "step" and "blocksize" parameters are not taken into account). 1-based. Default 1
[for integer] : the number of blocks to read. If <0 then read as many blocks as possible. Default 1
[blocksize integer] : size of the block to read at each step. blocksize must be smaller than step
[step integer] : the interval between the beginnings of successive blocks to read. Must be larger than blocksize. Default: blocksize
[as type] : default is array of real, you can provide small real or real for 1 item
changearray v : change items in an array of real
changearray array of real : the array to modify
[at integer] : the index of the first item to change (1 based) or a list of indexes (in which case, the "step" and "blocksize" parameters are not taken into account). default: 1
into array of real : the new values
[blocksize integer] : size of the blocks to copy at each step. The "into" parameter must have a size multiple of blocksize. Default: 1
[step integer] : the interval between the beginnings of successive blocks to write. Must be larger than blocksize. Default: blocksize
insertarray v : insert items into an array of real
insertarray array of real : the values to insert
into array of real : the array to modify
[at integer] : the index of the first item to insert (0: at the beginning) or a list of indexes of the same size as the direct parameter (in which case, the "for", "step" and "blocksize" parameters are not taken into account). default -1 (insert values at the end)
[for integer] : number of blocks to insert. default 1
[step integer] : the number of values between each insertion. default 0
[blocksize integer] : size of the blocks to insert after each step. The direct parameter must have a size multiple of blocksize. Default: 1 if "for" is defined, else the size of the direct parameter.
resamplematrix v : resample a matrix. The incoming matrix is divided into rectangular blocks. Each block may be replaced by its mean value or by another statistical value.
resamplematrix matrix : the matrix to resample
blocksize list of integer : {i,j}, defines the horizontal and vertical sizes of the blocks used for resampling. i and j may be integers (identical blocks) or lists of integers (irregular grid, the items of the lists define the successive sizes of the blocks).
[wanted string] : the following strings or a list of such: "mean", "minimum", "maximum", "stdev", "missing value", "sum", "median", "dispersion". Specify the statistical function computed on each block. Default: "mean".
→ matrix : the resampled matrix, or a list of matrices if 'wanted' is a list. The dimensions of the resampled matrix correspond to the numbers of blocks defined with 'blocksize'.
reversearray v : returns reverse of the direct parameter.
reversearray list of real : ... or an array of real
multlist v : performs the product of the parameters. Each parameter may be a list, an array of real, a matrix or a number. multlist {x1,x2...} with {y1,y2...} returns {x1.y1, x2.y2, ...}; multlist x with {y1,y2...} returns {x.y1, x.y2, ...}
divlist v : same as multlist, but for quotient
addlist v : same as multlist, but for sums
sublist v : same as multlist, but for subtraction
runningsum v : returns the running sum of an array of real
runningsum array of real
statlist v : returns as a record the min, max, min index, max index, mean, sum, standard deviation, variance.
statlist list of real : ... or an array of real
[kurtosis boolean] : if true, statlist compute also skewness, kurtosis and median calculations.
histogram v : given an array of real numbers, return a list of 2 arrays : {sampling values,frequencies}
histogram array of real
samples integer : number of intervals
[minimum real] : lower bound of the intervals
[maximum real] : upper bound of the intervals
→ list of array of real : {sampling values,frequencies}
evalformula v : apply C-like mathematical expressions to arrays of real. Ex: evalformula "a*x^2+y^2" with {"a",2.4,"x",anarray,"y",anotherarray} (or by using a record: evalformula "a*x^2+y^2" with {a:2.4,x:anarray,y:anotherarray})
evalformula string : the formula to compute
with list or record : the definition of the variables occurring in the formula. If a list, an alternation of reference names (strings) and data (number, list of numbers or array of real). Prefer lists because you can't use reserved words with records.
as type : matrix or array of real: the requested type if parameters are matrices. Default: array of real
→ array of real : or real
- The expression of evalformula may include logical operators, yet all values remain real numbers: true expressions evaluate to 1.0, false expressions evaluate to 0.0. Conversely when implied in a logical expression any non null number is considered as true (1.0).
- The direct parameter of evalformula may be a sequence of elementary expressions, provided they are separated with semi-colon ;. You can also use return as the separator, so in complex cases when the expression may require several intermediate steps you can easily use the contents of a text window as the expression. When you use such a composite construct evalformula will return the result of the last (rightmost) expression.
- Instead of one expression you can pass a list of expressions to evalformula: evalformula will return a list of arrays of real.
-
Here is the list of the operators and functions that evalformula supports.
- operators (higher precedence first)
- - (unary)
- * /, + -, ^ (exponentiation)
- >= > <= <== != (equal - not equal), & (logical AND), | (logical OR), ! (boolean not, evaluates to 1 if the operand is 0 and to 0 otherwise).
- algebra
- sqr, sqrt, hypot, pow
- abs, ceil, floor, trunc, max, min
- mod (modulo), remainder
- isnan (test whether the quantity is a ``NAN''. NAN = Not A Number.)
- transcendental
- ln or log (neperian), log10, exp
- cos, sin, tan, acos, asin, atan, atan2 (atan2(y,x))
- cosh, sinh, tanh, acosh, asinh, atanh
- erf, erfc, gamma, lgamma
- functions on arrays
- norm and norm2, respectively the euclidian norm and its square (numbers),
- sum and runsum, respectively the sum (a number) and the running sum (an array),
- count, the number of elements (a number).
maskarray v : suppress items (or rows) out of an array of real (or a matrix) with respect to a mask of 0's and 1's.
maskarray array of real : the array(s) or matrix to be filtered. For a matrix, the rows are deleted.
with array of real : the filter: an array of real, 0's mean that the corresponding items are to be deleted in the direct object(s).
→ array of real : the resulting array(s) or matrix
listvariables v
listvariables string : a formula
→ list of string : the list of all input variables of the direct formula
smootharray v : smooth an array by applying a [1 2 1] filter. First and last value are left unchanged.
smootharray array of real
for integer : how many times the smooth is applied
→ array of real : the smoothed array. It has the same size as the direct parameter
filter v
filter matrix
using array of real : a list of 9 real numbers representing the 3x3 convolution matrix
[reduced boolean] : the resulting matrix is smaller (the 2 extremal columns and rows are removed. Default true.)
→ matrix
evalpolynomial v
evalpolynomial list of real : the polynomial, given as the list of its coefficients, 0th degree (constant term) first. Or an array of real coerced with "as polynomial"
at real : or array of real
→ real
roots of v
roots of list of real : the polynomial, given as the list of its coefficients, 0th degree (constant term) first
[complex boolean] : default : false. Also compute the complex roots
→ list of real : roots of the polynomial. Complex roots are returned as a list of 2 real numbers
composepolynomial v : you can provide arrays of real instead of polynomials
composepolynomial polynomial : or an array of real: the polynomial P(X), given as the list of its coefficients, 0th degree (constant term) first.
with polynomial : Q(X)
→ polynomial : P(Q(X))
pade approximant v : given a polynomial P(X), compute the Padé approximant as the rational function NUM(X)/DEN(X). NUM and DEN are polynomials and the constant term of DEN is 1. syn pade
pade approximant polynomial : or an array of real: the polynomial P(X), given as the list of its coefficients, 0th degree (constant term) first.
numerator integer : the requested degree for NUM(X)
denominator integer : the requested degree for DEN(X)
→ list of polynomial : {NUM(X), DEN(X)}
fitpolynomial v : given two arrays of real {x,y} returns the best polynomial fit y=P(x)
fitpolynomial list of array of real : a list of two arrays of real {x,y}
degree integer : the degree of the resulting polynomial
[number formatting string] : the format string for the formula output. If you don't specify this parameter, no fit string will be provided in the result record.
fitrational v : given two arrays of real {x,y} returns the best rational fit y=NUM(x)/DEN(x). NUM and DEN are polynomials and the constant term of DEN is 1.
fitrational list of array of real : a list of two arrays of real {x,y}
numerator integer : the requested degree for NUM(X)
denominator integer : the requested degree for DEN(X)
[number formatting string] : the format string for the formula output. If you don't specify this parameter, no fit string will be provided in the result record.
→ fitrecord : where fit result if a list of 2 polynomials.
read binary v : read a file of real or small real
read binary file specification : the file
as type : the format of the data file: real (8 bytes), small real (4 bytes), integer (4 bytes), small integer (2 bytes), or byte (1 byte)
[skip integer] : the number of leading bytes to skip
[step integer] : the offset between two consecutive readings
[blocksize integer] : the size of the blocks in the "as" unit. Default 1
[length integer] : the number of blocks to read
[big endian boolean] : is the file encoded as big endian or little endian? Default: system endianess (false on mac intel).
[signed boolean] : Only for integer types. Are they signed or unsigned? Default: true.
write binary v : write the data into a binary file (encoded as big endian)
write binary file specification : the file
with data array of real
[starting at integer] : offset in bytes, default: append data at the end of the file
[as type] : the format of the data to be saved: real (8 bytes), small real (4 bytes), integer (4 bytes), small integer (2 bytes), or byte (1 byte). Default: real.
[big endian boolean] : is the file encoded as big endian or little endian? Default: system endianess (false on mac intel).
find peaks v : Find the peaks (indexes of local min and max values) of an array of real. A minimum height of peaks can be provided.
find peaks array of real : the input data
delta real : the minimum height of a peak. Default:0.0
lookformaxfirst boolean : search a maximum first. Default true.
→ matrix : {list of max's indices, list of min's indices}. Indices are 1-based. Use it with extractarray to get list of values.
arrays auto filling v : defines the behavior when two arrays of real should have the same length: O: fails if lengths are differents, 1: fills the shortest array with NaNs, -1: shrinks the largest array.
arrays auto filling integer : the new setting
→ integer : the previous setting
Array and List Utilities |
sortlist v : sort a list of numbers (or array of real) or a list of strings (case sensitive) or a list of dates. Can also sort a list of lists: lists are sorted either asynchronously or synchronously if the 'with respect to' parameter is specified. Sortlist is stable. syn sortarray
sortlist list of anything : the list to sort (or a list of lists)
[with respect to integer] : rank of the list used as the sort criterion. Relevant only if the direct parameter is a list of lists: requests a synchronous sort. If this parameter is not specified, each list is sorted separately. This parameter may be a list of integer corresponding to a list of criteria in decreasing priority order
[ascending boolean] : default true. May be a list if "with respect to" is already a list.
[remove duplicates boolean] : if true, remove duplicate values. Default false
[comparison integer] : only relevant for list of string. 1 case insensitive, 2 compare numerically, 1+4 force ordering ('A'<'a'<'B'). Default 0
→ list of anything : the sorted list (or lists)
masklist v : suppress items out of a list with respect to a mask of 0's and 1's. See also 'suppress item'
masklist list of any : the list to be filtered.
with array of real : the filter: an array of real, or a list of integers, 0's mean that the corresponding items are to be deleted in the direct object(s).
→ list of any : the resulting list
suppress item v : delete a list of items from a list or a record.
suppress item anything : a list of indices or a list of keywords. Use quotes around custom properties, and also around 4-characters codes. (If you don't know what this means, you don't need it).
from list or record
→ list or record : according to the "from" parameter
exclude items v : remove strings from a list of strings. A list equivalent of the set difference.
exclude items list of string : the list of strings to remove from the input list
from list of string : the input list
[with respect to integer] : rank of the list (of string) used for the filter process. Other input lists may be lists of anything. Relevant only if the 'from' parameter is a list of lists. Default: 1
[case sensitive boolean] : default true
→ list : the cleaned input list, or a list of cleaned lists if the 'from' parameter is a list of lists.
keep items v : remove strings from a list of strings. A list equivalent of the set intersection.
keep items list of string : the list of the strings to keep
from list of string : (or list of list). The input list
[with respect to integer] : rank of the list (of string) used for the filter process. Other input lists may be lists of anything. Relevant only if the 'from' parameter is a list of lists. Default: 1
[case sensitive boolean] : default true
→ list : the cleaned input list, or a list of cleaned lists if the 'from' parameter is a list of lists.
special concat v : concatenate {a_ppty:X, …} and {a_ppty:Y, …} into {a_ppty:Z, …}, where Z is X & Y (resp. X + Y) if X,Y are lists (resp. numbers). Also merges tabulated string arrays side to side (in other terms, adds columns).
special concat record : the record
with record : the additional data
→ record