Changeset a854f21 in sasview for src/sas/sascalc/dataloader


Ignore:
Timestamp:
Aug 19, 2016 8:57:54 AM (8 years ago)
Author:
lewis
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:
a4deca6
Parents:
d65fb2f
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/18/16 10:52:06)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/19/16 08:57:54)
Message:

Fix cansas_reader_HDF5 unit tests

I'm not sure why the first value of each data array was being deleted, but
as of commit 7bd6860, I don't believe they need to be any more.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py

    rd65fb2f ra854f21  
    136136                data_set = data[key][:] 
    137137                unit = self._get_unit(value) 
    138  
     138                 
    139139                ## I and Q Data 
    140140                if key == u'I': 
     
    303303        ## Type cast data arrays to float64 and find min/max as appropriate 
    304304        for dataset in self.data2d: 
    305             dataset.data = np.delete(dataset.data, [0]) 
    306305            dataset.data = dataset.data.astype(np.float64) 
    307             dataset.err_data = np.delete(dataset.err_data, [0]) 
    308306            dataset.err_data = dataset.err_data.astype(np.float64) 
    309             dataset.mask = np.delete(dataset.mask, [0]) 
    310307            if dataset.qx_data is not None: 
    311                 dataset.qx_data = np.delete(dataset.qx_data, [0]) 
    312308                dataset.xmin = np.min(dataset.qx_data) 
    313309                dataset.xmax = np.max(dataset.qx_data) 
    314310                dataset.qx_data = dataset.qx_data.astype(np.float64) 
    315311            if dataset.dqx_data is not None: 
    316                 dataset.dqx_data = np.delete(dataset.dqx_data, [0]) 
    317312                dataset.dqx_data = dataset.dqx_data.astype(np.float64) 
    318313            if dataset.qy_data is not None: 
    319                 dataset.qy_data = np.delete(dataset.qy_data, [0]) 
    320314                dataset.ymin = np.min(dataset.qy_data) 
    321315                dataset.ymax = np.max(dataset.qy_data) 
    322316                dataset.qy_data = dataset.qy_data.astype(np.float64) 
    323317            if dataset.dqy_data is not None: 
    324                 dataset.dqy_data = np.delete(dataset.dqy_data, [0]) 
    325318                dataset.dqy_data = dataset.dqy_data.astype(np.float64) 
    326319            if dataset.q_data is not None: 
    327                 dataset.q_data = np.delete(dataset.q_data, [0]) 
    328320                dataset.q_data = dataset.q_data.astype(np.float64) 
    329321            zeros = np.ones(dataset.data.size, dtype=bool) 
     
    345337        for dataset in self.data1d: 
    346338            if dataset.x is not None: 
    347                 dataset.x = np.delete(dataset.x, [0]) 
    348339                dataset.x = dataset.x.astype(np.float64) 
    349340                dataset.xmin = np.min(dataset.x) 
    350341                dataset.xmax = np.max(dataset.x) 
    351342            if dataset.y is not None: 
    352                 dataset.y = np.delete(dataset.y, [0]) 
    353343                dataset.y = dataset.y.astype(np.float64) 
    354344                dataset.ymin = np.min(dataset.y) 
    355345                dataset.ymax = np.max(dataset.y) 
    356346            if dataset.dx is not None: 
    357                 dataset.dx = np.delete(dataset.dx, [0]) 
    358347                dataset.dx = dataset.dx.astype(np.float64) 
    359348            if dataset.dxl is not None: 
    360                 dataset.dxl = np.delete(dataset.dxl, [0]) 
    361349                dataset.dxl = dataset.dxl.astype(np.float64) 
    362350            if dataset.dxw is not None: 
    363                 dataset.dxw = np.delete(dataset.dxw, [0]) 
    364351                dataset.dxw = dataset.dxw.astype(np.float64) 
    365352            if dataset.dy is not None: 
    366                 dataset.dy = np.delete(dataset.dy, [0]) 
    367353                dataset.dy = dataset.dy.astype(np.float64) 
    368354            final_dataset = combine_data_info_with_plottable(dataset, self.current_datainfo) 
Note: See TracChangeset for help on using the changeset viewer.