⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 feasd.tme

📁 speech signal process tools
💻 TME
📖 第 1 页 / 共 3 页
字号:
.lo.if t .ds -- \(em\h'-0.5m'\(em.if n .ds -- ---.SJ "FEA_SD Files\*(--Feature Files for Sampled Data in ESPS".AU "Rodney W. Johnson".TM ETM-S-89-49:rwj 1.3 "1/22/93".sh 1 "INTRODUCTION".ppOriginally ESPS used a special file type for storing sampled signal data..(f\(co Copyright 1993 Entropic Research Lab, Inc. All rights reserved.  .)fThis file type, the SD (``sampled-data'') fileis one of several specialized file typesthat have been replaced with subtypes of the ESPS FEA (``feature'') file type.The new FEA subtype for sampled data, the FEA_SD file,is the subject of this note.See the.i FEA_SD (5-ESPS)and.i FEA (5-ESPS)manual sections for more details on the FEA_SD file type..ppWith the change from SD to FEA_SD,various new facilities become available for use with sampled-data files.In addition to the general facilities that apply to all FEA files,these include complex data types(now in fact supported for FEA files in general)and support for multichannel sampled data.The new facilities are detailed in the next section..ppThe third section mentions some user-level programsthat create FEA_SD files or accept them as input.These include programs for converting between the SD and FEA_SD file typesand programs for multiplexing and demultiplexing multichannel FEA_SD files.Actually  most programs that formerly created or accepted SD filesnow deal in the same way with at least one-channel real FEA_SD files.The ones mentioned explicitly in this section are the onesthat so far have been significantly extendedto deal with complex or multichannel data.Others that could usefully apply to complex or multichannel datawill be added to the list..ppSection 4 gives an overview of the format of a FEA_SD file,the special record structure used for holding FEA_SD sampled data in memory,and the support functions providedfor setting up FEA_SD file headers and record structures andreading and writing FEA_SD files..ppIn most cases, existing SD files will.i nothave to be converted to FEA_SD, although of course they could beconverted with the program provided for that purpose.  Programs thataccepted SD files before FEA_SD was introduced will continue to acceptSD files even though they now accept FEA_SD files as well.  Stepsdescribed in the Section 5 have been taken to assure backwardcompatibility.  First, they make it easy to convert an existingprogram from SD to FEA_SD input without sacrificing the ability toaccept SD files.  Secondly, they make it essentially automatic thatnew programs that take FEA_SD input will also accept SD files..ppSection 6 of this note is a guide to conversion of existing programsso that they will use FEA_SD files instead of or in addition to SD files..sh 1 "NEW FACILITIES".pp.sh 2 "General Feature-File Facilities".ppAn ESPS FEA file consists of a header followed by a sequence ofrecords, each of which consists of a number of named ``fields'' thatmay hold various types of numeric or nonnumeric data or arrays of suchdata.  A field is characterized by its name, data type, and arraydimensions.  In a FEA_SD file there is a single field that holds allthe sampled data.  The field is named "samples", it can have anynumeric data type, and it has one dimension: the number of channels.There needn't be any other fields.  Each record contains one samplefrom each channel; thus in a single-channel file, each record maycomprise merely a single sample..ppFEA files are self-describing: the header of a FEA file contains alist of its fields with their names, data types, dimensions, and otherinformation.  Powerful programs such as.i fea_edit (1-ESPS),.i select (1-ESPS),and.i fea_stats (1-ESPS)can operate on arbitrary FEA files by using the header information.These programs all can now accept FEA_SD files;to them, a FEA_SD file is just another FEA filethat happens to have a field named "samples".Thus you can now edit an ASCII representation of a sampled-data filewith your favorite text editor,run complex queries against the contents of such files,or compute inverse covariance matrices for multichannel sampled data..ppNew fields can be added to any FEA file\*(--see.i add_fea_fld (3-ESPSu)and.i addfea (1-ESPS).FEA_SD files can thus be created that contain other fields than "samples".When such additional fields are present,programs that read FEA_SD files will still work,ignoring the extraneous data.However, FEA_SD files with extra fieldsmay be read less efficiently than ``pure'' FEA_SD files,since the extra fields complicate the record structure..sh 2 "Complex Data Types".ppFEA_SD files were introduced into ESPS at the same that complex data typeswere introduced for general FEA files.As a result, sampled-data files with complex data types are now possible.Formerly just 5 ESPS data types were possible for a sampled-data file:the 5 real numeric types.Now there are 5 more.For every real numeric type there is now a corresponding complex type,consisting of complex numberswhose real and imaginary parts are of that real type.For example the complex type corresponding to the real type.i shortis defined by the C typedef.iptypedef struct {short	real, imag;}    short_cplx;.lpIf.i zis a variable of this type, its real and imaginary parts are.i z.realand.i z.imag,which are variables of type.i short..ppThe complete list of numeric types is shown in the following table.A FEA_SD file can be of any one of these types..sp.TScenter, box, tab(;);c | cl | ll | l.code;type=DOUBLE;doubleFLOAT;floatLONG;longSHORT;shortBYTE;signed charDOUBLE_CPLX;double_cplxFLOAT_CPLX;float_cplxLONG_CPLX;long_cplxSHORT_CPLX;short_cplxBYTE_CPLX;byte_cplx.TE.sp(The symbols in caps, sometimes loosely referred to as ESPS types,actually stand for numeric codes defined in a header file.The lower-case forms are the ones used in writing declarations in C programs.See.i FEA (5-ESPS)for more information.).sh 2 "Multichannel Data".ppIn a sense the SD file type provided for multichannel data in thatthe type-specific part of the SD header had a member.i nchanthat was supposed to indicate the number of channels.But no programs were provided to support multichannel data,and probably no ESPS program ever set.i nchanequal to anything but 1 or 0 (which defaults to 1).In a FEA_SD file, as noted above, the number of channels is the size(number of items) of the field "samples".There are now ESPS programs for multiplexing and demultiplexing(see Section 3.2).These can form a multichannel FEA_SD file by multiplexing severalsingle-channel files, extract channels from a multichannel file,and perform various other similar operation..sh 1 "PROGRAMS THAT READ OR WRITE SAMPLED-DATA FILES".sh 2 "File Conversion".ppTwo programs are available for converting between SD and FEA_SD files.The program.i sdtofea (1-ESPS)reads an SD file and writes a FEA_SD file containing the same data and(as nearly as possible) the same header information.The program.i featosd (1-ESPS)performs the inverse transformation (again, as nearly as possible).See the manual sections for detailed information..sh 2 "Multiplexing and Demultiplexing".ppThe program.i mux (1-ESPS)can multiplex several single-channel or multichannel FEA_SD files intoa single FEA_SD file with as many channels as all the input files takentogether.It can also join pairs of real input channelsinto single complex output channels..ppThe program.i demux (1-ESPS)can extract a subset of the channels from its input fileand either put them in separate single-channel output filesor form a single output file with fewer channels than the input.It can also split complex input channels into pairs of real output channels.See the manual sections for these programs for more complete statementsof the exact capabilities of these programs and for examples of their use..sh 2 "Other Programs".ppMost ESPS programs that formerly expected SD files as input will nowaccept at least single-channel, real FEA_SD files as well.Most ESPS programs that formerly produced SD files as output will nowat least produce equivalent single-channel, real FEA_SD files instead.Many ESPS programs can reasonably be extended to perform useful operationsthat involve reading or writing complex or multichannel sampled data.Now that the basic infrastructure for complex and multichannel supportis in place, these extensions are being done.The programs listed here are just the ones that have at this writing beenextended with support or partial support for complex or multichannelsampled data..pp.i testsdwill now create single-channel FEA_SD files of any numeric data type,including the complex ones.It can generate complex exponentials, which may be damped or frequency-swept,and complex noise sequences with independent real and imaginary parts.It can also create a FEA_SD file containing arbitrary complex data given bynumbers in an ASCII text file..pp.i fftwill now compute fast Fourier transforms of single-channel complex input data..pp.i fftinvwill now create single-channel complex output data as results of the inversefast Fourier transform..pp.i addsdand.i multsdwill add or multiply single-channel FEA_SD files sample by sample.The input files may have arbitrary numeric types, including complex..pp.i copysdwill handle single-channel FEA_SD files of any real or complex type..pp.i pspsand.i pplainwill print both real and complex FEA_SD files (as well as other file types).In.i pspsoutput, complex numbers are formatted as bracketed pairs of real numbers.In.i pplainoutput the real and imaginary partsare simply printed in order as consecutive real numbers..sh 1 "FEA_SD FILE STRUCTURE AND SUPPORT MODULE".ppThis section describes the structure of the header of a FEA_SD file(Subsection 4.1)and the external format of its records(Subsection 4.2).It also describes the support data structure that has been defined for holdingsampled data in memory(Subsection 4.3)and the support functions that are provided for working with FEA_SD filesusing this structure.These include functions for initializing a FEA_SD file header,allocating an instance of the support structure,reading data from a FEA_SD file into the structure,and writing data from the structure to a FEA_SD file..ppThe support structure permits data to be read and written in blocks,rather than one sample at a time, provided certain conditions aremet\*(--\c in particular, only the field "samples" may exist in thefile, and the byte order of the data on the external file must matchthe native byte order of the machine.  There are provisions forautomatic data-type conversion on input or output, but programs thatdo not actually cause conversions to be done do not incur theoverhead..ppMuch of the information in this section is extracted from the.i FEA_SD (5-ESPS)manual section or (in Subsection 4.4) from the.i feasd_recs (3-ESPSu)manual section.See the manual sections themselves for complete details..sh 2 "Header".ppThe SD manual section defines a type-specific header structurewith over 20 items,many of which are relevant to only a few specialized programs.They are present because the SD file type was designed beforegeneric header items (see.i add_genhd (3-ESPS),.i get_genhd (3-ESPS))were introduced in ESPS.In current ESPS, the preferred way of handling such specialized informationis with generic header items, which programs that need them may use andother programs may ignore.The FEA_SD specification calls for only two mandatory header items and onepredefined optional item..ppThe header of a FEA_SD file may contain the following generic header items.The first two are always present.The remaining one is not present in every file,but if present has the meaning given below..pp.TScenter, box, tab(;);c | c | c | cl | l | l | ll | l | l | l.Name;Size;Type;Enums=start_time;1 or no. of;double;NULL ;  channels; ;record_freq;1;double;NULL_max_value;1 or no. of;double;NULL ;  channels; ; .TE.ppThe items have the following meanings..ip start_timeTime corresponding to the first record in the file\*(--given in seconds.If.i start_timehas more than one element, each applies to a separate channel.Separate starting times might be appropriate if, for example,samples from the various channels were recorded in rotation,rather than simultaneously..ip record_freqThe sampling frequency in Hz..ip max_valueThis item is optional.If it is present, no sample may exceed this value in magnitude.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -