diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 53a4c24..4330c24 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,12 +1,9 @@ - - + - - @@ -391,7 +402,8 @@ - @@ -415,11 +427,11 @@ - - + + - + diff --git a/data/xmls/PC88A_HCL_NdPrCeLaDySmY_w_pitzer.xml b/data/xmls/PC88A_HCL_NdPrCeLaDySmY_w_pitzer.xml index 00ea6ee..186f8b2 100644 --- a/data/xmls/PC88A_HCL_NdPrCeLaDySmY_w_pitzer.xml +++ b/data/xmls/PC88A_HCL_NdPrCeLaDySmY_w_pitzer.xml @@ -33,7 +33,7 @@ 298.14999999999998 - -1376877.1544988335 + -1376877.765519179 558.9824 0.0 @@ -50,7 +50,7 @@ 298.14999999999998 - -4926549.797810851 + -4926549.797810851 1117.965 0.0 @@ -67,7 +67,7 @@ 298.14999999999998 - -4935519.640701385 + -4935519.640701385 1117.965 0.0 @@ -85,7 +85,7 @@ 298.14999999999998 - -4928317.781440989 + -4928317.781440989 1117.965 0.0 @@ -103,7 +103,7 @@ 298.14999999999998 - -4927428.65973482 + -4927428.65973482 1117.965 0.0 @@ -120,7 +120,7 @@ 298.14999999999998 - -4935155.356789877 + -4935155.356789877 1117.965 0.0 @@ -138,7 +138,7 @@ 298.14999999999998 - -4944228.17930387 + -4944228.17930387 1117.965 0.0 @@ -157,7 +157,7 @@ 298.14999999999998 - -4925606.187988869 + -4925606.187988869 1117.965 0.0 @@ -245,10 +245,10 @@ - 0.5879108393945309, 0.0, 0.0, 0.0, 0.0 - 5.4483234694357385, 0.0, 0.0, 0.0, 0.0 + 0.58791088654164, 0.0, 0.0, 0.0, 0.0 + 5.4483244544866825, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.02066999867229882, 0.0, 0.0, 0.0, 0.0 + -0.02066999867229882, 0.0, 0.0, 0.0, 0.0 2 0 @@ -261,10 +261,10 @@ - 0.7459775851223264, 0.0, 0.0, 0.0, 0.0 - 7.68392131299453, 0.0, 0.0, 0.0, 0.0 + 0.8967941630491562, 0.0, 0.0, 0.0, 0.0 + 9.427003409136933, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.01963615126026457, 0.0, 0.0, 0.0, 0.0 + -0.01963615126026457, 0.0, 0.0, 0.0, 0.0 2 0 @@ -277,10 +277,10 @@ - 0.5929999713109059, 0.0, 0.0, 0.0, 0.0 - 5.2769992484445485, 0.0, 0.0, 0.0, 0.0 + 0.5930012906158572, 0.0, 0.0, 0.0, 0.0 + 5.277035446184885, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.024339999997603376, 0.0, 0.0, 0.0, 0.0 + -0.024339999997603376, 0.0, 0.0, 0.0, 0.0 2 0 @@ -293,10 +293,10 @@ - 0.612950248542597, 0.0, 0.0, 0.0, 0.0 - 5.3599329374557385, 0.0, 0.0, 0.0, 0.0 + 0.6129503793974099, 0.0, 0.0, 0.0, 0.0 + 5.359935242327716, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.019699989216349984, 0.0, 0.0, 0.0, 0.0 + -0.019699989216349984, 0.0, 0.0, 0.0, 0.0 2 0 @@ -309,10 +309,10 @@ - 0.6005000182766684, 0.0, 0.0, 0.0, 0.0 - 4.910000193972841, 0.0, 0.0, 0.0, 0.0 + 0.6005000281456716, 0.0, 0.0, 0.0, 0.0 + 4.9100000484364354, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.02618999999473301, 0.0, 0.0, 0.0, 0.0 + -0.02618999999473301, 0.0, 0.0, 0.0, 0.0 2 0 @@ -325,10 +325,10 @@ - 0.9656352678202726, 0.0, 0.0, 0.0, 0.0 - 8.514180603037651, 0.0, 0.0, 0.0, 0.0 + 0.96563586407358, 0.0, 0.0, 0.0, 0.0 + 8.514189357968196, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.015467323909969704, 0.0, 0.0, 0.0, 0.0 + -0.015467323909969704, 0.0, 0.0, 0.0, 0.0 2 0 @@ -341,10 +341,10 @@ - 0.5977991228263208, 0.0, 0.0, 0.0, 0.0 - 5.278978156246855, 0.0, 0.0, 0.0, 0.0 + 0.5977991609880217, 0.0, 0.0, 0.0, 0.0 + 5.278978873123928, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.019920000110321332, 0.0, 0.0, 0.0, 0.0 + -0.019920000110321332, 0.0, 0.0, 0.0, 0.0 2 0 diff --git a/docs/Examples/iterative_fitter.py b/docs/Examples/iterative_fitter.py index a91ee43..b8b5785 100644 --- a/docs/Examples/iterative_fitter.py +++ b/docs/Examples/iterative_fitter.py @@ -173,7 +173,7 @@ while rel_diff > 1e-4: } lin_guess_dict = {'species': [], 'slope': [], - 'intercept:': []} + 'intercept': []} for species in species_list: pitzer_guess_dict['species'].append(species) lin_guess_dict['species'].append(species) @@ -205,10 +205,12 @@ while rel_diff > 1e-4: lin_guess_df = pd.DataFrame(lin_guess_dict) output_dict['best_obj'].append(best_obj) + output_dict['rel_diff'].append(100) output_df = pd.DataFrame(output_dict) old_row = output_df.iloc[-2, :].values[3:] new_row = output_df.iloc[-1, :].values[3:] rel_diff = np.sum(np.abs(new_row - old_row) / np.abs(old_row)) + del(output_dict['rel_diff'][-1]) output_dict['rel_diff'].append(rel_diff) output_df = pd.DataFrame(output_dict) output_df.to_csv('outputs/iterative_fitter_output.csv') diff --git a/docs/Examples/outputs/temp.xml b/docs/Examples/outputs/temp.xml index 00ea6ee..186f8b2 100644 --- a/docs/Examples/outputs/temp.xml +++ b/docs/Examples/outputs/temp.xml @@ -33,7 +33,7 @@ 298.14999999999998 - -1376877.1544988335 + -1376877.765519179 558.9824 0.0 @@ -50,7 +50,7 @@ 298.14999999999998 - -4926549.797810851 + -4926549.797810851 1117.965 0.0 @@ -67,7 +67,7 @@ 298.14999999999998 - -4935519.640701385 + -4935519.640701385 1117.965 0.0 @@ -85,7 +85,7 @@ 298.14999999999998 - -4928317.781440989 + -4928317.781440989 1117.965 0.0 @@ -103,7 +103,7 @@ 298.14999999999998 - -4927428.65973482 + -4927428.65973482 1117.965 0.0 @@ -120,7 +120,7 @@ 298.14999999999998 - -4935155.356789877 + -4935155.356789877 1117.965 0.0 @@ -138,7 +138,7 @@ 298.14999999999998 - -4944228.17930387 + -4944228.17930387 1117.965 0.0 @@ -157,7 +157,7 @@ 298.14999999999998 - -4925606.187988869 + -4925606.187988869 1117.965 0.0 @@ -245,10 +245,10 @@ - 0.5879108393945309, 0.0, 0.0, 0.0, 0.0 - 5.4483234694357385, 0.0, 0.0, 0.0, 0.0 + 0.58791088654164, 0.0, 0.0, 0.0, 0.0 + 5.4483244544866825, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.02066999867229882, 0.0, 0.0, 0.0, 0.0 + -0.02066999867229882, 0.0, 0.0, 0.0, 0.0 2 0 @@ -261,10 +261,10 @@ - 0.7459775851223264, 0.0, 0.0, 0.0, 0.0 - 7.68392131299453, 0.0, 0.0, 0.0, 0.0 + 0.8967941630491562, 0.0, 0.0, 0.0, 0.0 + 9.427003409136933, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.01963615126026457, 0.0, 0.0, 0.0, 0.0 + -0.01963615126026457, 0.0, 0.0, 0.0, 0.0 2 0 @@ -277,10 +277,10 @@ - 0.5929999713109059, 0.0, 0.0, 0.0, 0.0 - 5.2769992484445485, 0.0, 0.0, 0.0, 0.0 + 0.5930012906158572, 0.0, 0.0, 0.0, 0.0 + 5.277035446184885, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.024339999997603376, 0.0, 0.0, 0.0, 0.0 + -0.024339999997603376, 0.0, 0.0, 0.0, 0.0 2 0 @@ -293,10 +293,10 @@ - 0.612950248542597, 0.0, 0.0, 0.0, 0.0 - 5.3599329374557385, 0.0, 0.0, 0.0, 0.0 + 0.6129503793974099, 0.0, 0.0, 0.0, 0.0 + 5.359935242327716, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.019699989216349984, 0.0, 0.0, 0.0, 0.0 + -0.019699989216349984, 0.0, 0.0, 0.0, 0.0 2 0 @@ -309,10 +309,10 @@ - 0.6005000182766684, 0.0, 0.0, 0.0, 0.0 - 4.910000193972841, 0.0, 0.0, 0.0, 0.0 + 0.6005000281456716, 0.0, 0.0, 0.0, 0.0 + 4.9100000484364354, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.02618999999473301, 0.0, 0.0, 0.0, 0.0 + -0.02618999999473301, 0.0, 0.0, 0.0, 0.0 2 0 @@ -325,10 +325,10 @@ - 0.9656352678202726, 0.0, 0.0, 0.0, 0.0 - 8.514180603037651, 0.0, 0.0, 0.0, 0.0 + 0.96563586407358, 0.0, 0.0, 0.0, 0.0 + 8.514189357968196, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.015467323909969704, 0.0, 0.0, 0.0, 0.0 + -0.015467323909969704, 0.0, 0.0, 0.0, 0.0 2 0 @@ -341,10 +341,10 @@ - 0.5977991228263208, 0.0, 0.0, 0.0, 0.0 - 5.278978156246855, 0.0, 0.0, 0.0, 0.0 + 0.5977991609880217, 0.0, 0.0, 0.0, 0.0 + 5.278978873123928, 0.0, 0.0, 0.0, 0.0 0.0, 0.0, 0.0, 0.0, 0.0 - -0.019920000110321332, 0.0, 0.0, 0.0, 0.0 + -0.019920000110321332, 0.0, 0.0, 0.0, 0.0 2 0