You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
879 B
33 lines
879 B
3 years ago
|
from pathlib import Path, PurePath
|
||
|
|
||
|
from mylogger import log
|
||
|
from readcal import ReadCal
|
||
|
|
||
|
from myconfig import CAL_DIR, DATA_DIR, FILE_MARK, DeviceType
|
||
|
|
||
|
|
||
|
class Configuration:
|
||
|
def __init__(self, ) -> None:
|
||
|
log.info(f"Viper Configure init: ", __name__, "", "")
|
||
|
self.device_type = None
|
||
|
self.configuration =None
|
||
|
pass
|
||
|
|
||
|
def setSystemCfgDict(self, cfg:dict) -> None:
|
||
|
self.configuration = cfg
|
||
|
log.info(f"self.configuration : {self.configuration} ", __name__, "", "")
|
||
|
pass
|
||
|
|
||
|
def get_wl_from_datafile(self, fpath) -> None:
|
||
|
# self.cfgtool = Config()
|
||
|
if fpath.exists( ):
|
||
|
res = ReadCal.read_columns_set_by_mark( fpath, FILE_MARK, 1 )
|
||
|
self.configuration.update({ "wavelength" : res[1][0] })
|
||
|
pass
|
||
|
|
||
|
def getCalConfiguration(self) -> None:
|
||
|
pass
|
||
|
|
||
|
|
||
|
|