Changeset 3a39c2e in sasview


Ignore:
Timestamp:
Feb 13, 2015 3:53:03 AM (10 years ago)
Author:
krzywon
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
8c9ffde
Parents:
79492222
Message:

Next iteration of the SANS→SAS is complete.

Files:
26 edited

Legend:

Unmodified
Added
Removed
  • build_tools/get_version.py

    r5709051 r3a39c2e  
    1515        return __revision__ 
    1616 
    17 # Get the version number from the sansview module 
     17# Get the version number from the sasview module 
    1818# Check to see if we are dealing with a release 
    1919try: 
    20     import sans.sansview 
    21     __version__ = sans.sansview.__version__ 
    22     __revision__ = sans.sansview.__build__ 
     20    import sas.sasview 
     21    __version__ = sas.sasview.__version__ 
     22    __revision__ = sas.sasview.__build__ 
    2323except: 
    24     print "Could not load sansview module" 
     24    print "Could not load sasview module" 
    2525 
    2626# Get actual revision number if possible 
  • build_tools/jenkins_linux_pylint.sh

    r9939b16 r3a39c2e  
    1414rm -f test/*.txt 
    1515 
    16 $PYLINT --rcfile "$WORKSPACE/build_tools/pylint.rc" -f parseable sasview-install/sasview.egg/sans sansview > test/sansview.txt || exit 0 
     16$PYLINT --rcfile "$WORKSPACE/build_tools/pylint.rc" -f parseable sasview-install/sasview.egg/sas sasview > test/sasview.txt || exit 0 
  • build_tools/jenkins_linux_test.sh

    r21b7a49 r3a39c2e  
    1212export PYTHONPATH=$PYTHONPATH:$WORKSPACE/sasview-install:$WORKSPACE/utils 
    1313 
    14 $PYTHON utest_sansview.py 
     14$PYTHON utest_sasview.py 
  • build_tools/jenkins_rhel6_build.sh

    rb44da61 r3a39c2e  
    5454#  Run tests 
    5555cd $WORKSPACE/test 
    56 python utest_sansview.py 
     56python utest_sasview.py 
    5757 
    5858 
     
    6666cd ${WORKSPACE}/build_tools/rpm 
    6767python create_rpm_spec.py ${SVN_REVISION} 
    68 cp sansview.spec ${HOME}/rpmbuild/SPECS 
     68cp sasview.spec ${HOME}/rpmbuild/SPECS 
    6969 
    7070cd ${HOME}/rpmbuild/SPECS 
    71 rpmbuild -bb sansview.spec --clean 
     71rpmbuild -bb sasview.spec --clean 
    7272cp ${HOME}/rpmbuild/RPMS/x86_64/* ${WORKSPACE}/dist 
    7373 
  • build_tools/jenkins_win32_build.bat

    rb44da61 r3a39c2e  
    99%PYTHON% check_packages.py 
    1010 
    11 set PYTHONPATH=%WORKSPACE%\sansview-install;%PYTHONPATH% 
     11set PYTHONPATH=%WORKSPACE%\sasview-install;%PYTHONPATH% 
    1212 
    13 RD /S /Q sansview-install 
    14 MD sansview-install 
     13RD /S /Q sasview-install 
     14MD sasview-install 
    1515RD /S /Q dist 
    1616RD /S /Q build 
    1717 
    18 rem %PYTHON% -m pip install -t ../sansview-install --no-deps bumps=0.7.5.4 
    19 rem PYTHON% -m pip install -t ../sansview-install --no-deps periodictable=1.3.0 
    20 rem %PYTHON% -m pip install -t ../sansview-install --no-deps pyparsing=1.5.5 
     18rem %PYTHON% -m pip install -t ../sasview-install --no-deps bumps=0.7.5.4 
     19rem PYTHON% -m pip install -t ../sasview-install --no-deps periodictable=1.3.0 
     20rem %PYTHON% -m pip install -t ../sasview-install --no-deps pyparsing=1.5.5 
    2121 
    2222%PYTHON% setup.py build -cmingw32 
    2323%PYTHON% setup.py bdist_egg --skip-build 
    2424cd dist 
    25 %EASY_INSTALL% -d ..\sansview-install sasview*.egg 
     25%EASY_INSTALL% -d ..\sasview-install sasview*.egg 
    2626 
    2727cd %WORKSPACE%\test 
    28 %PYTHON% utest_sansview.py 
     28%PYTHON% utest_sasview.py 
  • build_tools/rpm/create_rpm_spec.py

    rf6f0c7b r3a39c2e  
    2929    return newline 
    3030 
    31 input=open("sansview.spec.template",'r') 
    32 output=open("sansview.spec",'w') 
     31input=open("sasview.spec.template",'r') 
     32output=open("sasview.spec",'w') 
    3333 
    3434buf = input.read() 
  • docs/sphinx-docs/build_sphinx.py

    rf6b977c r3a39c2e  
    4646    example: 
    4747 
    48         sans/../[MODULE]/media/dir/A.rst 
    49         sans/../[MODULE]/media/B.rst 
     48        sas/../[MODULE]/media/dir/A.rst 
     49        sas/../[MODULE]/media/B.rst 
    5050 
    5151    gets copied to a new location: 
  • docs/sphinx-docs/source/conf.py

    re27d71b r3a39c2e  
    7979# that we don't get various "ImportError: No module named ___" when 
    8080# running Sphinx. 
    81 exclude_patterns = ["*sans.perspectives.simulation.rst", 
    82                     "*sans.pr.c_extensions.rst", 
    83                     "*sans.realspace.rst", 
    84                     "*sans.simulation.rst", 
     81exclude_patterns = ["*sas.perspectives.simulation.rst", 
     82                    "*sas.pr.c_extensions.rst", 
     83                    "*sas.realspace.rst", 
     84                    "*sas.simulation.rst", 
    8585                    "*park.fitmc.rst", 
    8686                    "*park.fitservice.rst", 
    8787                    "*park.parksnob.rst", 
    8888                    "*park.rangemap.rst", 
    89                     "*sans.sansview.setup_exe.rst", 
    90                     "*sans.sansview.setup_mac.rst", 
    91                     "*sans.guiframe.custom_pstats.rst", # pstats not in standard library on Ubuntu out of the box 
     89                    "*sas.sasview.setup_exe.rst", 
     90                    "*sas.sasview.setup_mac.rst", 
     91                    "*sas.guiframe.custom_pstats.rst", # pstats not in standard library on Ubuntu out of the box 
    9292                    ] 
    9393 
  • run.py

    r70a9d1c r3a39c2e  
    33Run sasview in place.  This allows sasview to use the python 
    44files in the source tree without having to call setup.py install 
    5 first.  A rebuild is still necessary when working on sans models 
     5first.  A rebuild is still necessary when working on sas models 
    66or c modules. 
    77 
     
    105105    addpath(joinpath(root, 'park-1.2.1')) 
    106106 
    107     # Import the sansview package from root/sansview as sans.sansview.  It would 
    108     # be better to just store the package in src/sans/sansview. 
    109     import sans 
    110     sans.sansview = import_package('sans.sansview', joinpath(root,'sansview')) 
     107    # Import the sasview package from root/sasview as sas.sasview.  It would 
     108    # be better to just store the package in src/sas/sasview. 
     109    import sas 
     110    sas.sasview = import_package('sas.sasview', joinpath(root,'sasview')) 
    111111 
    112     # The sans.models package Compiled Model files should be pulled in from the build directory even though 
    113     # the source is stored in src/sans/models. 
     112    # The sas.models package Compiled Model files should be pulled in from the build directory even though 
     113    # the source is stored in src/sas/models. 
    114114 
    115115    # Compiled modules need to be pulled from the build directory. 
    116116    # Some packages are not where they are needed, so load them explicitly. 
    117     import sans.pr 
    118     sans.pr.core = import_package('sans.pr.core', 
    119                                   joinpath(build_path, 'sans', 'pr', 'core')) 
     117    import sas.pr 
     118    sas.pr.core = import_package('sas.pr.core', 
     119                                  joinpath(build_path, 'sas', 'pr', 'core')) 
    120120    #import_dll('park._modeling', build_path) 
    121121 
    122122    #park = import_package('park',os.path.join(build_path,'park')) 
    123123 
    124     # Pull the entire sans.models package from the build directory since it contains 
     124    # Pull the entire sas.models package from the build directory since it contains 
    125125    # a mixture of autogenerated python and C.  Any changes in models will require 
    126126    # a rebuild with setup.py build 
    127     sans.models = import_package('sans.models', joinpath(build_path, 'sans', 'models')) 
     127    sas.models = import_package('sas.models', joinpath(build_path, 'sas', 'models')) 
    128128 
    129129    sys.path.append(build_path) 
    130130 
    131131    #print "\n".join(sys.path) 
    132     #from sans.models import SphereModel 
     132    #from sas.models import SphereModel 
    133133 
    134134if __name__ == "__main__": 
    135135    prepare() 
    136     from sans.sansview.sansview import run 
     136    from sas.sasview.sasview import run 
    137137    run() 
  • sasmodels/CMakeLists.txt

    r79492222 r3a39c2e  
    1 # CMakeLists for SANS models 
     1# CMakeLists for SAS models 
    22cmake_minimum_required (VERSION 2.6) 
    3 project (SansModels) 
     3project (SasModels) 
    44 
    55# Version number 
    6 set (SansModels_VERSION_MAJOR 1) 
    7 set (SansModels_VERSION_MAJOR 0) 
     6set (SasModels_VERSION_MAJOR 1) 
     7set (SasModels_VERSION_MAJOR 0) 
    88 
    99set (SRC_FILES 
     
    123123    src/libigor/GaussWeights.h 
    124124    src/libigor/libCylinder.h 
    125     src/libigor/libSANSAnalysis.h 
     125    src/libigor/libSASAnalysis.h 
    126126    src/libigor/libSphere.h 
    127127    src/libigor/libStructureFactor.h 
  • sasmodels/MANIFEST.IN

    r79492222 r3a39c2e  
    11 
    2 graft src/sans/models/libigor 
    3 graft src/sans/models/c_smearer 
    4 graft src/sans/models/c_models 
    5 graft src/sans/models/c_extensions 
    6 recursive-include sans *.h 
    7 recursive-include sans *.hh 
     2graft src/sas/models/libigor 
     3graft src/sas/models/c_smearer 
     4graft src/sas/models/c_models 
     5graft src/sas/models/c_extensions 
     6recursive-include sas *.h 
     7recursive-include sas *.hh 
    88include README.txt 
    99include license.txt 
  • sasmodels/generate_cmake.py

    r79492222 r3a39c2e  
    1212f = open("CMakeLists.txt", "w") 
    1313 
    14 cmakelist = """# CMakeLists for SANS models 
     14cmakelist = """# CMakeLists for SAS models 
    1515cmake_minimum_required (VERSION 2.6) 
    16 project (SansModels) 
     16project (SasModels) 
    1717 
    1818# Version number 
    19 set (SansModels_VERSION_MAJOR 1) 
    20 set (SansModels_VERSION_MAJOR 0) 
     19set (SasModels_VERSION_MAJOR 1) 
     20set (SasModels_VERSION_MAJOR 0) 
    2121 
    2222set (SRC_FILES 
  • sasmodels/setup.py

    r79492222 r3a39c2e  
    11""" 
    2  Installation script for SANS models 
     2 Installation script for SAS models 
    33""" 
    44 
     
    1414 
    1515# Manage version number ###################################### 
    16 sys.path.append(os.path.join("src", "sans")) 
     16sys.path.append(os.path.join("src", "sas")) 
    1717import models 
    1818VERSION = models.__version__ 
     
    6666from wrapping import generate_wrappers 
    6767generate_wrappers(header_dir=includedir,  
    68                   output_dir=os.path.join("src", "sans", "models"),  
     68                  output_dir=os.path.join("src", "sas", "models"),  
    6969                  c_wrapper_dir=wrapper_dir) 
    7070 
     
    108108 
    109109dist = setup( 
    110     name="sansmodels", 
     110    name="sasmodels", 
    111111    version = VERSION, 
    112     description = "Python module for SANS scattering models", 
    113     author = "SANS/DANSE", 
     112    description = "Python module for SAS scattering models", 
     113    author = "SAS/DANSE", 
    114114    author_email = "sansdanse@gmail.gov", 
    115115    url = "http://sansviewproject.svn.sourceforge.net", 
    116116     
    117     # Place this module under the sans package 
    118     #ext_package = "sans", 
     117    # Place this module under the sas package 
     118    #ext_package = "sas", 
    119119     
    120120    # Use the pure python modules 
    121     package_dir = {"sans":os.path.join("src", "sans"), 
    122                    "sans.models":os.path.join("src", "sans", "models"), 
    123                    "sans.models.sans_extension":os.path.join("src", "sans", "models", "sans_extension"), 
     121    package_dir = {"sas":os.path.join("src", "sas"), 
     122                   "sas.models":os.path.join("src", "sas", "models"), 
     123                   "sas.models.sas_extension":os.path.join("src", "sas", "models", "sas_extension"), 
    124124                  }, 
    125     package_data={'sans.models': [os.path.join('media', "*")]}, 
    126     packages = ["sans","sans.models", 
    127                 "sans.models.sans_extension",], 
     125    package_data={'sas.models': [os.path.join('media', "*")]}, 
     126    packages = ["sas","sas.models", 
     127                "sas.models.sas_extension",], 
    128128     
    129129    ext_modules = [  
    130130                    
    131         Extension("sans.models.sans_extension.c_models", 
     131        Extension("sas.models.sas_extension.c_models", 
    132132                    sources=model_sources,                  
    133133                    include_dirs=[igordir, includedir, c_model_dir, numpy_incl_path],    
     
    135135 
    136136        # Smearer extension 
    137         Extension("sans.models.sans_extension.smearer", 
     137        Extension("sas.models.sas_extension.smearer", 
    138138                   sources = smearer_sources, 
    139139                   include_dirs=[igordir, smear_dir, numpy_incl_path], 
    140140                   ), 
    141141                    
    142         Extension("sans.models.sans_extension.smearer2d_helper", 
     142        Extension("sas.models.sas_extension.smearer2d_helper", 
    143143                  sources = [os.path.join(smear_dir,  
    144144                                          "smearer2d_helper_module.cpp"), 
  • sasview/installer.iss

    r79492222 r3a39c2e  
    3434Root: HKCR;     Subkey: ".abs\OpenWithList\SasView.exe";         Flags: uninsdeletekey noerror 
    3535Root: HKCR;     Subkey: ".d1d\OpenWithList\SasView.exe";         Flags: uninsdeletekey noerror 
    36 Root: HKCR;     Subkey: ".sans\OpenWithList\SasView.exe";        Flags: uninsdeletekey noerror 
     36Root: HKCR;     Subkey: ".sas\OpenWithList\SasView.exe";         Flags: uninsdeletekey noerror 
    3737Root: HKCR;     Subkey: ".nxs\OpenWithList\SasView.exe";         Flags: uninsdeletekey noerror 
    3838Root: HKCR; Subkey: "applications\SasView.exe\shell\open\command";      ValueType: string; ValueName: "";       ValueData: """{app}\SasView.exe""  ""%1""";      Flags: uninsdeletevalue noerror 
     
    4444Root: HKCU;     Subkey: "Software\Classes\.abs\OpenWithList\SasView.exe";        Flags: uninsdeletekey noerror 
    4545Root: HKCU;     Subkey: "Software\Classes\.d1d\OpenWithList\SasView.exe";        Flags: uninsdeletekey noerror 
    46 Root: HKCU;     Subkey: "Software\Classes\.sans\OpenWithList\SasView.exe";       Flags: uninsdeletekey noerror 
     46Root: HKCU;     Subkey: "Software\Classes\.sas\OpenWithList\SasView.exe";        Flags: uninsdeletekey noerror 
    4747Root: HKCU;     Subkey: "Software\Classes\.nxs\OpenWithList\SasView.exe";        Flags: uninsdeletekey noerror 
    4848Root: HKCU; Subkey: "Software\Classes\applications\SasView.exe\shell\open\command";     ValueType: string; ValueName: "";       ValueData: """{app}\SasView.exe""  ""%1""";      Flags: uninsdeletevalue noerror 
     
    5454Root: HKCR; Subkey: "{app}\SasView.exe\shell\open\command";     ValueType: string; ValueName: "";       ValueData: """{app}\SasView.exe""  ""%1""";      Flags: uninsdeletevalue noerror         
    5555Root: HKCR; Subkey: "{app}\images\ball.ico";    ValueType: string; ValueName: "";       ValueData: "{app}\SasView.exe,0";        Flags: uninsdeletevalue noerror         
    56 Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment";     ValueType: expandsz; ValueName: "SANSVIEWPATH"; ValueData: "{app}";      Flags: uninsdeletevalue noerror 
     56Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment";     ValueType: expandsz; ValueName: "SASVIEWPATH";  ValueData: "{app}";      Flags: uninsdeletevalue noerror 
    5757; Write to PATH (below) is disabled; need more tests 
    58 ;Root: HKCU; Subkey: "Environment";     ValueType: expandsz; ValueName: "PATH"; ValueData: "%SANSVIEWPATH%;{olddata}";   Check: NeedsAddPath() 
     58;Root: HKCU; Subkey: "Environment";     ValueType: expandsz; ValueName: "PATH"; ValueData: "%SASVIEWPATH%;{olddata}";    Check: NeedsAddPath() 
    5959 
    6060 
     
    114114  RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath) 
    115115  oldpath := oldpath + ';'; 
    116   newpath := '%SANSVIEWPATH%'; 
     116  newpath := '%SASVIEWPATH%'; 
    117117  i := 0; 
    118118  while (Pos(';', oldpath) > 0) do begin 
  • sasview/installer_generator.py

    r79492222 r3a39c2e  
    4545         
    4646        #(ext, type, name, flags) 
    47         from sans.dataloader.loader import Loader 
     47        from sas.dataloader.loader import Loader 
    4848        wild_cards = Loader().get_wildcards() 
    4949        for item in wild_cards: 
     
    145145 
    146146     
    147     #SANSVIEWPATH 
     147    #SASVIEWPATH 
    148148    msg += """Root: HKLM; Subkey: "%s";\t"""  %  str('SYSTEM\CurrentControlSet\Control\Session Manager\Environment') 
    149149    msg += """ValueType: %s; """ % str('expandsz') 
    150     msg += """ValueName: "%s";\t""" % str('SANSVIEWPATH')  
     150    msg += """ValueName: "%s";\t""" % str('SASVIEWPATH')  
    151151    msg += """ValueData: "{app}";\t""" 
    152152    msg += """ Flags: %s""" % str('uninsdeletevalue noerror') 
     
    158158    msg += """ValueType: %s; """ % str('expandsz') 
    159159    msg += """ValueName: "%s";\t""" % str('PATH')  
    160     msg += """ValueData: "%s;{olddata}";\t""" % str('%SANSVIEWPATH%') 
     160    msg += """ValueData: "%s;{olddata}";\t""" % str('%SASVIEWPATH%') 
    161161    msg += """ Check: %s""" % str('NeedsAddPath()') 
    162162    msg += "\n" 
     
    280280    msg += """'PATH', oldpath)\n""" 
    281281    msg += """  oldpath := oldpath + ';';\n""" 
    282     msg += """  newpath := '%SANSVIEWPATH%';\n""" 
     282    msg += """  newpath := '%SASVIEWPATH%';\n""" 
    283283    msg += """  i := 0;\n""" 
    284284    msg += """  while (Pos(';', oldpath) > 0) do begin\n""" 
  • sasview/local_config.py

    r79492222 r3a39c2e  
    44import time 
    55import os 
    6 from sans.guiframe.gui_style import GUIFRAME 
    7 import sans.sansview 
     6from sas.guiframe.gui_style import GUIFRAME 
     7import sas.sasview 
    88import logging 
    99 
    1010# Version of the application 
    1111__appname__ = "SasView" 
    12 __version__ = sans.sansview.__version__ 
    13 __build__ = sans.sansview.__build__ 
     12__version__ = sas.sasview.__version__ 
     13__build__ = sas.sasview.__build__ 
    1414__download_page__ = 'http://sourceforge.net/projects/sasview/files/' 
    1515__update_URL__ = ['svn.code.sf.net',  
    16                   '/p/sasview/code/trunk/sansview.latestversion'] 
     16                  '/p/sasview/code/trunk/sasview.latestversion'] 
    1717 
    1818 
  • sasview/sasview.py

    r79492222 r3a39c2e  
    4646        reload(sys) 
    4747    sys.setdefaultencoding("iso-8859-1") 
    48 from sans.guiframe import gui_manager 
    49 from sans.guiframe.gui_style import GUIFRAME 
     48from sas.guiframe import gui_manager 
     49from sas.guiframe.gui_style import GUIFRAME 
    5050from welcome_panel import WelcomePanel 
    5151# For py2exe, import config here 
     
    7878        # Fitting perspective 
    7979        try: 
    80             import sans.perspectives.fitting as module     
     80            import sas.perspectives.fitting as module     
    8181            fitting_plug = module.Plugin() 
    8282            self.gui.add_perspective(fitting_plug) 
     
    8888        # P(r) perspective 
    8989        try: 
    90             import sans.perspectives.pr as module     
     90            import sas.perspectives.pr as module     
    9191            pr_plug = module.Plugin(standalone=False) 
    9292            self.gui.add_perspective(pr_plug) 
     
    9797        #Invariant perspective 
    9898        try: 
    99             import sans.perspectives.invariant as module     
     99            import sas.perspectives.invariant as module     
    100100            invariant_plug = module.Plugin(standalone=False) 
    101101            self.gui.add_perspective(invariant_plug) 
     
    108108        #Calculator perspective    
    109109        try: 
    110             import sans.perspectives.calculator as module     
     110            import sas.perspectives.calculator as module     
    111111            calculator_plug = module.Plugin(standalone=False) 
    112112            self.gui.add_perspective(calculator_plug) 
  • sasview/setup_exe.py

    r79492222 r3a39c2e  
    1919# put the build directory at the front of the path 
    2020if os.path.abspath(os.path.dirname(__file__)) != os.path.abspath(os.getcwd()): 
    21     raise RuntimeError("Must run setup_exe from the sansview directory") 
     21    raise RuntimeError("Must run setup_exe from the sasview directory") 
    2222from distutils.util import get_platform 
    2323root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 
     
    239239data_files += periodictable.data_files() 
    240240 
    241 import sans.perspectives.fitting as fitting 
     241import sas.perspectives.fitting as fitting 
    242242data_files += fitting.data_files() 
    243243 
    244 import sans.perspectives.calculator as calculator 
     244import sas.perspectives.calculator as calculator 
    245245data_files += calculator.data_files() 
    246246 
    247 import sans.perspectives.invariant as invariant 
     247import sas.perspectives.invariant as invariant 
    248248data_files += invariant.data_files() 
    249249 
    250 import sans.guiframe as guiframe 
     250import sas.guiframe as guiframe 
    251251data_files += guiframe.data_files() 
    252252 
    253 import sans.models as models 
     253import sas.models as models 
    254254data_files += models.data_files() 
    255255 
     
    258258    data_files.append((os.path.split(dirname)[0], [f])) 
    259259 
    260 # Copy the settings file for the sans.dataloader file extension associations 
    261 import sans.dataloader.readers 
    262 f = os.path.join(sans.dataloader.readers.get_data_path(),'defaults.xml') 
     260# Copy the settings file for the sas.dataloader file extension associations 
     261import sas.dataloader.readers 
     262f = os.path.join(sas.dataloader.readers.get_data_path(),'defaults.xml') 
    263263if os.path.isfile(f): 
    264264    data_files.append(('.', [f])) 
     
    345345target_wx_client = Target( 
    346346    description = 'SasView', 
    347     script = 'sansview.py', 
     347    script = 'sasview.py', 
    348348    icon_resources = [(1, os.path.join(images_dir, "ball.ico"))], 
    349349    other_resources = [(24,1,manifest)], 
     
    357357gen.generate_installer() 
    358358#initialize category stuff 
    359 #from sans.guiframe.CategoryInstaller import CategoryInstaller 
     359#from sas.guiframe.CategoryInstaller import CategoryInstaller 
    360360#CategoryInstaller.check_install() 
    361361 
  • sasview/setup_mac.py

    r79492222 r3a39c2e  
    1313from setuptools import setup 
    1414import periodictable.xsf 
    15 import sans.dataloader.readers  
     15import sas.dataloader.readers  
    1616import os 
    1717import string 
     
    2929DATA_FILES = periodictable.data_files() 
    3030#invariant and calculator help doc 
    31 import sans.perspectives.fitting as fitting 
     31import sas.perspectives.fitting as fitting 
    3232DATA_FILES += fitting.data_files() 
    33 import sans.perspectives.calculator as calculator 
     33import sas.perspectives.calculator as calculator 
    3434DATA_FILES += calculator.data_files() 
    35 import sans.perspectives.invariant as invariant 
     35import sas.perspectives.invariant as invariant 
    3636DATA_FILES += invariant.data_files() 
    37 import sans.models as models 
     37import sas.models as models 
    3838DATA_FILES += models.data_files() 
    39 import sans.guiframe as guiframe 
     39import sas.guiframe as guiframe 
    4040DATA_FILES += guiframe.data_files() 
    4141 
    4242#CANSAxml reader data files 
    43 RESOURCES_FILES.append(os.path.join(sans.dataloader.readers.get_data_path(),'defaults.xml')) 
     43RESOURCES_FILES.append(os.path.join(sas.dataloader.readers.get_data_path(),'defaults.xml')) 
    4444 
    4545# Locate libxml2 library 
     
    5353    raise RuntimeError, "Could not find libxml2 on the system" 
    5454 
    55 APP = ['sansview.py'] 
     55APP = ['sasview.py'] 
    5656DATA_FILES += ['images','test','media', 'custom_config.py', 'local_config.py', 
    5757               'default_categories.json'] 
     
    6767        list = [] 
    6868        EXCEPTION_LIST = ['*', '.', ''] 
    69         from sans.dataloader.loader import Loader 
     69        from sas.dataloader.loader import Loader 
    7070        wild_cards = Loader().get_wildcards() 
    7171        for item in wild_cards: 
     
    100100                                   CFBundleTypeRole="Shell" )],) 
    101101 
    102 APP = ['sansview.py'] 
     102APP = ['sasview.py'] 
    103103DATA_FILES += ['images','test','media'] 
    104104 
  • sasview/welcome_panel.py

    r79492222 r3a39c2e  
    1010import local_config as config 
    1111from wx.lib.scrolledpanel import ScrolledPanel 
    12 from sans.guiframe.panel_base import PanelBase 
     12from sas.guiframe.panel_base import PanelBase 
    1313#Font size width  
    1414if sys.platform.count("win32")>0: 
  • setup.py

    r5972029 r3a39c2e  
    2626 
    2727# Manage version number ###################################### 
    28 import sansview 
    29 VERSION = sansview.__version__ 
     28import sasview 
     29VERSION = sasview.__version__ 
    3030############################################################## 
    3131 
     
    3636 
    3737# Remove all files that should be updated by this setup 
    38 # We do this here because application updates these files from .sansview 
     38# We do this here because application updates these files from .sasview 
    3939# except when there is no such file 
    4040# Todo : make this list generic 
     
    4545                     'sum_Ap1_1_Ap2.pyc', 'sum_p1_p2.pyc',  
    4646                     'testmodel_2.pyc', 'testmodel.pyc', 'plugins.log'] 
    47 sans_dir = os.path.join(os.path.expanduser("~"),'.sasview') 
    48 if os.path.isdir(sans_dir): 
    49     f_path = os.path.join(sans_dir, "sasview.log") 
     47sas_dir = os.path.join(os.path.expanduser("~"),'.sasview') 
     48if os.path.isdir(sas_dir): 
     49    f_path = os.path.join(sas_dir, "sasview.log") 
    5050    if os.path.isfile(f_path): 
    5151        os.remove(f_path) 
    52     f_path = os.path.join(sans_dir, "serialized_cat.json") 
     52    f_path = os.path.join(sas_dir, "serialized_cat.json") 
    5353    if os.path.isfile(f_path): 
    5454        os.remove(f_path) 
    55     f_path = os.path.join(sans_dir, 'config', "custom_config.py") 
     55    f_path = os.path.join(sas_dir, 'config', "custom_config.py") 
    5656    if os.path.isfile(f_path): 
    5757        os.remove(f_path) 
    58     f_path = os.path.join(sans_dir, 'plugin_models') 
     58    f_path = os.path.join(sas_dir, 'plugin_models') 
    5959    if os.path.isdir(f_path): 
    6060        for f in os.listdir(f_path):  
     
    164164        build_sphinx.build() 
    165165 
    166 # sans module 
    167 package_dir["sans"] = os.path.join("src", "sans") 
    168 packages.append("sans") 
    169  
    170 # sans.invariant 
    171 package_dir["sans.invariant"] = os.path.join("src", "sans", "invariant") 
    172 packages.extend(["sans.invariant"]) 
    173  
    174 # sans.guiframe 
    175 guiframe_path = os.path.join("src", "sans", "guiframe") 
    176 package_dir["sans.guiframe"] = guiframe_path 
    177 package_dir["sans.guiframe.local_perspectives"] = os.path.join(os.path.join(guiframe_path, "local_perspectives")) 
    178 package_data["sans.guiframe"] = ['images/*', 'media/*'] 
    179 packages.extend(["sans.guiframe", "sans.guiframe.local_perspectives"]) 
     166# sas module 
     167package_dir["sas"] = os.path.join("src", "sas") 
     168packages.append("sas") 
     169 
     170# sas.invariant 
     171package_dir["sas.invariant"] = os.path.join("src", "sas", "invariant") 
     172packages.extend(["sas.invariant"]) 
     173 
     174# sas.guiframe 
     175guiframe_path = os.path.join("src", "sas", "guiframe") 
     176package_dir["sas.guiframe"] = guiframe_path 
     177package_dir["sas.guiframe.local_perspectives"] = os.path.join(os.path.join(guiframe_path, "local_perspectives")) 
     178package_data["sas.guiframe"] = ['images/*', 'media/*'] 
     179packages.extend(["sas.guiframe", "sas.guiframe.local_perspectives"]) 
    180180# build local plugin 
    181181for d in os.listdir(os.path.join(guiframe_path, "local_perspectives")): 
    182182    if d not in ['.svn','__init__.py', '__init__.pyc']: 
    183         package_name = "sans.guiframe.local_perspectives." + d 
     183        package_name = "sas.guiframe.local_perspectives." + d 
    184184        packages.append(package_name) 
    185185        package_dir[package_name] = os.path.join(guiframe_path, "local_perspectives", d) 
    186186 
    187 # sans.dataloader 
    188 package_dir["sans.dataloader"] = os.path.join("src", "sans", "dataloader") 
    189 package_data["sans.dataloader.readers"] = ['defaults.xml','schema/*.xsd'] 
    190 packages.extend(["sans.dataloader","sans.dataloader.readers","sans.dataloader.readers.schema"]) 
    191  
    192 # sans.calculator 
    193 package_dir["sans.calculator"] =os.path.join("src", "sans", "calculator") 
    194 packages.extend(["sans.calculator"]) 
     187# sas.dataloader 
     188package_dir["sas.dataloader"] = os.path.join("src", "sas", "dataloader") 
     189package_data["sas.dataloader.readers"] = ['defaults.xml','schema/*.xsd'] 
     190packages.extend(["sas.dataloader","sas.dataloader.readers","sas.dataloader.readers.schema"]) 
     191 
     192# sas.calculator 
     193package_dir["sas.calculator"] =os.path.join("src", "sas", "calculator") 
     194packages.extend(["sas.calculator"]) 
    195195     
    196 # sans.pr 
     196# sas.pr 
    197197numpy_incl_path = os.path.join(NUMPY_INC, "numpy") 
    198 srcdir  = os.path.join("src", "sans", "pr", "c_extensions") 
    199 package_dir["sans.pr.core"] = srcdir 
    200 package_dir["sans.pr"] = os.path.join("src","sans", "pr") 
    201 packages.extend(["sans.pr","sans.pr.core"]) 
    202 ext_modules.append( Extension("sans.pr.core.pr_inversion", 
     198srcdir  = os.path.join("src", "sas", "pr", "c_extensions") 
     199package_dir["sas.pr.core"] = srcdir 
     200package_dir["sas.pr"] = os.path.join("src","sas", "pr") 
     201packages.extend(["sas.pr","sas.pr.core"]) 
     202ext_modules.append( Extension("sas.pr.core.pr_inversion", 
    203203                              sources = [os.path.join(srcdir, "Cinvertor.c"), 
    204204                                         os.path.join(srcdir, "invertor.c"), 
     
    207207                              ) ) 
    208208         
    209 # sans.fit (park integration) 
    210 package_dir["sans.fit"] = os.path.join("src", "sans", "fit") 
    211 packages.append("sans.fit") 
     209# sas.fit (park integration) 
     210package_dir["sas.fit"] = os.path.join("src", "sas", "fit") 
     211packages.append("sas.fit") 
    212212 
    213213# Perspectives 
    214 package_dir["sans.perspectives"] = os.path.join("src", "sans", "perspectives") 
    215 package_dir["sans.perspectives.pr"] = os.path.join("src", "sans", "perspectives", "pr") 
    216 packages.extend(["sans.perspectives","sans.perspectives.pr"]) 
    217 package_data["sans.perspectives.pr"] = ['images/*'] 
    218  
    219 package_dir["sans.perspectives.invariant"] = os.path.join("src", "sans", "perspectives", "invariant") 
    220 packages.extend(["sans.perspectives.invariant"]) 
    221 package_data['sans.perspectives.invariant'] = [os.path.join("media",'*')] 
    222  
    223 package_dir["sans.perspectives.fitting"] = os.path.join("src", "sans", "perspectives", "fitting") 
    224 package_dir["sans.perspectives.fitting.plugin_models"] = os.path.join("src", "sans", "perspectives", "fitting", "plugin_models") 
    225 packages.extend(["sans.perspectives.fitting",  
    226                  "sans.perspectives.fitting.plugin_models"]) 
    227 package_data['sans.perspectives.fitting'] = ['media/*','plugin_models/*'] 
    228  
    229 packages.extend(["sans.perspectives", "sans.perspectives.calculator"])     
    230 package_data['sans.perspectives.calculator'] = ['images/*', 'media/*'] 
     214package_dir["sas.perspectives"] = os.path.join("src", "sas", "perspectives") 
     215package_dir["sas.perspectives.pr"] = os.path.join("src", "sas", "perspectives", "pr") 
     216packages.extend(["sas.perspectives","sas.perspectives.pr"]) 
     217package_data["sas.perspectives.pr"] = ['images/*'] 
     218 
     219package_dir["sas.perspectives.invariant"] = os.path.join("src", "sas", "perspectives", "invariant") 
     220packages.extend(["sas.perspectives.invariant"]) 
     221package_data['sas.perspectives.invariant'] = [os.path.join("media",'*')] 
     222 
     223package_dir["sas.perspectives.fitting"] = os.path.join("src", "sas", "perspectives", "fitting") 
     224package_dir["sas.perspectives.fitting.plugin_models"] = os.path.join("src", "sas", "perspectives", "fitting", "plugin_models") 
     225packages.extend(["sas.perspectives.fitting",  
     226                 "sas.perspectives.fitting.plugin_models"]) 
     227package_data['sas.perspectives.fitting'] = ['media/*','plugin_models/*'] 
     228 
     229packages.extend(["sas.perspectives", "sas.perspectives.calculator"])     
     230package_data['sas.perspectives.calculator'] = ['images/*', 'media/*'] 
    231231     
    232232# Data util 
    233 package_dir["data_util"] = os.path.join("src", "sans", "data_util") 
    234 packages.append("sans.data_util") 
     233package_dir["data_util"] = os.path.join("src", "sas", "data_util") 
     234packages.append("sas.data_util") 
    235235 
    236236# Plottools 
    237 package_dir["sans.plottools"] = os.path.join("src", "sans", "plottools") 
    238 packages.append("sans.plottools") 
     237package_dir["sas.plottools"] = os.path.join("src", "sas", "plottools") 
     238packages.append("sas.plottools") 
    239239 
    240240# Park 1.2.1 
     
    250250                              ) ) 
    251251 
    252 # Sans models 
    253 includedir  = os.path.join("src", "sans", "models", "include") 
    254 igordir = os.path.join("src", "sans", "models", "c_extension", "libigor") 
    255 cephes_dir = os.path.join("src", "sans", "models", "c_extension", "cephes") 
    256 c_model_dir = os.path.join("src", "sans", "models", "c_extension", "c_models") 
    257 smear_dir  = os.path.join("src", "sans", "models", "c_extension", "c_smearer") 
    258 gen_dir  = os.path.join("src", "sans", "models", "c_extension", "c_gen") 
    259 wrapper_dir  = os.path.join("src", "sans", "models", "c_extension", "python_wrapper", "generated") 
    260 model_dir = os.path.join("src", "sans","models") 
     252# sas models 
     253includedir  = os.path.join("src", "sas", "models", "include") 
     254igordir = os.path.join("src", "sas", "models", "c_extension", "libigor") 
     255cephes_dir = os.path.join("src", "sas", "models", "c_extension", "cephes") 
     256c_model_dir = os.path.join("src", "sas", "models", "c_extension", "c_models") 
     257smear_dir  = os.path.join("src", "sas", "models", "c_extension", "c_smearer") 
     258gen_dir  = os.path.join("src", "sas", "models", "c_extension", "c_gen") 
     259wrapper_dir  = os.path.join("src", "sas", "models", "c_extension", "python_wrapper", "generated") 
     260model_dir = os.path.join("src", "sas","models") 
    261261 
    262262if os.path.isdir(wrapper_dir): 
     
    266266else: 
    267267    os.makedirs(wrapper_dir) 
    268 sys.path.append(os.path.join("src", "sans", "models", "c_extension", "python_wrapper")) 
     268sys.path.append(os.path.join("src", "sas", "models", "c_extension", "python_wrapper")) 
    269269from wrapping import generate_wrappers 
    270270generate_wrappers(header_dir = includedir,  
     
    305305append_file(file_list=smear_sources, dir_path=smear_dir) 
    306306         
    307 package_dir["sans.models"] = model_dir 
    308 package_dir["sans.models.sans_extension"] = os.path.join("src", "sans", "models", "sans_extension") 
    309 package_data['sans.models'] = [os.path.join('media', "*.*")] 
    310 package_data['sans.models'] += [os.path.join('media','img', "*.*")] 
    311 packages.extend(["sans.models","sans.models.sans_extension"]) 
     307package_dir["sas.models"] = model_dir 
     308package_dir["sas.models.sas_extension"] = os.path.join("src", "sas", "models", "sas_extension") 
     309package_data['sas.models'] = [os.path.join('media', "*.*")] 
     310package_data['sas.models'] += [os.path.join('media','img', "*.*")] 
     311packages.extend(["sas.models","sas.models.sas_extension"]) 
    312312     
    313313smearer_sources = [os.path.join(smear_dir, "smearer.cpp"), 
     
    319319 
    320320c_models = [  
    321     Extension("sans.models.sans_extension.c_models", 
     321    Extension("sas.models.sas_extension.c_models", 
    322322        sources=model_sources,                  
    323323        include_dirs=[ 
     
    327327 
    328328    # Smearer extension 
    329     Extension("sans.models.sans_extension.smearer", 
     329    Extension("sas.models.sas_extension.smearer", 
    330330        sources = smearer_sources, 
    331331        include_dirs=[igordir,  smear_dir, numpy_incl_path], 
    332332    ), 
    333333                     
    334     Extension("sans.models.sans_extension.smearer2d_helper", 
     334    Extension("sas.models.sas_extension.smearer2d_helper", 
    335335        sources = [ 
    336336            os.path.join(smear_dir, "smearer2d_helper_module.cpp"), 
     
    340340    ), 
    341341                     
    342     Extension("sans.models.sans_extension.sld2i", 
     342    Extension("sas.models.sas_extension.sld2i", 
    343343        sources = [ 
    344344            os.path.join(gen_dir, "sld2i_module.cpp"), 
     
    356356# SasView 
    357357 
    358 package_dir["sans.sansview"] = "sansview" 
    359 package_data['sans.sansview'] = ['images/*', 'media/*', 'test/*',  
     358package_dir["sas.sasview"] = "sasview" 
     359package_data['sas.sasview'] = ['images/*', 'media/*', 'test/*',  
    360360                                 'default_categories.json'] 
    361 packages.append("sans.sansview") 
     361packages.append("sas.sasview") 
    362362 
    363363required = [ 
     
    397397    entry_points = { 
    398398                    'console_scripts':[ 
    399                                        "sasview = sans.sansview.sansview:run", 
     399                                       "sasview = sas.sasview.sasview:run", 
    400400                                       ] 
    401401                    }, 
  • src/examples/test_chisq_panel.py

    rf468791 r3a39c2e  
    2727 
    2828import wx 
    29 from sans.plottools.PlotPanel import PlotPanel 
    30 from sans.plottools.plottables import Plottable, Graph, Data1D, Theory1D 
     29from sas.plottools.PlotPanel import PlotPanel 
     30from sas.plottools.plottables import Plottable, Graph, Data1D, Theory1D 
    3131import  sys 
    3232import numpy 
     
    8686        dy = numpy.sqrt(100*numpy.abs(y))/100 
    8787 
    88     from sans.plottools.plottables import Data1D, Theory1D, Chisq , Graph 
     88    from sas.plottools.plottables import Data1D, Theory1D, Chisq , Graph 
    8989    data = Data1D(x,y,dy=dy) 
    9090    data.xaxis('distance', 'm') 
  • src/examples/test_copy_print.py

    rf468791 r3a39c2e  
    2626 
    2727import wx 
    28 from sans.plottools.PlotPanel import PlotPanel 
    29 from sans.plottools.plottables import Graph, Data1D, Theory1D 
     28from sas.plottools.PlotPanel import PlotPanel 
     29from sas.plottools.plottables import Graph, Data1D, Theory1D 
    3030import  sys 
    3131sys.platform = 'win95' 
  • src/examples/test_panel.py

    rf468791 r3a39c2e  
    11""" 
    22    Test application that uses plottools 
    3     This application uses most of the functionality required by the SANS group 
     3    This application uses most of the functionality required by the SAS group 
    44    and should be treated as a test-case representative of that use. 
    55     
     
    3737""" 
    3838import wx 
    39 from sans.plottools.PlotPanel import PlotPanel 
    40 from sans.plottools.plottables import Data1D 
     39from sas.plottools.PlotPanel import PlotPanel 
     40from sas.plottools.plottables import Data1D 
    4141import  sys 
    4242import numpy 
     
    4444 
    4545 
    46 class SANSplotpanel(PlotPanel): 
     46class SASplotpanel(PlotPanel): 
    4747     
    4848    def __init__(self, parent, id = -1, color = None,\ 
     
    9494         
    9595        # Panel for 1D plot 
    96         self.plotpanel    = SANSplotpanel(self, -1, style=wx.RAISED_BORDER) 
     96        self.plotpanel    = SASplotpanel(self, -1, style=wx.RAISED_BORDER) 
    9797 
    9898        # Set up the menu 
  • src/examples/test_panel2D.py

    rf468791 r3a39c2e  
    11""" 
    22    Test application that uses plottools 
    3     This application uses most of the functionality required by the SANS group 
     3    This application uses most of the functionality required by the SAS group 
    44    and should be treated as a test-case representative of that use. 
    55     
     
    3737""" 
    3838import wx 
    39 from sans.plottools.PlotPanel import PlotPanel 
    40 from sans.plottools.plottables import Data1D, Theory1D, Data2D 
     39from sas.plottools.PlotPanel import PlotPanel 
     40from sas.plottools.plottables import Data1D, Theory1D, Data2D 
    4141import  sys,os 
    4242import numpy 
     
    4444 
    4545 
    46 class SANSplotpanel(PlotPanel): 
     46class SASplotpanel(PlotPanel): 
    4747     
    4848    def __init__(self, parent, id = -1, color = None,\ 
     
    136136         
    137137        # Panel for 1D plot 
    138         self.plotpanel    = SANSplotpanel(self, -1, style=wx.RAISED_BORDER) 
     138        self.plotpanel    = SASplotpanel(self, -1, style=wx.RAISED_BORDER) 
    139139 
    140140        # Set up the menu 
     
    200200            path = dlg.GetPath() 
    201201            mypath = os.path.basename(path) 
    202             from sans.dataloader.loader import  Loader 
     202            from sas.dataloader.loader import  Loader 
    203203            
    204204            #Instantiate a loader  
  • src/examples/test_text_panel.py

    rf468791 r3a39c2e  
    2727 
    2828import wx 
    29 from sans.plottools.PlotPanel import PlotPanel 
    30 from sans.plottools.plottables import Text, Graph 
     29from sas.plottools.PlotPanel import PlotPanel 
     30from sas.plottools.plottables import Text, Graph 
    3131 
    3232class TestPlotPanel(PlotPanel): 
Note: See TracChangeset for help on using the changeset viewer.