📄 fea2esig.1
字号:
.\" Copyright (c) 1995 Entropic Research Laboratory, Inc. All rights reserved..\" @(#)fea2esig.1 1.8 27 Sep 1997 ERL.ds ]W (c) 1993 Entropic Research Laboratory, Inc..if t .ds - \-\h'-0.2m'\-.if n .ds - ---.TH FEA2ESIG 1\-ESPS 27 Sep 1997.SH NAME.nffea2esig \- write FEA file data to Esignal file.fi.SH SYNOPSIS.B fea2esig[.BI \-a " format"] [.BI \-f " field"] .\ .\ . [.BI \-r " range"] [.BI \-x " debug_level"] [.BI \-A " width"] [.BI \-F].I input.fea output.esig.SH DESCRIPTION.PP.I fea2esigreads a file.I input.feain ESPS FEA format (see.IR ESPS (5\-ESPS),.IR FEA (5\-ESPS))and writes an output file.I output.esigin.I Esignalformat (see Ref. [1]) containing the same information(or a subset thereof).If.I input.feais "\-", standard input is used for the input file.If.I output.esigis "\-", standard output is used for the output file.The input and output should not be the same file;however, you can run the program as a filterby specifying "\-" for both input and output..PPNormally, the contents of all fields in all input recordsare copied to the output;one output record is written for each input record.However, with the.B \-roption, one can restrict processing to a subrange of the input records,and with the.B \-foption, one can restrict processing to a specified subset of the input fields..PPEach ESPS FEA field in the input (if retained)becomes an Esignal REQUIRED field with the same name in the output.The rank and dimensions of the field are preserved.The data type of the output is the Esignal type corresponding tothe ESPS type of the input field, as shown in the following table..nf.RS.ta 0.1i 1.3i 2.6i 4.0i.if n \l'2.2i\-'\h'0.3i'\l'3.0i\-'.if t \v'-0.2'\l'2.2i'\h'0.3i'\l'3.0i'\v'0.2' ESPS Esignal Esignal ESPS.if n \l'2.2i\-'\h'0.3i'\l'3.0i\-'.if t \v'-0.2'\l'2.2i'\h'0.3i'\l'3.0i'\v'0.2' DOUBLE DOUBLE DOUBLE_CPLX DOUBLE_COMPLEX FLOAT FLOAT FLOAT_CPLX FLOAT_COMPLEX LONG LONG LONG_CPLX LONG_COMPLEX SHORT SHORT SHORT_CPLX SHORT_COMPLEX BYTE SCHAR SCHAR_CPLX BYTE_COMPLEX CHAR CHAR CODED SHORT.if n \l'2.2i\-'\h'0.3i'\l'3.0i\-'.if t \v'-0.2'\l'2.2i'\h'0.3i'\l'3.0i'\v'0.2'.DT.RE.fiThe output field for an ESPS CODED field (see.IR FEA (5\-ESPS))has a GLOBAL subfield named "enumStrings" that is a character matrix(type CHAR, rank 2) containing the string values of the coded type,one per row, padded to a common lengthwith null characters '\\0' on the right.Row 0 (the first row) contains the string for code 0,row 1 contains the string for code 1, etc..PPIf the input file is tagged, the tags map into a REQUIRED fieldnamed "Tag" in the output;the field is scalar (rank 0) with data type LONG..PPEach ESPS generic header item in the inputbecomes an Esignal GLOBAL field with the same name in the output.The rank of the Esignal field is 1.Its data type is given by the following table..nf.RS.ta 0.1i 1.3i 2.6i 3.8i.if n \l'2.2i\-'\h'0.3i'\l'2.2i\-'.if t \v'-0.2'\l'2.2i'\h'0.3i'\l'2.2i'\v'0.2' Esignal ESPS Esignal ESPS.if n \l'2.2i\-'\h'0.3i'\l'2.2i\-'.if t \v'-0.2'\l'2.2i'\h'0.3i'\l'2.2i'\v'0.2' DOUBLE DOUBLE CHAR CHAR FLOAT FLOAT EFILE CHAR LONG LONG AFILE CHAR SHORT SHORT CODED SHORT.if n \l'2.2i\-'\h'0.3i'\l'2.2i\-'.if t \v'-0.2'\l'2.2i'\h'0.3i'\l'2.2i'\v'0.2'.DT.RE.fiThe output field for a CODED header item, like that for a CODED field,has a GLOBAL subfield named "enumStrings" that is a character matrixcontaining the string values of the coded type..PPThe command line with which.I fea2esigis invoked is converted to a character string andadded to the output file header as a GLOBAL field named "commandLine"..PPIf the input file belongs to a special FEA subtype such as FEA_SD,FEA_ANA, or FEA_SPEC, the output file had a scalar GLOBAL fieldnamed "FeaSubtype" that has type SHORT and contains the subtype code(e.g. 8 for FEA_SD, 2 for FEA_ANA, 7 for FEA_SPEC;the complete set of codes is defined in the ESPS header file.IR esps/fea.h ).If defined,.I FeaSubtypehas a GLOBAL subfield.I enumStringslike that for CODED FEA fields and header items.Each row of the character matrix containsthe name of the corresponding subtype\*-e.g. "FEA_SD" in row 8,"FEA_ANA" in row 2, etc.Row 0 contains the string "NONE" as a placeholder, though.I fea2esigdoes not create the field.I FeaSubtypeif the subtype code is 0.The field.I FeaSubtypeis created only to preserve information in the FEA headerso that the program.IR esig2fea (1\-ESPS)can restore the subtype when converting the Esignal fileback to a FEA file;the notion of a FEA subtype has no exact parallel in the Esignal framework..PPThe output file header has a single VIRTUAL field named "source_0",whose subfield list consists of the input header,converted from FEA format to Esignal.The field contains a string that gives the name of the input file,or "<stdin>" if "\-" was specified for the input.The source-file field listis usually similar to the output-file field list,but there are a number of differences.The source-file field list records all the fields of the input file,even if the.B \-foption is used to specify that only some input fieldsare retained in the output.The "commandLine" field in the source-file field list contains the.I variable.commentstring from the input header.The field lists of the VIRTUAL fields "source_0","source_1", .\ .\ . within "source_0"(i.e. the subfields "source_0.source_0", "source_0.source_1", etc.)consist of the embedded source headers of the input file,converted from FEA format to Esignal..PPIf the input file contains the waves generic header items.I record_freqand.I start_time,the program creates corresponding waves GLOBAL fields.I recordFreqand.I startTimein the output file.These are the header items that.IR xwaves (1\-ESPS)uses for time alignment of displays of fileswith uniformly spaced records.The value of.I recordFreqis just that of.I record_freq.The value of.I startTimeis obtained from that of.I start_timeby adding an offset that is the time differencebetween the first record of the input fileand the first record that is copied to the output.The offset is 0 unless the.B \-roption is used to specify a starting pointother than the first input record.(See the ``Options'' section.)In that case, the offset is the result ofsubtracting 1 from the first record numberand then dividing by the value of.I recordFreq.Like other input generic header items,.I record_freqand.I start_time,if present, are represented in the output by GLOBAL fieldswith the same names.In this case, the field.I start_timeis simply a copy of the input generic header item.I start_time;it is the GLOBAL field.I startTimethat contains the correct starting time of the output file..SH OPTIONS.PPThe following options are supported.Default values are shown in brackets..TP.BI \-a " format \fR[NATIVE]\fP"specifies whether the output Esignal format isA\s-3SCII\s+3 (ASCII), native binary (NATIVE\*-the default),or portable binary (EDR1 or EDR2)..TP.BI \-f " field"specifies the name of an input field to be retained in the output file.The option may be repeated to specify several input fields to be retained.If the option is not specified, all input fields are retained..TP.BI \-r " start" : "last \fR[1:(last in file)]\fP".TP.BI \-r " start" :+ "incr".TP.BI \-r " start"In the first form, a pair of unsigned integers specifies the rangeof input records to be processed.Input record numbers follow ESPS FEA file conventions:the first record in the file is number 1.Either.I startor.I lastmay be omitted; then the default value is used.If.IR last " = " start " + " incr,the second form (with the plus sign) specifies the same range as the first.The third form (omitting the colon) specifies a single record..TP.BI \-x " debug_level \fR[0]\fP"If .I debug_levelis positive,.I fea2esigwrites debugging messages on the standard error output.Larger values result in more output.The default is 0, for no output..TP.BI \-A " width"specifies that ASCII output contains bracketed annotationsthat indicate record numbers, field names, and array indices.The argument indicates the desired approximate width of the output(number of characters per line).In the present implementation the approximation is quite rough:many lines, especially in headers, may well exceed the specified width,and others, particularly in CHAR data, may be narrower than necessary.The option is ignored for binary output..TP.BI \-Fspecifies output in.I field order.If the option is not specified, the output is in.I type order,the default..SH ESPS PARAMETERS.PPThe ESPS parameter file is not read..SH ESPS COMMON.PPThe ESPS common file is not accessed..SH ESPS HEADERS.PPAs mentioned under ``Description'' above,GLOBAL fields corresponding to generic header items in the inputare added to the output file,and embedded FEA-file source headers, converted to Esignal field lists,are added as VIRTUAL fields.The comment string in the input header becomes a GLOBAL field.I commandLinein the output.The input FEA subtype code, if any. is recorded as a GLOBAL field.I FeaSubtypein the output.If generic header items.I record_freqand.I start_timeare present in the input header,GLOBAL fields.I recordFreqand.I startTimeare added to the output;see ``Description'' above for details..SH FUTURE CHANGES.PPFix some of the problems listed under "Bugs"..SH EXAMPLES.PP.SH ERRORS AND DIAGNOSTICS.PPThe program exits with a "Usage" messageif an unrecognized option is used on the command line,or if too many or too few file names are specified.It may exit with one of the following error messagesif the described conditions occur:.nf.RScan't start before beginning of file;empty range of records specified;can't allocate memory for input record;failure converting input header to field list;output order neither TYPE_ORDER nor FIELD_ORDER;can't set field ordering of output;write header failed..RE.fi.SH BUGS.PPHistory information is lost if any of the embedded source headers is anon-FEA ESPS file (e.g. an old-style SD, ANA, or SPEC file,as distinct from a FEA_SD, FEA_ANA, or FEA_SPEC file).Confusion is possible if the input file contains fields with names that.I fea2esiguses for special purposes\*-for example,if there is an input field named "commandLine" or "source_0",or if a tagged input file has a field named "Tag"..IR A -lawand.if n .IR mu -law.if t .IR \(*m -lawencoded FEA_SD files are not recognized as suchand given the appropriate special handling..SH REFERENCES.PP[1] R. W. Johnson,``The Esignal File Format'',Entropic Research Laboratory, Inc., 1995.SH "SEE ALSO".IR esig2fea (1\-ESPS).IR Esignal (3\-Esignal).IR ESPS (5\-ESPS),.br.IR FEA (5\-ESPS),.PP.SH AUTHOR.PPRod Johnson
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -