Compare commits

..

2 Commits

2 changed files with 7 additions and 3 deletions

View File

@@ -10,7 +10,9 @@ import pandas as pd
def get_convergence(
output_file_paths, molecule, crit_mean=0.01, crit_std=0.10
):
"""Function checks if last two files contain converging datasets."""
"""Function checks if data results from last two
files contain are within convergence criteria.
Returns Boolean"""
if len(output_file_paths) < 2:
print("One iteration, therefore no convergence.")
@@ -30,6 +32,7 @@ def get_convergence(
older_std = older_fit_results[molecule].std()
measure_std = abs(abs(np.abs(newer_std) - abs(older_std))/norm)
# check if results within convergence criteria
if measure_mean <= crit_mean:
if measure_std <= crit_std:
convergence = True
@@ -39,7 +42,8 @@ def get_convergence(
print(
"Convergence result for ", output_file_paths[-1], " and ",
output_file_paths[-2], "\n\t\t\t",
measure_mean, measure_std, "convergence: ", str(convergence)
round(measure_mean, 4), round(measure_std, 4),
"convergence: ", str(convergence)
)
return convergence

View File

@@ -1,7 +1,7 @@
from setuptools import setup
setup(name='fsl_mrs_mce',
version='0.0.2',
version='0.0.21',
description='A fsl_mrs Moncte Carlo estimation approach',
url='https://git.thoffbauer.de/konstantin.bosbach/fsl_mrs_mce.git',
author='Konstantin E Bosbach',