This commit is contained in:
Jianshun Gao 2023-05-08 11:47:35 +02:00
parent 2026a599ce
commit 075be187e4
2 changed files with 13 additions and 2 deletions

View File

@ -673,7 +673,18 @@ class FitAnalyser():
return value
def _get_fit_full_result_single(self, fitResult, key):
return ufloat(fitResult.params[key].value, fitResult.params[key].stderr)
if not fitResult.params[key].value is None:
value = fitResult.params[key].value
else:
value = np.nan
if not fitResult.params[key].stderr is None:
std = fitResult.params[key].stderr
else:
std = np.nan
return ufloat(value, std)
def _get_fit_full_result(self, fitResult, params):
func = np.vectorize(self._get_fit_full_result_single)

View File

@ -42,7 +42,7 @@ def get_h5_file_path(folderpath, maxFileNum=None, filename='*.h5',):
def get_date():
today = date.today()
return today.strftime("%y/%m/%d")
return today.strftime("%Y/%m/%d")
def _combine_uncertainty(value, std):