project8 / dripline

Slow controls for medium scale physics experiments based on AMQP centralized messaging
http://www.project8.org/dripline
1 stars 0 forks source link

Sensors need calibration hooks #49

Closed laroque closed 9 years ago

laroque commented 9 years ago

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

laroque commented 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.

laroque commented 9 years ago

This is done with calibrate decorator, seems to be working.