Commit e7b4a9d6 authored by Heller, William T.'s avatar Heller, William T.
Browse files

Merge branch 'UpdateLibraries' into 'master'

Update libraries

See merge request !30
parents 8b195375 8b529de2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
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
+4 −4
Original line number Diff line number Diff line
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
+2 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ 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

"""

+1 −1
Original line number Diff line number Diff line
@@ -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

"""

+28 −4
Original line number Diff line number Diff line
@@ -8,10 +8,11 @@ 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

"""

import matplotlib
from matplotlib import pyplot as plt
import numpy as np

@@ -272,9 +273,32 @@ 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()
    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)
Loading