secop_psi.softcal: default path for calib
Change-Id: I5ad2159587f13e1a0bcb75764397d4c784ed1c87
This commit is contained in:
@ -40,5 +40,5 @@ value.datatype = {"type":"double", "unit":"Ohm"}
|
|||||||
class=secop_psi.softcal.Sensor
|
class=secop_psi.softcal.Sensor
|
||||||
description=temperature sensor, soft calibration
|
description=temperature sensor, soft calibration
|
||||||
rawsensor=res
|
rawsensor=res
|
||||||
calib = /home/l_samenv/frappy/secop_psi/calcurves/X132254.340
|
calib = X132254
|
||||||
value.unit = "K"
|
value.unit = "K"
|
||||||
|
@ -49,5 +49,5 @@ channel = A
|
|||||||
[T]
|
[T]
|
||||||
class = secop_psi.softcal.Sensor
|
class = secop_psi.softcal.Sensor
|
||||||
rawsensor = res
|
rawsensor = res
|
||||||
calib = /home/l_samenv/frappy/secop_psi/calcurves/X132254.340
|
calib = X132254
|
||||||
value.unit = K
|
value.unit = K
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
from os.path import basename, exists, join
|
from os.path import basename, dirname, exists, join
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from scipy.interpolate import splev, splrep # pylint: disable=import-error
|
from scipy.interpolate import splev, splrep # pylint: disable=import-error
|
||||||
@ -109,7 +109,9 @@ class CalCurve:
|
|||||||
calibname = sensopt.pop(0)
|
calibname = sensopt.pop(0)
|
||||||
_, dot, ext = basename(calibname).rpartition('.')
|
_, dot, ext = basename(calibname).rpartition('.')
|
||||||
kind = None
|
kind = None
|
||||||
for path in os.environ.get('FRAPPY_CALIB_PATH', '').split(','):
|
pathlist = os.environ.get('FRAPPY_CALIB_PATH', '').split(',')
|
||||||
|
pathlist.append(join(dirname(__file__), 'calcurves'))
|
||||||
|
for path in pathlist:
|
||||||
# first try without adding kind
|
# first try without adding kind
|
||||||
filename = join(path.strip(), calibname)
|
filename = join(path.strip(), calibname)
|
||||||
if exists(filename):
|
if exists(filename):
|
||||||
|
Reference in New Issue
Block a user