def __process_psd(self, event): event['psd_x'] = get_psd(event['x']) event['psd_y'] = get_psd(event['y']) event['psd_z'] = get_psd(event['z']) event['psd_vector'] = get_psd(event['vector']) event['x_grms'] = get_grms(event['psd_x']) event['y_grms'] = get_grms(event['psd_y']) event['z_grms'] = get_grms(event['psd_z']) event['vector_grms'] = get_grms(event['psd_vector']) return event
def process_psd(self, events, axis): psds = [] self.logger.info("Started Processing PSD's for %s axis", axis) for event in events: key = 'psd_' + axis if key in event: psds.append(event[key]) else: psds.append(get_psd(event[axis])) self.logger.info("Done Processing PSD's for %s axis", axis) return psds