NXM Help TRIMMERS

From ICE Enterprises
Jump to navigation Jump to search
Go to the full list of NXM Help pages.


Trimmers of the form (offset1:offset2), where OFFSET1 is INCLUSIVE and OFFSET2 is EXCLUSIVE may be appended to a file name to indicate a subset of data within the file. Note that X-Midas used the form (start:end). This is a confusing construct with zero based accounting.

See User's Guide -> Files -> File Trimmers for more information and examples.

For example;

nM> noop datafile(3:10) outputfile

creates a file consisting of 7 elements starting at element 3 and including element 9. The THIN command uses the same principal of inclusive and exclusive offsets. See explain on THIN for more examples.

If the second arg starts with a "+", it is a relative distance to offset2, or the length of the segment.

If an argument starts with a "-", it is the offset relative to the end of the file. Thus file(-1:+1) refers to the last element of the file.

The trimmers can be registered in abscissa addressing by preceding the value with a tilde. By default, they are indexed. For instance:

nM> fft datafile(0:~10) outputfile

will FFT the first 10 seconds of the file, where

nM> fft datafile(~1:~10) outputfile

will FFT 10 seconds of the file starting 1 second into the file, where

If the arg to the left of the : is blank, the beginning of file is used. If the arg to the right of the : is blank, the end of file is used.

Trimmers must come before qualifiers. For example,

nM> noop datafile(0:nels){aux=cwd} outputfile

uses the AUX qualifier to indicate the file to be used is in the CWD (current working directory) AUX.