secop_psi.softcal: default path for calib

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

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):