secop_psi.softcal: default path for calib

Change-Id: I5ad2159587f13e1a0bcb75764397d4c784ed1c87
This commit is contained in:
zolliker 2021-11-08 14:24:09 +01:00
parent 3d9e9c59d6
commit 7690481938
3 changed files with 6 additions and 4 deletions

View File

@ -40,5 +40,5 @@ value.datatype = {"type":"double", "unit":"Ohm"}
class=secop_psi.softcal.Sensor
description=temperature sensor, soft calibration
rawsensor=res
calib = /home/l_samenv/frappy/secop_psi/calcurves/X132254.340
calib = X132254
value.unit = "K"

View File

@ -49,5 +49,5 @@ channel = A
[T]
class = secop_psi.softcal.Sensor
rawsensor = res
calib = /home/l_samenv/frappy/secop_psi/calcurves/X132254.340
calib = X132254
value.unit = K

View File

@ -22,7 +22,7 @@
import math
import os
from os.path import basename, exists, join
from os.path import basename, dirname, exists, join
import numpy as np
from scipy.interpolate import splev, splrep # pylint: disable=import-error
@ -109,7 +109,9 @@ class CalCurve:
calibname = sensopt.pop(0)
_, dot, ext = basename(calibname).rpartition('.')
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
filename = join(path.strip(), calibname)
if exists(filename):