From 90671b923d220b8d3e998f48ee669e5eadf3a9c4 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Tue, 18 Mar 2025 16:52:30 +0000 Subject: [PATCH 01/21] Replace requirements.txt --- requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7d34ab3..9675bef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ git+https://github.com/SASView/sasmodels.git -numpy==1.19.0 -scipy==1.5.2 -PyYAML==5.3.1 -matplotlib=3.2.2 +numpy +scipy +PyYAML +matplotlib -- GitLab From 6995fdecfd65bc47e114e8f86ea7b5e1683a66e6 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Tue, 18 Mar 2025 17:28:00 +0000 Subject: [PATCH 02/21] Replace output.py --- sas_temper/output.py | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/sas_temper/output.py b/sas_temper/output.py index d8b82cd..96f6643 100644 --- a/sas_temper/output.py +++ b/sas_temper/output.py @@ -272,11 +272,34 @@ def outputSetRes(conf, res): plt.close(fig) - +#################################################### +# determine if we use "nonposx/y" or "nonpositive" # +# this was from sanstools' set of plotting gizmos # +#################################################### +def mpl_version(): + mplversion = str(matplotlib.__version__) + digs = mplversion.split(".") + + if int(digs[1])<3: + nonposx = True + else: + nonposx = False + + return nonposx + + def outputFitCurve(conf, d, m, mnum, chisq): + nonpos = mpl_version() + # buf = str(nonpos) + # print(buf) + fig, ax = plt.subplots() - ax.set_xscale("log", nonpositive='clip') - ax.set_yscale("log", nonpositive='clip') + if nonpos is True: + ax.set_xscale("log", nonposx='clip') + ax.set_yscale("log", nonposy='clip') + else: + ax.set_xscale("log", nonpositive='clip') + ax.set_yscale("log", nonpositive='clip') ax.set_autoscale_on(True) # set the plot title -- GitLab From 6ab349a009127feebdb6f94a0b8b4448b53cb28c Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Tue, 18 Mar 2025 18:54:30 +0000 Subject: [PATCH 03/21] Replace sas_temper_env.yaml --- sas_temper_env.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sas_temper_env.yaml b/sas_temper_env.yaml index bedb4b1..2e0f3ac 100644 --- a/sas_temper_env.yaml +++ b/sas_temper_env.yaml @@ -1,9 +1,8 @@ -name: sas_temper +name: sas_temper_dev dependencies: - pip - numpy -- nb_conda -- python=3.6 +- python - pip: - scipy - numpy -- GitLab From 886a2dfcd08bba4c4d3103f611d6ef126ba9fd7b Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Tue, 18 Mar 2025 18:59:49 +0000 Subject: [PATCH 04/21] Replace setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 598246f..8a519bd 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def is_external_dependency(dependency): setup( name='sas_temper', - version='0.3.1', + version='0.4-dev', description='SAS data analysis using simulated annealing and reproducibility characterization. Uses sasmodels package', packages=['sas_temper'], scripts=['scripts/sas-temper'], -- GitLab From 23d0e331a603f9e36c0c12ef315a33bf0203eaae Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Tue, 18 Mar 2025 19:06:19 +0000 Subject: [PATCH 05/21] Replace output.py --- sas_temper/output.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sas_temper/output.py b/sas_temper/output.py index 96f6643..46e3aca 100644 --- a/sas_temper/output.py +++ b/sas_temper/output.py @@ -12,6 +12,7 @@ Oak Ridge National Laboratory, 2020 """ +import matplotlib from matplotlib import pyplot as plt import numpy as np -- GitLab From 72089d634589a03428c4129b65bd6a0e0f3bac2b Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Tue, 18 Mar 2025 19:24:55 +0000 Subject: [PATCH 06/21] Replace setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8a519bd..1f0d493 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def is_external_dependency(dependency): setup( name='sas_temper', - version='0.4-dev', + version='0.4', description='SAS data analysis using simulated annealing and reproducibility characterization. Uses sasmodels package', packages=['sas_temper'], scripts=['scripts/sas-temper'], -- GitLab From ec582d8f849a2a4d20d4a48de3ac4de154524b40 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Tue, 18 Mar 2025 19:26:47 +0000 Subject: [PATCH 07/21] Replace sas-temper --- scripts/sas-temper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sas-temper b/scripts/sas-temper index 0d2eaba..ee09132 100644 --- a/scripts/sas-temper +++ b/scripts/sas-temper @@ -4,7 +4,7 @@ sas_temper __main__.py: this is where the action happens -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From 8a6bd8b3ce82611a0b40d7612eb9ae9bc99e105a Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Tue, 18 Mar 2025 19:27:16 +0000 Subject: [PATCH 08/21] Edit LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index dc8b777..68b855d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2020, UT-Battelle, LLC. +Copyright (c) 2020-2025, UT-Battelle, LLC. All rights reserved. Redistribution and use in source and binary forms, with or without -- GitLab From 7d3e1de4c62eef7698afd215cadcc4fc8745c3f1 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:41:25 +0000 Subject: [PATCH 09/21] Replace __init__.py --- sas_temper/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sas_temper/__init__.py b/sas_temper/__init__.py index 2d51be0..ca67c49 100644 --- a/sas_temper/__init__.py +++ b/sas_temper/__init__.py @@ -3,9 +3,9 @@ sas_temper __init__.py: some setup code to be called at the start of the program -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ - \ No newline at end of file + -- GitLab From ccbe9fa4ee65213dde6bb9effffe0e0e16146ca3 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:41:42 +0000 Subject: [PATCH 10/21] Replace modelconfig.py --- sas_temper/modelconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/modelconfig.py b/sas_temper/modelconfig.py index a9ee065..d066613 100644 --- a/sas_temper/modelconfig.py +++ b/sas_temper/modelconfig.py @@ -10,7 +10,7 @@ modelconfig.py - a class that contains information about the model the profile calculation and output. Structure factors are parts of models, even though SASModels treats them as models. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From d8d7a0ea488eb9469f509c10024e9f5ba71ff69e Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:42:00 +0000 Subject: [PATCH 11/21] Replace output.py --- sas_temper/output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/output.py b/sas_temper/output.py index 46e3aca..922079c 100644 --- a/sas_temper/output.py +++ b/sas_temper/output.py @@ -8,7 +8,7 @@ output.py: code for writing fitting results and the results of also outputs the final table of averages, standard deviations and the summary table of the models found during the fitting. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From 4ba3074eacaad7f57051debf65a8c4c73ac67b66 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:42:16 +0000 Subject: [PATCH 12/21] Replace param.py --- sas_temper/param.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/param.py b/sas_temper/param.py index 78678ad..1959515 100644 --- a/sas_temper/param.py +++ b/sas_temper/param.py @@ -16,7 +16,7 @@ param.py - model parameters for the simulated annlealing to be "Name" keyword. The structure factors that exist in SASModels also have parameter sets and the object will be reused there. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From 76a78a7db5d8848d3c1c3b35161200a4cbe158bf Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:42:46 +0000 Subject: [PATCH 13/21] Replace parse_conf.py --- sas_temper/parse_conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/parse_conf.py b/sas_temper/parse_conf.py index 3f753aa..5424c41 100644 --- a/sas_temper/parse_conf.py +++ b/sas_temper/parse_conf.py @@ -6,7 +6,7 @@ parse_conf.py: code for parsing the YAML configuration file. for the fitting engine that is built on simulated annealing. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From b358d8acf766f2447ff740934b5a48a9c57bd765 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:43:03 +0000 Subject: [PATCH 14/21] Replace polydispersity.py --- sas_temper/polydispersity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/polydispersity.py b/sas_temper/polydispersity.py index 683ffe4..85b9664 100644 --- a/sas_temper/polydispersity.py +++ b/sas_temper/polydispersity.py @@ -16,7 +16,7 @@ polydispersity.py - a class for setting the polydispersity parameters are not acceptable because sas_temper is expected to run in a headless configuration. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From f26c7b8011b38f281bac9ee3fdc598c7072c93ab Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:43:24 +0000 Subject: [PATCH 15/21] Replace sas_calc.py --- sas_temper/sas_calc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/sas_calc.py b/sas_temper/sas_calc.py index ef3e1ff..a5fcb3a 100644 --- a/sas_temper/sas_calc.py +++ b/sas_temper/sas_calc.py @@ -8,7 +8,7 @@ sa_calc.py: this code is for the intensity and chi-squared calculations. integral, but the code will be expanded to use the NIST Gaussian integration routine built into sasmodels. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From 3aefa985598ef9cbd58ea5c6903912133537c386 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:43:40 +0000 Subject: [PATCH 16/21] Replace sas_data.py --- sas_temper/sas_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/sas_data.py b/sas_temper/sas_data.py index f812d18..9da928f 100644 --- a/sas_temper/sas_data.py +++ b/sas_temper/sas_data.py @@ -6,7 +6,7 @@ sa_data.py: this is a container class for the data that allows interest, which the sasmodels does not directly support in a clear manner. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From 631670ad984cc4dd5211d9ba4e9ce19751423b4d Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:44:09 +0000 Subject: [PATCH 17/21] Replace sas_temper_config.py --- sas_temper/sas_temper_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/sas_temper_config.py b/sas_temper/sas_temper_config.py index 597b615..418be2c 100644 --- a/sas_temper/sas_temper_config.py +++ b/sas_temper/sas_temper_config.py @@ -5,7 +5,7 @@ sas_temper_config.py: code for parsing the YAML config file for sas_temper, which is a YAML 1.2 compliant file containing the information required for the program. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From 17232a0563f472e3932054d5f71abec077e9d4ca Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:44:36 +0000 Subject: [PATCH 18/21] Replace sas_temper_engine.py -- GitLab From 0abdf42470a02c6fd68a70095259bee805c8cd35 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:45:08 +0000 Subject: [PATCH 19/21] Replace sas_temper_engine.py --- sas_temper/sas_temper_engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/sas_temper_engine.py b/sas_temper/sas_temper_engine.py index f7d3665..7876b32 100644 --- a/sas_temper/sas_temper_engine.py +++ b/sas_temper/sas_temper_engine.py @@ -5,7 +5,7 @@ sas_temper_engine.py: The actual simulated annealing algorithm is here, as is the code for refinement process and the wrapper function that controls both. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From 3741a95b92283c4b0f0cb929e7a998ea11c6b818 Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:45:24 +0000 Subject: [PATCH 20/21] Replace structurefactor.py --- sas_temper/structurefactor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sas_temper/structurefactor.py b/sas_temper/structurefactor.py index c2b59b8..6e92259 100644 --- a/sas_temper/structurefactor.py +++ b/sas_temper/structurefactor.py @@ -9,7 +9,7 @@ structurefactor.py - a class that specifies a structure factor for a the calculation. Once calculated, sas_temper multiplies F(q)*S(q) for I(q) to compare against the data. -Oak Ridge National Laboratory, 2020 +Oak Ridge National Laboratory, 2020-2025 """ -- GitLab From 8b529de233eb8ebe2b62dfc50530757ba1444bea Mon Sep 17 00:00:00 2001 From: "Heller, William T." Date: Wed, 19 Mar 2025 11:48:29 +0000 Subject: [PATCH 21/21] Replace setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1f0d493..b86f4f6 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def is_external_dependency(dependency): setup( name='sas_temper', - version='0.4', + version='0.4.0', description='SAS data analysis using simulated annealing and reproducibility characterization. Uses sasmodels package', packages=['sas_temper'], scripts=['scripts/sas-temper'], -- GitLab