Coverage for /opt/obspy/update-docs/src/obspy/obspy/xseed/blockette/blockette048 : 76%

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 -*-
""" Blockette 048: Channel Sensitivity/Gain Dictionary Blockette.
See Channel Sensitivity/Gain Blockette [58] for more information. """
Integer(3, "Response Lookup Key", 4), VariableString(4, "Response Name", 1, 25, 'UN_'), Float(5, "Sensitivity gain", 12, mask='%+1.5e'), Float(6, "Frequency", 12, mask='%+1.5e'), Integer(7, "Number of history values", 2), # REPEAT fields 8 — 10 for the Number of history values: Loop('History', "Number of history values", [ Float(8, "Sensitivity for calibration", 12, mask='%+1.5e'), Float(9, "Frequency of calibration sensitivity", 12, mask='%+1.5e'), VariableString(10, "Time of above calibration", 1, 22, 'T') ]) ]
""" Returns RESP string. """ '#\t\t+ +---------------------------------------+' + \ ' +\n' + \ '#\t\t+ | Channel Sensitivity,' + \ '%6s ch %s | +\n' % (station, channel) + \ '#\t\t+ +---------------------------------------+' + \ ' +\n' + \ '#\t\t\n' + \ 'B048F05 Sensitivity: %s\n' \ % formatRESP(self.sensitivity_gain, 6) + \ 'B048F06 Frequency of sensitivity: %s\n' \ % formatRESP(self.frequency, 6) + \ 'B048F07 Number of calibrations: %s\n' \ % self.number_of_history_values string += \ '#\t\tCalibrations:\n' + \ '#\t\t i, sensitivity, frequency, time of calibration\n' for _i in xrange(self.number_of_history_values): string += \ 'B048F08-09 %2s %13s %13s %s\n' \ % (formatRESP(self.sensitivity_for_calibration[_i], 6), formatRESP(self.frequency_of_calibration_sensitivity[_i], 6), self.time_of_above_calibration[_i].formatSEED()) string += \ '#\t\tCalibrations:\n' + \ '#\t\t i, sensitivity, frequency, time of calibration\n' + \ 'B048F08-09 0 %13s %13s %s\n' \ % (formatRESP(self.sensitivity_for_calibration, 6), formatRESP(self.frequency_of_calibration_sensitivity, 6), self.time_of_above_calibration.formatSEED()) |