This is something that just caught me out so I thought I'd elaborate on it ...
In 3.1.4 FIR-IIR Filters,
Practical Concerns, this sentence:
In StationXML, a symmetric filter can be represented using a FIR response stage, with sub-element indicating the symmetry (odd/even).
should be replaced with:
In StationXML, a FIR filter can be represented using a FIR response stage, with sub-element indicating the symmetry (ODD/EVEN/NONE). Note that here, both ODD and EVEN symmetry refer to a symmetric FIR filter (there is no flag to indicate an asymmetric filter), with the ODD symmetry indicating the total number of FIR coefficients, M, is odd (so that the point of symmetry corresponds to index (M-1)/2 in the coefficient array. This is also referred to as a "Type I" FIR filter in dsp literature and is often used in seismic datalogger desampling sequences. In contrast, a symmetric FIR filter with EVEN symmetry has a total number of FIR coefficients, M, that is even. As a result, there is no actual index at the point of symmetry. This is also referred to as a "Type II" FIR filter.
The purpose of the Symmetry element is to obviate the need to enter the entire M FIR coefficients when the filter is symmetric (ODD or EVEN). In the case of EVEN symmetry, only the unique M/2 coefficients need to be supplied, while in the case of ODD symmetry, the number of unique coefficients is M/2 + 1. In the case of EVEN symmetry (an even total number of coefficients), there will be an even number of unique coefficients.
However, importantly, in the case of ODD symmetry (an odd total number of coefficients), the number of unique coefficients specified in the StationXML may be either odd or even.
For example, the first decimation stage of the CENTAUR datalogger uses a FIR filter with M=173 total coefficients:
This filter has odd symmetry about coefficient number 86 (the 87th coefficient when counting from 0).
Hence, to represent this as a FIR filter with ODD symmetry we would use:
So the reduced number of symmetric coefficients is: (M-1)/2 + 1 = (173-1)/2 + 1 = 87, which is odd.
The next stage in the CENTAUR decimation sequence has M=95 coefficients and also has ODD symmetry, however, the number of symmetric coefficients is: (95-1)/2 + 1 = 48, which is even.
The point is, one cannot tell the "symmetry" (ODD/EVEN/NONE) just by looking at the (possibly reduced) number of coefficients in the StationXML FIR element.
When in doubt, simply enter all of the FIR coefficients with Symmetry = None, so that no assumptions will be made when calculating the frequency response of the filter.
This is something that just caught me out so I thought I'd elaborate on it ...
In 3.1.4 FIR-IIR Filters, Practical Concerns, this sentence:
should be replaced with:
In StationXML, a FIR filter can be represented using a FIR response stage, with sub-element indicating the symmetry (ODD/EVEN/NONE). Note that here, both ODD and EVEN symmetry refer to a symmetric FIR filter (there is no flag to indicate an asymmetric filter), with the ODD symmetry indicating the total number of FIR coefficients, M, is odd (so that the point of symmetry corresponds to index (M-1)/2 in the coefficient array. This is also referred to as a "Type I" FIR filter in dsp literature and is often used in seismic datalogger desampling sequences. In contrast, a symmetric FIR filter with EVEN symmetry has a total number of FIR coefficients, M, that is even. As a result, there is no actual index at the point of symmetry. This is also referred to as a "Type II" FIR filter.
The purpose of the Symmetry element is to obviate the need to enter the entire M FIR coefficients when the filter is symmetric (ODD or EVEN). In the case of EVEN symmetry, only the unique M/2 coefficients need to be supplied, while in the case of ODD symmetry, the number of unique coefficients is M/2 + 1. In the case of EVEN symmetry (an even total number of coefficients), there will be an even number of unique coefficients. However, importantly, in the case of ODD symmetry (an odd total number of coefficients), the number of unique coefficients specified in the StationXML may be either odd or even.
For example, the first decimation stage of the CENTAUR datalogger uses a FIR filter with M=173 total coefficients:
This filter has odd symmetry about coefficient number 86 (the 87th coefficient when counting from 0). Hence, to represent this as a FIR filter with ODD symmetry we would use:
So the reduced number of symmetric coefficients is: (M-1)/2 + 1 = (173-1)/2 + 1 = 87, which is odd.
The next stage in the CENTAUR decimation sequence has M=95 coefficients and also has ODD symmetry, however, the number of symmetric coefficients is: (95-1)/2 + 1 = 48, which is even.
The point is, one cannot tell the "symmetry" (ODD/EVEN/NONE) just by looking at the (possibly reduced) number of coefficients in the StationXML FIR element. When in doubt, simply enter all of the FIR coefficients with Symmetry = None, so that no assumptions will be made when calculating the frequency response of the filter.