Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""
from __future__ import print_function

import os.path
import inspect

import pytest
Expand Down
2 changes: 1 addition & 1 deletion doc/_extensions/numfig.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from docutils.nodes import figure, caption, Text, reference, raw, SkipNode, Element
from docutils.nodes import figure, caption, Text, reference, raw, SkipNode
from sphinx.roles import XRefRole


Expand Down
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import sys
import os

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
2 changes: 0 additions & 2 deletions doc/gentoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
from typing import Optional, BinaryIO, List, Dict
except ImportError:
pass
else:
from sasmodels.modelinfo import ModelInfo

TEMPLATE = """\
..
Expand Down
2 changes: 1 addition & 1 deletion example/cylinder_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Minimal example of calling a kernel for a specific set of q values.
"""

from numpy import logspace, sqrt
from numpy import logspace
from matplotlib import pyplot as plt
from sasmodels.core import load_model
from sasmodels.direct_model import call_kernel, call_Fq
Expand Down
1 change: 0 additions & 1 deletion example/model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
from bumps.names import *
from sasmodels.core import load_model
from sasmodels.bumps_model import Model, Experiment
Expand Down
3 changes: 1 addition & 2 deletions example/model_ellipsoid_hayter_msa.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import sys
#sys.path.append('path_to_sasmodels')

import numpy as np

from bumps.names import *
from sasmodels.core import load_model
from sasmodels.bumps_model import Model, Experiment
from sasmodels.data import load_data, plot_data
from sasmodels.data import load_data

# IMPORT THE DATA USED
data = load_data(sys.argv[1])
Expand Down
3 changes: 1 addition & 2 deletions example/multiscatfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@
sasview.exe bumps.cli multiscatfit.py --store=t1
"""

import sys
from bumps.names import *
from sasmodels.core import load_model
from sasmodels.bumps_model import Model, Experiment
from sasmodels.data import load_data, set_beam_stop, set_top
from sasmodels.data import load_data

from sasmodels.multiscat import MultipleScattering

Expand Down
2 changes: 1 addition & 1 deletion example/sesansfit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

from bumps.names import *
from sasmodels import core, bumps_model, sesans
from sasmodels import core, bumps_model
from sasdata.dataloader.loader import Loader

def get_bumps_model(model_name):
Expand Down
2 changes: 1 addition & 1 deletion example/simul_fit.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from bumps.names import *
from sasmodels.core import load_model
from sasmodels.bumps_model import Model, Experiment
from sasmodels.data import load_data, plot_data
from sasmodels.data import load_data

# latex data, same sample usans and sans
# particles radius ~2300, uniform dispersity
Expand Down
2 changes: 1 addition & 1 deletion example/weights/cyclic_gaussian.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from numpy import exp, sin, cos, pi, radians, degrees
from numpy import exp, sin, pi, radians, degrees

from sasmodels.weights import Dispersion as BaseDispersion

Expand Down
1 change: 0 additions & 1 deletion example/weights/laplace.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import numpy as np
from scipy.stats import laplace

from sasmodels import weights
Expand Down
2 changes: 1 addition & 1 deletion example/weights/maier_saupe_eq.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from numpy import exp, sin, degrees, radians, pi, sqrt
from numpy import exp, sin, degrees, pi, sqrt

from sasmodels.weights import Dispersion as BaseDispersion

Expand Down
4 changes: 1 addition & 3 deletions explore/angular_pd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
Application to explore the difference between sasview 3.x orientation
dispersity and possible replacement algorithms.
"""
import mpl_toolkits.mplot3d # Adds projection='3d' option to subplot
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider, CheckButtons
from matplotlib import cm

import numpy as np
from numpy import pi, cos, sin, sqrt, exp, degrees, radians
from numpy import cos, sin, exp, radians

def draw_sphere(ax, radius=10., steps=100):
u = np.linspace(0, 2 * np.pi, steps)
Expand Down
5 changes: 3 additions & 2 deletions explore/asymint.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@

from __future__ import print_function, division

import os, sys
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
import warnings

