Changeset 00a6ec4 in sasview


Ignore:
Timestamp:
Apr 5, 2017 1:15:25 PM (8 years ago)
Author:
Ricardo Ferraz Leal <ricleal@…>
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
fd5d6eac
Parents:
4fb10e5 (diff), 5e2f36c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin' into log_binning

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    rc155a16 raaad4c95  
    5858/test/sasdataloader/test/isis_1_1_write_test.xml 
    5959/test/sasdataloader/test/write_test.xml 
     60test*log 
    6061 
    6162# autogenerated scripts 
  • .travis.yml

    r4636f57 rbb1cb38  
    1 # Test Travis CL 
    2  
    31language: python 
    4  
    52matrix: 
    63  include: 
    7     - os: linux 
    8       env: 
    9         - PY=2.7 
    10         - NUMPYSPEC=numpy 
    11     - os: osx 
    12       language: generic 
    13       env: 
    14         - PY=2.7 
    15         - NUMPYSPEC=numpy 
    16  
    17 # whitelist 
     4  - os: linux 
     5    env: 
     6    - PY=2.7 
     7    - NUMPYSPEC=numpy 
     8  - os: osx 
     9    language: generic 
     10    env: 
     11    - PY=2.7 
     12    - NUMPYSPEC=numpy 
    1813branches: 
    1914  only: 
    20     - master 
    21  
     15  - master 
    2216addons: 
    2317  apt: 
    2418    packages: 
    25       - opencl-headers 
    26       - fglrx 
    27       - libblas-dev 
    28       - libatlas-dev 
    29       - libatlas-base-dev 
    30       - liblapack-dev 
    31       - gfortran 
    32       - libhdf5-serial-dev 
    33  
     19    - opencl-headers 
     20    - fglrx 
     21    - libblas-dev 
     22    - libatlas-dev 
     23    - libatlas-base-dev 
     24    - liblapack-dev 
     25    - gfortran 
     26    - libhdf5-serial-dev 
    3427before_install: 
    35   - echo $TRAVIS_OS_NAME 
    36   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 
    37         wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; 
    38         sudo apt-get update; sudo apt-get install python-pyopencl; 
    39     elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 
    40         wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; 
    41     fi 
    42  
    43   - bash miniconda.sh -b -p $HOME/miniconda 
    44   - export PATH="$HOME/miniconda/bin:$PATH" 
    45   - hash -r 
    46   - conda update --yes conda 
    47  
    48   # Useful for debugging any issues with conda 
    49   - conda info -a 
    50  
    51   # could install other dependencies, but they're locked to specific 
    52   # versions in build/requirements.txt 
    53   - conda install --yes python=$PY $NUMPYSPEC scipy cython pylint wxpython 
    54  
     28- echo $TRAVIS_OS_NAME 
     29- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh 
     30  -O miniconda.sh; sudo apt-get update; sudo apt-get install python-pyopencl; elif 
     31  [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh 
     32  -O miniconda.sh; fi 
     33- bash miniconda.sh -b -p $HOME/miniconda 
     34- export PATH="$HOME/miniconda/bin:$PATH" 
     35- hash -r 
     36- conda update --yes conda 
     37- conda info -a 
     38- conda install --yes python=$PY $NUMPYSPEC scipy cython pylint wxpython 
    5539install: 
    56   - pip install -r build_tools/requirements.txt 
    57   - pip install matplotlib 
    58  
    59 #before_script: 
    60 #  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 
    61 #        "export DISPLAY=:99.0"; "sh -e /etc/init.d/xvfb start"; sleep 3; # give xvfb some time to start 
    62 #    fi 
    63  
     40- pip install -r build_tools/requirements.txt 
     41- pip install matplotlib 
    6442script: 
    65   - cd .. 
    66   # this should be the directory above the sasview directory, where we want to 
    67   # clone the sasmodels 
    68   - export WORKSPACE=$(pwd) 
    69   - git clone --depth=50 --branch=master https://github.com/SasView/sasmodels.git sasmodels 
    70  
    71   # required for documentation 
    72   - git clone --depth=50 --branch=master https://github.com/bumps/bumps.git 
    73  
    74   - ls -ltr 
    75   - if [ ! -d "utils" ]; then mkdir utils; fi 
    76   - /bin/sh -xe sasview/build_tools/travis_build.sh 
    77   - export LC_ALL=en_US.UTF-8 
    78   - export LANG=en_US.UTF-8 
    79 #  - python setup.py docs; echo 0 
    80 #  - python setup.py bdist_egg --skip-build 
    81  
     43- cd .. 
     44- export WORKSPACE=$(pwd) 
     45- git clone --depth=50 --branch=master https://github.com/SasView/sasmodels.git sasmodels 
     46- git clone --depth=50 --branch=master https://github.com/bumps/bumps.git 
     47- ls -ltr 
     48- if [ ! -d "utils" ]; then mkdir utils; fi 
     49- /bin/sh -xe sasview/build_tools/travis_build.sh 
     50- export LC_ALL=en_US.UTF-8 
     51- export LANG=en_US.UTF-8 
     52notifications: 
     53  slack: 
     54    secure: TlsEpZiMLmOOgnmdG0I/oB4tq3bbQYeBBQi6S5qLlkYE9EjUTbbfg7oz0JYUsQ56FAsdFR8zswpBsX7PebZerzrq0ZmvfHSiJhOFIdBfY5Nb7bmLW8/9pUNWV57ON/8Gw2fE5ytc7FgvCGR64yb2QISI/150SIUwvdL5HXTxRWI= 
  • src/sas/sasgui/guiframe/media/data_formats_help.rst

    r48b8f6d r98c44f3  
    44.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 
    55.. WG Bouwman, DUT, added during CodeCamp-V in Oct 2016 the SESANS data format 
     6.. WG Bouwman, DUT, updated during CodeCamp-VI in Apr 2017 the SESANS data format 
    67 
    78.. _Formats: 
     
    8283The file format has a list of name-value pairs at the top of the file which detail the general experimental parameters necessary for fitting and analyzing data. This list should contain all the information necessary for the file to be 'portable' between users. 
    8384 
    84 Following the header is a 6 column list of instrument experimental variables: 
     85Following the header is a 8 (only the first 4 are really needed) column list of instrument experimental variables: 
    8586 
    8687- Spin echo length (z, in Angstroms) 
     88- depolarization (:math:`log(P/P_0)/(lambda^2 * thickness)`, in Angstrom^-1 cm^-1) 
     89- depolarization error in the same unit) (measurement error) 
    8790- Spin echo length error (:math:`\Delta`\ z, in Angstroms) (experimental resolution) 
    88 - Neutron wavelength (:math:`\lambda`, in Angstroms) (essential for ToF instruments) 
     91- Neutron wavelength (:math:`\lambda`, in Angstroms) 
    8992- Neutron wavelength error (:math:`\Delta \lambda`, in Angstroms) 
    9093- Normalized polarization (:math:`P/P_0`, unitless) 
     
    9396.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    9497 
    95 .. note::  This help document was last changed by Steve King, 07Oct2016 
     98.. note::  This help document was last changed by Wim Bouwman, 05Apr2017 
  • test/logging.ini

    rebb0a55 raaad4c95  
    2929level=INFO 
    3030formatter=detailed 
    31 args=(os.path.join(os.path.expanduser("~"),'.sasview/tests.log'),"w") 
     31args=('tests.log','w') 
    3232 
    3333############################################################################### 
  • test/run_one.py

    r64ca561 raaad4c95  
    1515    logging.config.fileConfig(LOGGER_CONFIG_FILE, disable_existing_loggers=False) 
    1616 
     17if len(sys.argv) < 2: 
     18    logger.error("Use %s <filename to test>",sys.argv[0]) 
     19    sys.exit(-1) 
    1720 
    1821run_py = joinpath(dirname(dirname(abspath(__file__))), 'run.py') 
  • test/sasdataloader/test/testLoad.py

    r463e7ffc raaad4c95  
    1919    HAS_IMAGE = True 
    2020except: 
    21     print "IMAGE TESTS WILL NOT BE PERFORMED: MISSING PIL MODULE" 
     21    logger.info("IMAGE TESTS WILL NOT BE PERFORMED: MISSING PIL MODULE") 
    2222     
    2323import os.path 
  • test/utest_sasview.py

    rebb0a55 raaad4c95  
    88import logging.config 
    99LOGGER_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'logging.ini') 
    10 print LOGGER_CONFIG_FILE 
    1110logging.config.fileConfig(LOGGER_CONFIG_FILE) 
    1211logger = logging.getLogger(__name__) 
     
    5049            continue 
    5150         
     51 
    5252        # Go through modules looking for unit tests 
    5353        module_dir = os.path.join(test_root, d, "test") 
  • test/sasdataloader/test/utest_averaging.py

    r9a5097c r4fb10e5  
    22import unittest 
    33import math 
     4import os 
    45 
    56from sas.sascalc.dataloader.loader import  Loader 
     
    9798     
    9899    def setUp(self): 
    99         self.data = Loader().load('MAR07232_rest.ASC') 
     100        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'MAR07232_rest.ASC') 
     101        self.data = Loader().load(filepath) 
    100102         
    101103    def test_ring(self): 
     
    110112         
    111113        o = r(self.data) 
    112         answer = Loader().load('ring_testdata.txt') 
     114        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ring_testdata.txt') 
     115        answer = Loader().load(filepath) 
    113116         
    114117        for i in range(r.nbins_phi - 1): 
     
    128131        o = r(self.data) 
    129132 
    130         answer = Loader().load('avg_testdata.txt') 
     133        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'avg_testdata.txt') 
     134        answer = Loader().load(filepath) 
    131135        for i in range(r.nbins_phi): 
    132136            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    163167        o = r(self.data) 
    164168 
    165         answer = Loader().load('slabx_testdata.txt') 
     169        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'slabx_testdata.txt') 
     170        answer = Loader().load(filepath) 
    166171        for i in range(len(o.x)): 
    167172            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    180185        o = r(self.data) 
    181186 
    182         answer = Loader().load('slaby_testdata.txt') 
     187        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'slaby_testdata.txt') 
     188        answer = Loader().load(filepath) 
    183189        for i in range(len(o.x)): 
    184190            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    207213        o = r(self.data) 
    208214 
    209         answer = Loader().load('ring_testdata.txt') 
     215        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ring_testdata.txt') 
     216        answer = Loader().load(filepath) 
    210217        for i in range(len(o.x)): 
    211218            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    225232        o = r(self.data) 
    226233 
    227         answer = Loader().load('sectorphi_testdata.txt') 
     234        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'sectorphi_testdata.txt') 
     235        answer = Loader().load(filepath) 
    228236        for i in range(len(o.x)): 
    229237            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
     
    243251        o = r(self.data) 
    244252 
    245         answer = Loader().load('sectorq_testdata.txt') 
     253        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'sectorq_testdata.txt') 
     254        answer = Loader().load(filepath) 
    246255        for i in range(len(o.x)): 
    247256            self.assertAlmostEqual(o.x[i], answer.x[i], 4) 
Note: See TracChangeset for help on using the changeset viewer.