Changeset 9a5097c in sasview for test/sasdataloader
- Timestamp:
- Mar 26, 2017 11:33:16 PM (8 years ago)
- 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:
- ed2276f
- Parents:
- 9146ed9
- Location:
- test/sasdataloader
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
test/sasdataloader/plugins/test_reader.py
rb699768 r9a5097c 8 8 copyright 2008, University of Tennessee 9 9 """ 10 import numpy, os 10 import os 11 import numpy as np 11 12 from sas.sascalc.dataloader.data_info import Data1D 12 13 … … 40 41 buff = input_f.read() 41 42 lines = buff.split('\n') 42 x = n umpy.zeros(0)43 y = n umpy.zeros(0)44 dy = n umpy.zeros(0)43 x = np.zeros(0) 44 y = np.zeros(0) 45 dy = np.zeros(0) 45 46 output = Data1D(x, y, dy=dy) 46 47 self.filename = output.filename = basename 47 48 48 49 for line in lines: 49 x = n umpy.append(x, float(line))50 x = np.append(x, float(line)) 50 51 51 52 output.x = x -
test/sasdataloader/test/utest_abs_reader.py
r5f26aa4 r9a5097c 4 4 5 5 import unittest 6 import numpy , math6 import numpy as np 7 7 from sas.sascalc.dataloader.loader import Loader 8 8 from sas.sascalc.dataloader.data_info import Data1D 9 9 10 import os.path11 10 12 11 class abs_reader(unittest.TestCase): … … 313 312 from sas.sascalc.dataloader.readers.cansas_reader import Reader 314 313 r = Reader() 315 x = n umpy.ones(5)316 y = n umpy.ones(5)317 dy = n umpy.ones(5)314 x = np.ones(5) 315 y = np.ones(5) 316 dy = np.ones(5) 318 317 319 318 filename = "write_test.xml" -
test/sasdataloader/test/utest_averaging.py
rb699768 r9a5097c 1 1 2 2 import unittest 3 import math 3 4 4 5 from sas.sascalc.dataloader.loader import Loader 5 6 from sas.sascalc.dataloader.manipulations import Ring, CircularAverage, SectorPhi, get_q,reader2D_converter 6 7 import os.path 8 import numpy, math 7 8 import numpy as np 9 9 import sas.sascalc.dataloader.data_info as data_info 10 10 … … 18 18 should return the predefined height of the distribution (1.0). 19 19 """ 20 x_0 = n umpy.ones([100,100])21 dx_0 = n umpy.ones([100,100])20 x_0 = np.ones([100,100]) 21 dx_0 = np.ones([100,100]) 22 22 23 23 self.data = data_info.Data2D(data=x_0, err_data=dx_0) … … 42 42 43 43 self.qstep = len(x_0) 44 x= n umpy.linspace(start= -1*self.qmax,44 x= np.linspace(start= -1*self.qmax, 45 45 stop= self.qmax, 46 46 num= self.qstep, 47 47 endpoint=True ) 48 y = n umpy.linspace(start= -1*self.qmax,48 y = np.linspace(start= -1*self.qmax, 49 49 stop= self.qmax, 50 50 num= self.qstep, -
test/sasdataloader/test/utest_cansas.py
r1686a333 r9a5097c 15 15 import pylint as pylint 16 16 import unittest 17 import numpy 17 import numpy as np 18 18 import logging 19 19 import warnings
Note: See TracChangeset
for help on using the changeset viewer.