Closed laroque closed 9 years ago
the Spime._calibrate() method is a start. A spime configuration can have a key cal_str which is a string. It must have one instance of {}, which will be replaced with the raw value, and any valid arithmetic operation or function in the math module. Ex: '{}*5+3' to do a linear calibration with b=3 and m=5 'math.log(math.fabs({}))' returns the log of the absolute value
The remaining question is to determine which process is responsible for calling that function and making use of the result.
This is done with calibrate decorator, seems to be working.
I need to think about this a bit more, but for now we're just logging resistances/voltages. We need to add in calibration to pressure/temperature/etc. units