import numpy as np
import mpmath as mp
from numpy import pi, sin, cos, sqrt, exp, expm1, degrees, log10, arccos
from numpy import pi, sin, cos, degrees, log10, arccos
from numpy.polynomial.legendre import leggauss
from scipy.integrate import dblquad, simps, romb, romberg
import pylab
Expand Down
3 changes: 2 additions & 1 deletion explore/beta/sasfit_compare.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import division, print_function
# Make sasmodels available on the path
import sys, os
import sys
import os
BETA_DIR = os.path.dirname(os.path.realpath(__file__))
SASMODELS_DIR = os.path.dirname(os.path.dirname(BETA_DIR))
sys.path.insert(0, SASMODELS_DIR)
Expand Down
3 changes: 2 additions & 1 deletion explore/beta/sasfit_compare_new.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import division, print_function
# Make sasmodels available on the path
import sys, os
import sys
import os
BETA_DIR = os.path.dirname(os.path.realpath(__file__))
SASMODELS_DIR = os.path.dirname(os.path.dirname(BETA_DIR))
sys.path.insert(0, SASMODELS_DIR)
Expand Down
3 changes: 2 additions & 1 deletion explore/check1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

from __future__ import print_function, division

import sys, os
import sys
import os
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.realpath(__file__))))

import numpy as np
Expand Down
5 changes: 1 addition & 4 deletions explore/realspace.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from __future__ import division, print_function

import cmath
import time
from copy import copy
import os
import argparse
from collections import OrderedDict
from timeit import default_timer as timer
from typing import Tuple
from inspect import getfullargspec

import numpy as np
Expand Down Expand Up @@ -941,7 +939,6 @@ def plot_calc_2d(qx, qy, Iqxy, theory=None, title=None):
plt.title('max rel. err=%g' % np.max(abs(rel)))

def plot_points(rho, points):
import mpl_toolkits.mplot3d
import matplotlib.pyplot as plt

ax = plt.axes(projection='3d')
Expand Down Expand Up @@ -1525,6 +1522,6 @@ def main():
import sasmodels
except ImportError:
import sys
from os.path import realpath, dirname, join as joinpath
from os.path import realpath, dirname
sys.path.insert(0, dirname(dirname(realpath(__file__))))
main()
6 changes: 3 additions & 3 deletions explore/rpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ def demo():
raise ValueError("Case %d not implmented"%case_num)

pars = build_pars(case_num, [B, C, D], **K)
print "eval sasmodels"
print("eval sasmodels")
Iq_sasmodels = sasmodels_rpa(q, pars)
print "eval sasview"
print("eval sasview")
Iq_sasview = sasview_rpa(q, pars)
print 1./Iq[0], 1./Iq_sasmodels[0], 1./Iq_sasview[0]
print(1./Iq[0], 1./Iq_sasmodels[0], 1./Iq_sasview[0])

#return
import pylab
Expand Down
11 changes: 4 additions & 7 deletions explore/symint.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@

from __future__ import print_function, division

import os, sys
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))

import numpy as np
from numpy import pi, sin, cos, sqrt, exp, expm1, degrees, log10
from numpy import pi, sin, cos, sqrt, degrees
from numpy.polynomial.legendre import leggauss
from scipy.integrate import dblquad, simps, romb, romberg
from scipy.integrate import simps, romb, romberg
import pylab

from sasmodels.special import square
from sasmodels.special import Gauss20Wt, Gauss20Z
from sasmodels.special import Gauss76Wt, Gauss76Z
from sasmodels.special import Gauss150Wt, Gauss150Z
from sasmodels.special import sas_2J1x_x, sas_sinx_x, sas_3j1x_x

SLD = 3.0
Expand Down
2 changes: 1 addition & 1 deletion explore/transform_angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import sys

import numpy as np
from numpy import pi, cos, sin, sqrt, exp, degrees, radians
from numpy import cos, sin, radians
from scipy.optimize import fmin

# Definition of rotation matrices comes from wikipedia:
Expand Down
24 changes: 0 additions & 24 deletions extra/build_linux.sh

This file was deleted.

Loading
Loading