コード例 #1
0
    def __init__(self):
        Processor.__init__(self,"GSRProcessor", [("source","Raw gsr data")], ["GSR rate of change"],[("outputRatio","Number of input values per output value")])
        self.currentRate=0

        # minimum and maximums - nb. minimum and maximum are reset when an R spike is detected (both to current value, then 
        self.diffValue=0
        self.lastValue=None
        self.skipValueCount=0
	
        # queue to store last n values for moving average
        self.histQueue=deque([],GSRProcessor.HIST_QUEUE_COUNT)
        self.run()
コード例 #2
0
    def __init__(self):
        Processor.__init__(
            self, "BreathProcessor", [("Breath", "Raw respiration stream")], ["Respiration rate (bpm)"], []
        )
        self.currentRate = 0

        # minimum and maximums - nb. minimum and maximum are reset when an R spike is detected (both to current value, then
        self.lastValue = None
        self.lastDerivative = None
        self.lastSecondDerivative = 0
        self.beatTimes = deque([], BreathProcessor.RATE_BEAT_COUNT)
        self.dataCount = 0
        self.lastUnsmoothedValue = 0
        self.bandpass = BreathProcessor.BandPassFilter()
        self.lowpass = BreathProcessor.BandPassFilter()
        self.run()
コード例 #3
0
    def __init__(self):
        Processor.__init__(self,"ECGHRProcessor", [("source","Raw ECG pulse data")], ["Heart rate (bpm)"],[])
        self.currentRate=0

        # minimum and maximums - nb. minimum and maximum are reset when an R spike is detected (both to current value, then 
        self.minDerivative=0.0
        self.maxDerivative=0.0
        self.lastValue=None
        self.lastDerivative=None
        self.lastSmoothedDerivative=None
        self.dataCount=0
        self.minDerivativeTime=0
        self.maxDerivativeTime=0
        self.lastBeatTime=-9990
        self.beatTimes=deque([],HRProcessor.RATE_BEAT_COUNT)
        self.diffQueue=deque([],HRProcessor.DIFF_QUEUE_COUNT)
        self.bigQueue=deque([],HRProcessor.BIG_QUEUE_COUNT)
        self.lasttime = None
        self.run()
コード例 #4
0
 def __init__(self):
     Processor.__init__(self,"MultiplicationProcessor", [("Input","Input Stream")], ["Multiplied Input"],[("Factor","Value to multiply by","100")])    
     self.run()  
コード例 #5
0
 def __init__(self):
     Processor.__init__(self, "JsonMultiChannelBufferProcessor", [("*source", "input data")], [("buffered", "Buffered JSON blob")], [("type","choose millis or values", "values"),("number", "number of values or millis", "128"),("channelnames","comma seperated names for all incoming channels",""),("channeltypes","comma seperated trpes for all incoming channels",""),("sigfigs","accuracy of the data - use -1 for default","-1")])
     self.run()
コード例 #6
0
 def __init__(self):
     Processor.__init__(self,"HRScalingProcessor", [("Input","Input Stream")], ["Scaled Input"],[("Age","Age","25"),("Fitness","Fitness","4"),("Gender","Gender","Male")])    
     self.run()  
コード例 #7
0
 def __init__(self):
     Processor.__init__(self,"SummativeProcessor", [("*sources","List of sources to sum")], ["Sum of all sources"],[])
     self.run()
コード例 #8
0
 def __init__(self):
     Processor.__init__(self, "AverageProcessor", [("source", "Current numerical data")], [("Average", "Average Value")], [])
     self.count = 0
     self.total = 0
     self.run()
コード例 #9
0
 def __init__(self):
     Processor.__init__(self,"ScalingProcessor", [("Input","Input Stream")], [("Scaled","Scaled Input")],[("Old Min","Old Min","0.0"),("Old Max","Old Max","1.0"),("New Min","New Min","0.0"),("New Max","New Max","100.0")])    
     self.run()  
コード例 #10
0
 def __init__(self):
     Processor.__init__(self,"StreamMultiplicationProcessor", [("Signal1","Signal 1 Stream"),("Signal2","Signal 2 Stream")], [("Arousal","Multiplied value of the two streams")],[("divideTotal","divide the total by this value","100")])      
     self.dominantQ = None
     self.run()  
コード例 #11
0
 def __init__(self):
     Processor.__init__(self,"WindowThresholdCounterProcessor", [("source","Raw data"),("regularsource","Standard Data Rate Control")], ["Threshold Peak Count"],[("WindowSize","Number of values to calculate threshold count from","1920"),("RollRate","Rate at which the window moves-effectively the output rate","1920"),("Threshold","THreshold Value to count over","90")])
     self.windowCounter = 0
     self.rollCounter = 0
     self.sum = 0
     self.run()
コード例 #12
0
 def __init__(self,):
     Processor.__init__(self,"SmoothingProcessor", [("source","data source to smooth")], ["Smoothed data"],[("smoothing","Initial smoothing factor (0.0 - 1.0)")],self.defineGUI)
     self.lastValue=None
     self.MAX_RANGE = 10000.0
     self.despikeValues=[]
     self.run()
コード例 #13
0
 def __init__(self):
     Processor.__init__(self,"PearsonConcordanceProcessor", [("Signal1","Signal 1 Stream"),("Signal2","Signal 2 Stream")], ["P value for the two streams", "Correlation value for the two streams"],[("Window Size","Number of input values per output value","15")])      
     self.windowSize=256
     self.dominantQ = None
     self.bothQsActive = False
     self.run()