@@ 65-87 (lines=23) @@ | ||
62 | self.filt = 'bandpass' |
|
63 | ||
64 | ||
65 | def _set_deconv(self, deconv): |
|
66 | ''' |
|
67 | This function sets the deconvolution units. Allowed values are as follows: |
|
68 | ||
69 | .. |ms2| replace:: m/s\ :sup:`2`\ |
|
70 | ||
71 | - ``'VEL'`` - velocity (m/s) |
|
72 | - ``'ACC'`` - acceleration (|ms2|) |
|
73 | - ``'GRAV'`` - fraction of acceleration due to gravity (g, or 9.81 |ms2|) |
|
74 | - ``'DISP'`` - displacement (m) |
|
75 | - ``'CHAN'`` - channel-specific unit calculation, i.e. ``'VEL'`` for geophone channels and ``'ACC'`` for accelerometer channels |
|
76 | ||
77 | :param str deconv: ``'VEL'``, ``'ACC'``, ``'GRAV'``, ``'DISP'``, or ``'CHAN'`` |
|
78 | ''' |
|
79 | deconv = deconv.upper() if deconv else False |
|
80 | self.deconv = deconv if (deconv in rs.UNITS) else False |
|
81 | if self.deconv and rs.inv: |
|
82 | self.units = '%s (%s)' % (rs.UNITS[self.deconv][0], rs.UNITS[self.deconv][1]) if (self.deconv in rs.UNITS) else self.units |
|
83 | printM('Signal deconvolution set to %s' % (self.deconv), self.sender) |
|
84 | else: |
|
85 | self.units = rs.UNITS['CHAN'][1] |
|
86 | self.deconv = False |
|
87 | printM('Alert stream units are %s' % (self.units.strip(' ').lower()), self.sender) |
|
88 | ||
89 | ||
90 | def _find_chn(self): |
@@ 70-92 (lines=23) @@ | ||
67 | printM('Starting.', self.sender) |
|
68 | ||
69 | ||
70 | def _set_deconv(self, deconv): |
|
71 | """ |
|
72 | This function sets the deconvolution units. Allowed values are as follows: |
|
73 | ||
74 | .. |ms2| replace:: m/s\ :sup:`2`\ |
|
75 | ||
76 | - ``'VEL'`` - velocity (m/s) |
|
77 | - ``'ACC'`` - acceleration (|ms2|) |
|
78 | - ``'GRAV'`` - fraction of acceleration due to gravity (g, or 9.81 |ms2|) |
|
79 | - ``'DISP'`` - displacement (m) |
|
80 | - ``'CHAN'`` - channel-specific unit calculation, i.e. ``'VEL'`` for geophone channels and ``'ACC'`` for accelerometer channels |
|
81 | ||
82 | :param str deconv: ``'VEL'``, ``'ACC'``, ``'GRAV'``, ``'DISP'``, or ``'CHAN'`` |
|
83 | """ |
|
84 | deconv = deconv.upper() if deconv else False |
|
85 | self.deconv = deconv if (deconv in rs.UNITS) else False |
|
86 | if self.deconv and rs.inv: |
|
87 | self.units = '%s (%s)' % (rs.UNITS[self.deconv][0], rs.UNITS[self.deconv][1]) if (self.deconv in rs.UNITS) else self.units |
|
88 | printM('Signal deconvolution set to %s' % (self.deconv), self.sender) |
|
89 | else: |
|
90 | self.units = rs.UNITS['CHAN'][1] |
|
91 | self.deconv = False |
|
92 | printM('RSAM stream units are %s' % (self.units.strip(' ').lower()), self.sender) |
|
93 | ||
94 | ||
95 | def _find_chn(self): |