def pre_process_data(self, id):

        event = self.shock.get_event(id)
        result = "no event"

        if event:
            event = self.__process_max_value(event)
            event["drop_height"] = self.__get_drop_height(event)
            event["orientation"] = self.__get_drop_orientation(event)
            event["g_rms"] = get_normalized_rms(event)
            event["is_processed"] = True
            result = self.shock.update(event)

        return result
    def pre_process_data(self, id):
        event = self.vibration.get_event(id)
        result = "no_event"

        if event:
            event = self.__process_max_value(event)
            if self.__is_proper_event(event):
                result = self.vibration.delete(event)
                print result
            else:
                event = self.__process_psd(event)
                event['g_rms'] = get_normalized_rms(event)
                event['is_processed'] = True
                result = self.vibration.update(event)

        return result