Coverage for /opt/obspy/update-docs/src/obspy/obspy/xseed/blockette/blockette061 : 81%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*-
Loop
#\t\t+ +--------------------------------+ \ + #\t\t+ | FIR response,%6s ch %s | \ + #\t\t+ +--------------------------------+ \ + #\t\t B061F03 Stage sequence number: %s B061F05 Symmetry type: %s B061F06 Response in units lookup: %s - %s B061F07 Response out units lookup: %s - %s B061F08 Number of numerators: %s """
""" Blockette 061: FIR Response Blockette.
The FIR blockette is used to specify FIR (Finite Impulse Response) digital filter coefficients. It is an alternative to blockette [54] when specifying FIR filters. The blockette recognizes the various forms of filter symmetry and can exploit them to reduce the number of factors specified to the blockette. In July 2007, the FDSN adopted a convention that requires the coefficients to be listed in forward time order. As a reference, minimum-phase filters (which are asymmetric) should be written with the largest values near the beginning of the coefficient list. """
Integer(3, "Stage sequence number", 2), VariableString(4, "Response Name", 1, 25, 'UN_'), FixedString(5, "Symmetry Code", 1, 'U'), Integer(6, "Signal In Units", 3, xpath=34), Integer(7, "Signal Out Units", 3, xpath=34), Integer(8, "Number of Coefficients", 4), #REPEAT field 9 for the Number of Coefficients Loop("FIR Coefficient", "Number of Coefficients", [ Float(9, "FIR Coefficient", 14, mask='%+1.7e')], flat=True), ]
""" Returns RESP string. """ self.stage_sequence_number, self.symmetry_code, LookupCode(abbreviations, 34, 'unit_name', 'unit_lookup_code', self.signal_in_units), LookupCode(abbreviations, 34, 'unit_description', 'unit_lookup_code', self.signal_in_units), LookupCode(abbreviations, 34, 'unit_name', 'unit_lookup_code', self.signal_out_units), LookupCode(abbreviations, 34, 'unit_description', 'unit_lookup_code', self.signal_out_units), self.number_of_coefficients) (_i, formatRESP(self.FIR_coefficient[_i], 6)) elif self.number_of_coefficients == 1: out += '#\t\tNumerator coefficients:\n' out += '#\t\t i, coefficient\n' out += 'B061F09 %4s %13s\n' % \ (0, formatRESP(self.FIR_coefficient, 6)) |